• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef __VIDEO_ADF_ADF_FOPS32_H
2 #define __VIDEO_ADF_ADF_FOPS32_H
3 
4 #include <linux/compat.h>
5 #include <linux/ioctl.h>
6 
7 #include <video/adf.h>
8 
9 #define ADF_POST_CONFIG32 \
10 		_IOW(ADF_IOCTL_TYPE, 2, struct adf_post_config32)
11 #define ADF_GET_DEVICE_DATA32 \
12 		_IOR(ADF_IOCTL_TYPE, 4, struct adf_device_data32)
13 #define ADF_GET_INTERFACE_DATA32 \
14 		_IOR(ADF_IOCTL_TYPE, 5, struct adf_interface_data32)
15 #define ADF_GET_OVERLAY_ENGINE_DATA32 \
16 		_IOR(ADF_IOCTL_TYPE, 6, struct adf_overlay_engine_data32)
17 
18 struct adf_post_config32 {
19 	compat_size_t n_interfaces;
20 	compat_uptr_t interfaces;
21 
22 	compat_size_t n_bufs;
23 	compat_uptr_t bufs;
24 
25 	compat_size_t custom_data_size;
26 	compat_uptr_t custom_data;
27 
28 	__s32 complete_fence;
29 };
30 
31 struct adf_device_data32 {
32 	char name[ADF_NAME_LEN];
33 
34 	compat_size_t n_attachments;
35 	compat_uptr_t attachments;
36 
37 	compat_size_t n_allowed_attachments;
38 	compat_uptr_t allowed_attachments;
39 
40 	compat_size_t custom_data_size;
41 	compat_uptr_t custom_data;
42 };
43 
44 struct adf_interface_data32 {
45 	char name[ADF_NAME_LEN];
46 
47 	__u8 type;
48 	__u32 id;
49 	/* e.g. type=ADF_INTF_TYPE_DSI, id=1 => DSI.1 */
50 	__u32 flags;
51 
52 	__u8 dpms_state;
53 	__u8 hotplug_detect;
54 	__u16 width_mm;
55 	__u16 height_mm;
56 
57 	struct drm_mode_modeinfo current_mode;
58 	compat_size_t n_available_modes;
59 	compat_uptr_t available_modes;
60 
61 	compat_size_t custom_data_size;
62 	compat_uptr_t custom_data;
63 };
64 
65 struct adf_overlay_engine_data32 {
66 	char name[ADF_NAME_LEN];
67 
68 	compat_size_t n_supported_formats;
69 	compat_uptr_t supported_formats;
70 
71 	compat_size_t custom_data_size;
72 	compat_uptr_t custom_data;
73 };
74 
75 long adf_file_compat_ioctl(struct file *file, unsigned int cmd,
76 		unsigned long arg);
77 
78 #endif /* __VIDEO_ADF_ADF_FOPS32_H */
79