summaryrefslogtreecommitdiff
path: root/include/uapi/drm/imx_drm.h
blob: 8578e075f31668c062d00b8e4d5867b0e0adeae4 (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
79
80
81
82
83
84
85
86
87
88
89
90
/*
 * Copyright 2017,2022 NXP
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _UAPI_IMX_DRM_H_
#define _UAPI_IMX_DRM_H_

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

/**
 * Dpu frame info.
 *
 */
struct drm_imx_dpu_frame_info {
	__u32   width;
	__u32   height;
	__u32	x_offset;
	__u32	y_offset;
	__u32	stride;
	__u32	format;
	__u64   modifier;
	__u64	baddr;
	__u64	uv_addr;
};

#define DRM_IMX_DPU_SET_CMDLIST                 0x00
#define DRM_IMX_DPU_WAIT                        0x01
#define DRM_IMX_DPU_GET_PARAM                   0x02

#define DRM_IOCTL_IMX_DPU_SET_CMDLIST   DRM_IOWR(DRM_COMMAND_BASE + \
		DRM_IMX_DPU_SET_CMDLIST, struct drm_imx_dpu_set_cmdlist)
#define DRM_IOCTL_IMX_DPU_WAIT          DRM_IOWR(DRM_COMMAND_BASE + \
		DRM_IMX_DPU_WAIT, struct drm_imx_dpu_wait)
#define DRM_IOCTL_IMX_DPU_GET_PARAM     DRM_IOWR(DRM_COMMAND_BASE + \
		DRM_IMX_DPU_GET_PARAM, enum drm_imx_dpu_param)

/**
 * struct drm_imx_dpu_set_cmdlist - ioctl argument for
 * DRM_IMX_DPU_SET_CMDLIST.
 */
struct drm_imx_dpu_set_cmdlist {
	__u64	cmd;
	__u32	cmd_nr;

	/* reserved */
	__u64	user_data;
};

/**
 * struct drm_imx_dpu_wait - ioctl argument for
 * DRM_IMX_DPU_WAIT.
 *
 */
struct drm_imx_dpu_wait {
	/* reserved */
	__u64   user_data;
};

/**
 * enum drm_imx_dpu_param - ioctl argument for
 * DRM_IMX_DPU_GET_PARAM.
 *
 */
enum drm_imx_dpu_param {
	DRM_IMX_MAX_DPUS,
	DRM_IMX_GET_FENCE,
};

#if defined(__cplusplus)
}
#endif

#endif /* _UAPI_IMX_DRM_H_ */