122851890Sopenharmony_ci/* 222851890Sopenharmony_ci * This header was generated from the Linux kernel headers by update_headers.py, 322851890Sopenharmony_ci * to provide necessary information from kernel to userspace, such as constants, 422851890Sopenharmony_ci * structures, and macros, and thus, contains no copyrightable information. 522851890Sopenharmony_ci */ 622851890Sopenharmony_ci#ifndef _UAPI_EXYNOS_DRM_H_ 722851890Sopenharmony_ci#define _UAPI_EXYNOS_DRM_H_ 822851890Sopenharmony_ci#include "drm.h" 922851890Sopenharmony_ci#if defined(__cplusplus) 1022851890Sopenharmony_ciextern "C" { 1122851890Sopenharmony_ci#endif 1222851890Sopenharmony_cistruct drm_exynos_gem_create { 1322851890Sopenharmony_ci __u64 size; 1422851890Sopenharmony_ci __u32 flags; 1522851890Sopenharmony_ci __u32 handle; 1622851890Sopenharmony_ci}; 1722851890Sopenharmony_cistruct drm_exynos_gem_map { 1822851890Sopenharmony_ci __u32 handle; 1922851890Sopenharmony_ci __u32 reserved; 2022851890Sopenharmony_ci __u64 offset; 2122851890Sopenharmony_ci}; 2222851890Sopenharmony_cistruct drm_exynos_gem_info { 2322851890Sopenharmony_ci __u32 handle; 2422851890Sopenharmony_ci __u32 flags; 2522851890Sopenharmony_ci __u64 size; 2622851890Sopenharmony_ci}; 2722851890Sopenharmony_cistruct drm_exynos_vidi_connection { 2822851890Sopenharmony_ci __u32 connection; 2922851890Sopenharmony_ci __u32 extensions; 3022851890Sopenharmony_ci __u64 edid; 3122851890Sopenharmony_ci}; 3222851890Sopenharmony_cienum e_drm_exynos_gem_mem_type { 3322851890Sopenharmony_ci 3422851890Sopenharmony_ci EXYNOS_BO_CONTIG = 0 << 0, 3522851890Sopenharmony_ci 3622851890Sopenharmony_ci EXYNOS_BO_NONCONTIG = 1 << 0, 3722851890Sopenharmony_ci 3822851890Sopenharmony_ci EXYNOS_BO_NONCACHABLE = 0 << 1, 3922851890Sopenharmony_ci 4022851890Sopenharmony_ci EXYNOS_BO_CACHABLE = 1 << 1, 4122851890Sopenharmony_ci 4222851890Sopenharmony_ci EXYNOS_BO_WC = 1 << 2, 4322851890Sopenharmony_ci EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG | EXYNOS_BO_CACHABLE | 4422851890Sopenharmony_ci EXYNOS_BO_WC 4522851890Sopenharmony_ci}; 4622851890Sopenharmony_cistruct drm_exynos_g2d_get_ver { 4722851890Sopenharmony_ci __u32 major; 4822851890Sopenharmony_ci __u32 minor; 4922851890Sopenharmony_ci}; 5022851890Sopenharmony_cistruct drm_exynos_g2d_cmd { 5122851890Sopenharmony_ci __u32 offset; 5222851890Sopenharmony_ci __u32 data; 5322851890Sopenharmony_ci}; 5422851890Sopenharmony_cienum drm_exynos_g2d_buf_type { 5522851890Sopenharmony_ci G2D_BUF_USERPTR = 1 << 31, 5622851890Sopenharmony_ci}; 5722851890Sopenharmony_cienum drm_exynos_g2d_event_type { 5822851890Sopenharmony_ci G2D_EVENT_NOT, 5922851890Sopenharmony_ci G2D_EVENT_NONSTOP, 6022851890Sopenharmony_ci G2D_EVENT_STOP, 6122851890Sopenharmony_ci}; 6222851890Sopenharmony_cistruct drm_exynos_g2d_userptr { 6322851890Sopenharmony_ci unsigned long userptr; 6422851890Sopenharmony_ci unsigned long size; 6522851890Sopenharmony_ci}; 6622851890Sopenharmony_cistruct drm_exynos_g2d_set_cmdlist { 6722851890Sopenharmony_ci __u64 cmd; 6822851890Sopenharmony_ci __u64 cmd_buf; 6922851890Sopenharmony_ci __u32 cmd_nr; 7022851890Sopenharmony_ci __u32 cmd_buf_nr; 7122851890Sopenharmony_ci 7222851890Sopenharmony_ci __u64 event_type; 7322851890Sopenharmony_ci __u64 user_data; 7422851890Sopenharmony_ci}; 7522851890Sopenharmony_cistruct drm_exynos_g2d_exec { 7622851890Sopenharmony_ci __u64 async; 7722851890Sopenharmony_ci}; 7822851890Sopenharmony_cistruct drm_exynos_ioctl_ipp_get_res { 7922851890Sopenharmony_ci __u32 count_ipps; 8022851890Sopenharmony_ci __u32 reserved; 8122851890Sopenharmony_ci __u64 ipp_id_ptr; 8222851890Sopenharmony_ci}; 8322851890Sopenharmony_cienum drm_exynos_ipp_format_type { 8422851890Sopenharmony_ci DRM_EXYNOS_IPP_FORMAT_SOURCE = 0x01, 8522851890Sopenharmony_ci DRM_EXYNOS_IPP_FORMAT_DESTINATION = 0x02, 8622851890Sopenharmony_ci}; 8722851890Sopenharmony_cistruct drm_exynos_ipp_format { 8822851890Sopenharmony_ci __u32 fourcc; 8922851890Sopenharmony_ci __u32 type; 9022851890Sopenharmony_ci __u64 modifier; 9122851890Sopenharmony_ci}; 9222851890Sopenharmony_cienum drm_exynos_ipp_capability { 9322851890Sopenharmony_ci DRM_EXYNOS_IPP_CAP_CROP = 0x01, 9422851890Sopenharmony_ci DRM_EXYNOS_IPP_CAP_ROTATE = 0x02, 9522851890Sopenharmony_ci DRM_EXYNOS_IPP_CAP_SCALE = 0x04, 9622851890Sopenharmony_ci DRM_EXYNOS_IPP_CAP_CONVERT = 0x08, 9722851890Sopenharmony_ci}; 9822851890Sopenharmony_cistruct drm_exynos_ioctl_ipp_get_caps { 9922851890Sopenharmony_ci __u32 ipp_id; 10022851890Sopenharmony_ci __u32 capabilities; 10122851890Sopenharmony_ci __u32 reserved; 10222851890Sopenharmony_ci __u32 formats_count; 10322851890Sopenharmony_ci __u64 formats_ptr; 10422851890Sopenharmony_ci}; 10522851890Sopenharmony_cienum drm_exynos_ipp_limit_type { 10622851890Sopenharmony_ci 10722851890Sopenharmony_ci DRM_EXYNOS_IPP_LIMIT_TYPE_SIZE = 0x0001, 10822851890Sopenharmony_ci 10922851890Sopenharmony_ci DRM_EXYNOS_IPP_LIMIT_TYPE_SCALE = 0x0002, 11022851890Sopenharmony_ci 11122851890Sopenharmony_ci DRM_EXYNOS_IPP_LIMIT_SIZE_BUFFER = 0x0001 << 16, 11222851890Sopenharmony_ci 11322851890Sopenharmony_ci DRM_EXYNOS_IPP_LIMIT_SIZE_AREA = 0x0002 << 16, 11422851890Sopenharmony_ci 11522851890Sopenharmony_ci DRM_EXYNOS_IPP_LIMIT_SIZE_ROTATED = 0x0003 << 16, 11622851890Sopenharmony_ci DRM_EXYNOS_IPP_LIMIT_TYPE_MASK = 0x000f, 11722851890Sopenharmony_ci DRM_EXYNOS_IPP_LIMIT_SIZE_MASK = 0x000f << 16, 11822851890Sopenharmony_ci}; 11922851890Sopenharmony_cistruct drm_exynos_ipp_limit_val { 12022851890Sopenharmony_ci __u32 min; 12122851890Sopenharmony_ci __u32 max; 12222851890Sopenharmony_ci __u32 align; 12322851890Sopenharmony_ci __u32 reserved; 12422851890Sopenharmony_ci}; 12522851890Sopenharmony_cistruct drm_exynos_ipp_limit { 12622851890Sopenharmony_ci __u32 type; 12722851890Sopenharmony_ci __u32 reserved; 12822851890Sopenharmony_ci struct drm_exynos_ipp_limit_val h; 12922851890Sopenharmony_ci struct drm_exynos_ipp_limit_val v; 13022851890Sopenharmony_ci}; 13122851890Sopenharmony_cistruct drm_exynos_ioctl_ipp_get_limits { 13222851890Sopenharmony_ci __u32 ipp_id; 13322851890Sopenharmony_ci __u32 fourcc; 13422851890Sopenharmony_ci __u64 modifier; 13522851890Sopenharmony_ci __u32 type; 13622851890Sopenharmony_ci __u32 limits_count; 13722851890Sopenharmony_ci __u64 limits_ptr; 13822851890Sopenharmony_ci}; 13922851890Sopenharmony_cienum drm_exynos_ipp_task_id { 14022851890Sopenharmony_ci 14122851890Sopenharmony_ci DRM_EXYNOS_IPP_TASK_BUFFER = 0x0001, 14222851890Sopenharmony_ci 14322851890Sopenharmony_ci DRM_EXYNOS_IPP_TASK_RECTANGLE = 0x0002, 14422851890Sopenharmony_ci 14522851890Sopenharmony_ci DRM_EXYNOS_IPP_TASK_TRANSFORM = 0x0003, 14622851890Sopenharmony_ci 14722851890Sopenharmony_ci DRM_EXYNOS_IPP_TASK_ALPHA = 0x0004, 14822851890Sopenharmony_ci 14922851890Sopenharmony_ci DRM_EXYNOS_IPP_TASK_TYPE_SOURCE = 0x0001 << 16, 15022851890Sopenharmony_ci 15122851890Sopenharmony_ci DRM_EXYNOS_IPP_TASK_TYPE_DESTINATION = 0x0002 << 16, 15222851890Sopenharmony_ci}; 15322851890Sopenharmony_cistruct drm_exynos_ipp_task_buffer { 15422851890Sopenharmony_ci __u32 id; 15522851890Sopenharmony_ci __u32 fourcc; 15622851890Sopenharmony_ci __u32 width, height; 15722851890Sopenharmony_ci __u32 gem_id[4]; 15822851890Sopenharmony_ci __u32 offset[4]; 15922851890Sopenharmony_ci __u32 pitch[4]; 16022851890Sopenharmony_ci __u64 modifier; 16122851890Sopenharmony_ci}; 16222851890Sopenharmony_cistruct drm_exynos_ipp_task_rect { 16322851890Sopenharmony_ci __u32 id; 16422851890Sopenharmony_ci __u32 reserved; 16522851890Sopenharmony_ci __u32 x; 16622851890Sopenharmony_ci __u32 y; 16722851890Sopenharmony_ci __u32 w; 16822851890Sopenharmony_ci __u32 h; 16922851890Sopenharmony_ci}; 17022851890Sopenharmony_cistruct drm_exynos_ipp_task_transform { 17122851890Sopenharmony_ci __u32 id; 17222851890Sopenharmony_ci __u32 rotation; 17322851890Sopenharmony_ci}; 17422851890Sopenharmony_cistruct drm_exynos_ipp_task_alpha { 17522851890Sopenharmony_ci __u32 id; 17622851890Sopenharmony_ci __u32 value; 17722851890Sopenharmony_ci}; 17822851890Sopenharmony_cienum drm_exynos_ipp_flag { 17922851890Sopenharmony_ci 18022851890Sopenharmony_ci DRM_EXYNOS_IPP_FLAG_EVENT = 0x01, 18122851890Sopenharmony_ci 18222851890Sopenharmony_ci DRM_EXYNOS_IPP_FLAG_TEST_ONLY = 0x02, 18322851890Sopenharmony_ci 18422851890Sopenharmony_ci DRM_EXYNOS_IPP_FLAG_NONBLOCK = 0x04, 18522851890Sopenharmony_ci}; 18622851890Sopenharmony_ci#define DRM_EXYNOS_IPP_FLAGS (DRM_EXYNOS_IPP_FLAG_EVENT |\ 18722851890Sopenharmony_ci DRM_EXYNOS_IPP_FLAG_TEST_ONLY | DRM_EXYNOS_IPP_FLAG_NONBLOCK) 18822851890Sopenharmony_cistruct drm_exynos_ioctl_ipp_commit { 18922851890Sopenharmony_ci __u32 ipp_id; 19022851890Sopenharmony_ci __u32 flags; 19122851890Sopenharmony_ci __u32 reserved; 19222851890Sopenharmony_ci __u32 params_size; 19322851890Sopenharmony_ci __u64 params_ptr; 19422851890Sopenharmony_ci __u64 user_data; 19522851890Sopenharmony_ci}; 19622851890Sopenharmony_ci#define DRM_EXYNOS_GEM_CREATE 0x00 19722851890Sopenharmony_ci#define DRM_EXYNOS_GEM_MAP 0x01 19822851890Sopenharmony_ci#define DRM_EXYNOS_GEM_GET 0x04 19922851890Sopenharmony_ci#define DRM_EXYNOS_VIDI_CONNECTION 0x07 20022851890Sopenharmony_ci#define DRM_EXYNOS_G2D_GET_VER 0x20 20122851890Sopenharmony_ci#define DRM_EXYNOS_G2D_SET_CMDLIST 0x21 20222851890Sopenharmony_ci#define DRM_EXYNOS_G2D_EXEC 0x22 20322851890Sopenharmony_ci#define DRM_EXYNOS_IPP_GET_RESOURCES 0x40 20422851890Sopenharmony_ci#define DRM_EXYNOS_IPP_GET_CAPS 0x41 20522851890Sopenharmony_ci#define DRM_EXYNOS_IPP_GET_LIMITS 0x42 20622851890Sopenharmony_ci#define DRM_EXYNOS_IPP_COMMIT 0x43 20722851890Sopenharmony_ci#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \ 20822851890Sopenharmony_ci DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create) 20922851890Sopenharmony_ci#define DRM_IOCTL_EXYNOS_GEM_MAP DRM_IOWR(DRM_COMMAND_BASE + \ 21022851890Sopenharmony_ci DRM_EXYNOS_GEM_MAP, struct drm_exynos_gem_map) 21122851890Sopenharmony_ci#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \ 21222851890Sopenharmony_ci DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info) 21322851890Sopenharmony_ci#define DRM_IOCTL_EXYNOS_VIDI_CONNECTION DRM_IOWR(DRM_COMMAND_BASE + \ 21422851890Sopenharmony_ci DRM_EXYNOS_VIDI_CONNECTION, struct drm_exynos_vidi_connection) 21522851890Sopenharmony_ci#define DRM_IOCTL_EXYNOS_G2D_GET_VER DRM_IOWR(DRM_COMMAND_BASE + \ 21622851890Sopenharmony_ci DRM_EXYNOS_G2D_GET_VER, struct drm_exynos_g2d_get_ver) 21722851890Sopenharmony_ci#define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST DRM_IOWR(DRM_COMMAND_BASE + \ 21822851890Sopenharmony_ci DRM_EXYNOS_G2D_SET_CMDLIST, struct drm_exynos_g2d_set_cmdlist) 21922851890Sopenharmony_ci#define DRM_IOCTL_EXYNOS_G2D_EXEC DRM_IOWR(DRM_COMMAND_BASE + \ 22022851890Sopenharmony_ci DRM_EXYNOS_G2D_EXEC, struct drm_exynos_g2d_exec) 22122851890Sopenharmony_ci#define DRM_IOCTL_EXYNOS_IPP_GET_RESOURCES DRM_IOWR(DRM_COMMAND_BASE + \ 22222851890Sopenharmony_ci DRM_EXYNOS_IPP_GET_RESOURCES, \ 22322851890Sopenharmony_ci struct drm_exynos_ioctl_ipp_get_res) 22422851890Sopenharmony_ci#define DRM_IOCTL_EXYNOS_IPP_GET_CAPS DRM_IOWR(DRM_COMMAND_BASE + \ 22522851890Sopenharmony_ci DRM_EXYNOS_IPP_GET_CAPS, struct drm_exynos_ioctl_ipp_get_caps) 22622851890Sopenharmony_ci#define DRM_IOCTL_EXYNOS_IPP_GET_LIMITS DRM_IOWR(DRM_COMMAND_BASE + \ 22722851890Sopenharmony_ci DRM_EXYNOS_IPP_GET_LIMITS, \ 22822851890Sopenharmony_ci struct drm_exynos_ioctl_ipp_get_limits) 22922851890Sopenharmony_ci#define DRM_IOCTL_EXYNOS_IPP_COMMIT DRM_IOWR(DRM_COMMAND_BASE + \ 23022851890Sopenharmony_ci DRM_EXYNOS_IPP_COMMIT, struct drm_exynos_ioctl_ipp_commit) 23122851890Sopenharmony_ci#define DRM_EXYNOS_G2D_EVENT 0x80000000 23222851890Sopenharmony_ci#define DRM_EXYNOS_IPP_EVENT 0x80000002 23322851890Sopenharmony_cistruct drm_exynos_g2d_event { 23422851890Sopenharmony_ci struct drm_event base; 23522851890Sopenharmony_ci __u64 user_data; 23622851890Sopenharmony_ci __u32 tv_sec; 23722851890Sopenharmony_ci __u32 tv_usec; 23822851890Sopenharmony_ci __u32 cmdlist_no; 23922851890Sopenharmony_ci __u32 reserved; 24022851890Sopenharmony_ci}; 24122851890Sopenharmony_cistruct drm_exynos_ipp_event { 24222851890Sopenharmony_ci struct drm_event base; 24322851890Sopenharmony_ci __u64 user_data; 24422851890Sopenharmony_ci __u32 tv_sec; 24522851890Sopenharmony_ci __u32 tv_usec; 24622851890Sopenharmony_ci __u32 ipp_id; 24722851890Sopenharmony_ci __u32 sequence; 24822851890Sopenharmony_ci __u64 reserved; 24922851890Sopenharmony_ci}; 25022851890Sopenharmony_ci#if defined(__cplusplus) 25122851890Sopenharmony_ci} 25222851890Sopenharmony_ci#endif 25322851890Sopenharmony_ci#endif 254