video: adf: add supported formats to adf_overlay_engine_data
[firefly-linux-kernel-4.4.55.git] / drivers / video / adf / adf_fops32.h
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('D', 2, struct adf_post_config32)
11 #define ADF_GET_DEVICE_DATA32 \
12                         _IOR('D', 4, struct adf_device_data32)
13 #define ADF_GET_INTERFACE_DATA32 \
14                         _IOR('D', 5, struct adf_interface_data32)
15 #define ADF_GET_OVERLAY_ENGINE_DATA32 \
16                         _IOR('D', 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         __s64 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
51         __u8 dpms_state;
52         __u8 hotplug_detect;
53         __u16 width_mm;
54         __u16 height_mm;
55
56         struct drm_mode_modeinfo current_mode;
57         compat_size_t n_available_modes;
58         compat_uptr_t available_modes;
59
60         compat_size_t custom_data_size;
61         compat_uptr_t custom_data;
62 };
63
64 struct adf_overlay_engine_data32 {
65         char name[ADF_NAME_LEN];
66
67         compat_size_t n_supported_formats;
68         compat_uptr_t supported_formats;
69
70         compat_size_t custom_data_size;
71         compat_uptr_t custom_data;
72 };
73
74 long adf_file_compat_ioctl(struct file *file, unsigned int cmd,
75                 unsigned long arg);
76
77 #endif /* __VIDEO_ADF_ADF_FOPS32_H */