aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/adf/adf_fops32.h
blob: 18c673dc5e2e3c468824e80a642465da264bf7f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#ifndef __VIDEO_ADF_ADF_FOPS32_H
#define __VIDEO_ADF_ADF_FOPS32_H

#include <linux/compat.h>
#include <linux/ioctl.h>

#include <video/adf.h>

#define ADF_POST_CONFIG32 \
			_IOW('D', 2, struct adf_post_config32)
#define ADF_GET_DEVICE_DATA32 \
			_IOR('D', 4, struct adf_device_data32)
#define ADF_GET_INTERFACE_DATA32 \
			_IOR('D', 5, struct adf_interface_data32)
#define ADF_GET_OVERLAY_ENGINE_DATA32 \
			_IOR('D', 6, struct adf_overlay_engine_data32)

struct adf_post_config32 {
	compat_size_t n_interfaces;
	compat_uptr_t interfaces;

	compat_size_t n_bufs;
	compat_uptr_t bufs;

	compat_size_t custom_data_size;
	compat_uptr_t custom_data;

	__s64 complete_fence;
};

struct adf_device_data32 {
	char name[ADF_NAME_LEN];

	compat_size_t n_attachments;
	compat_uptr_t attachments;

	compat_size_t n_allowed_attachments;
	compat_uptr_t allowed_attachments;

	compat_size_t custom_data_size;
	compat_uptr_t custom_data;
};

struct adf_interface_data32 {
	char name[ADF_NAME_LEN];

	__u8 type;
	__u32 id;
	/* e.g. type=ADF_INTF_TYPE_DSI, id=1 => DSI.1 */
	__u32 flags;

	__u8 dpms_state;
	__u8 hotplug_detect;
	__u16 width_mm;
	__u16 height_mm;

	struct drm_mode_modeinfo current_mode;
	compat_size_t n_available_modes;
	compat_uptr_t available_modes;

	compat_size_t custom_data_size;
	compat_uptr_t custom_data;
};

struct adf_overlay_engine_data32 {
	char name[ADF_NAME_LEN];

	compat_size_t n_supported_formats;
	compat_uptr_t supported_formats;

	compat_size_t custom_data_size;
	compat_uptr_t custom_data;
};

long adf_file_compat_ioctl(struct file *file, unsigned int cmd,
		unsigned long arg);

#endif /* __VIDEO_ADF_ADF_FOPS32_H */