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 _V3D_DRM_H_
722851890Sopenharmony_ci#define _V3D_DRM_H_
822851890Sopenharmony_ci#include "drm.h"
922851890Sopenharmony_ci#if defined(__cplusplus)
1022851890Sopenharmony_ciextern "C" {
1122851890Sopenharmony_ci#endif
1222851890Sopenharmony_ci#define DRM_V3D_SUBMIT_CL                         0x00
1322851890Sopenharmony_ci#define DRM_V3D_WAIT_BO                           0x01
1422851890Sopenharmony_ci#define DRM_V3D_CREATE_BO                         0x02
1522851890Sopenharmony_ci#define DRM_V3D_MMAP_BO                           0x03
1622851890Sopenharmony_ci#define DRM_V3D_GET_PARAM                         0x04
1722851890Sopenharmony_ci#define DRM_V3D_GET_BO_OFFSET                     0x05
1822851890Sopenharmony_ci#define DRM_IOCTL_V3D_SUBMIT_CL           DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl)
1922851890Sopenharmony_ci#define DRM_IOCTL_V3D_WAIT_BO             DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo)
2022851890Sopenharmony_ci#define DRM_IOCTL_V3D_CREATE_BO           DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_CREATE_BO, struct drm_v3d_create_bo)
2122851890Sopenharmony_ci#define DRM_IOCTL_V3D_MMAP_BO             DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_MMAP_BO, struct drm_v3d_mmap_bo)
2222851890Sopenharmony_ci#define DRM_IOCTL_V3D_GET_PARAM           DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_PARAM, struct drm_v3d_get_param)
2322851890Sopenharmony_ci#define DRM_IOCTL_V3D_GET_BO_OFFSET       DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_BO_OFFSET, struct drm_v3d_get_bo_offset)
2422851890Sopenharmony_cistruct drm_v3d_submit_cl {
2522851890Sopenharmony_ci
2622851890Sopenharmony_ci	__u32 bcl_start;
2722851890Sopenharmony_ci
2822851890Sopenharmony_ci	__u32 bcl_end;
2922851890Sopenharmony_ci
3022851890Sopenharmony_ci	__u32 rcl_start;
3122851890Sopenharmony_ci
3222851890Sopenharmony_ci	__u32 rcl_end;
3322851890Sopenharmony_ci
3422851890Sopenharmony_ci	__u32 in_sync_bcl;
3522851890Sopenharmony_ci
3622851890Sopenharmony_ci	__u32 in_sync_rcl;
3722851890Sopenharmony_ci
3822851890Sopenharmony_ci	__u32 out_sync;
3922851890Sopenharmony_ci
4022851890Sopenharmony_ci	__u32 qma;
4122851890Sopenharmony_ci
4222851890Sopenharmony_ci	__u32 qms;
4322851890Sopenharmony_ci
4422851890Sopenharmony_ci	__u32 qts;
4522851890Sopenharmony_ci
4622851890Sopenharmony_ci	__u64 bo_handles;
4722851890Sopenharmony_ci
4822851890Sopenharmony_ci	__u32 bo_handle_count;
4922851890Sopenharmony_ci
5022851890Sopenharmony_ci	__u32 pad;
5122851890Sopenharmony_ci};
5222851890Sopenharmony_cistruct drm_v3d_wait_bo {
5322851890Sopenharmony_ci	__u32 handle;
5422851890Sopenharmony_ci	__u32 pad;
5522851890Sopenharmony_ci	__u64 timeout_ns;
5622851890Sopenharmony_ci};
5722851890Sopenharmony_cistruct drm_v3d_create_bo {
5822851890Sopenharmony_ci	__u32 size;
5922851890Sopenharmony_ci	__u32 flags;
6022851890Sopenharmony_ci
6122851890Sopenharmony_ci	__u32 handle;
6222851890Sopenharmony_ci
6322851890Sopenharmony_ci	__u32 offset;
6422851890Sopenharmony_ci};
6522851890Sopenharmony_cistruct drm_v3d_mmap_bo {
6622851890Sopenharmony_ci
6722851890Sopenharmony_ci	__u32 handle;
6822851890Sopenharmony_ci	__u32 flags;
6922851890Sopenharmony_ci
7022851890Sopenharmony_ci	__u64 offset;
7122851890Sopenharmony_ci};
7222851890Sopenharmony_cienum drm_v3d_param {
7322851890Sopenharmony_ci	DRM_V3D_PARAM_V3D_UIFCFG,
7422851890Sopenharmony_ci	DRM_V3D_PARAM_V3D_HUB_IDENT1,
7522851890Sopenharmony_ci	DRM_V3D_PARAM_V3D_HUB_IDENT2,
7622851890Sopenharmony_ci	DRM_V3D_PARAM_V3D_HUB_IDENT3,
7722851890Sopenharmony_ci	DRM_V3D_PARAM_V3D_CORE0_IDENT0,
7822851890Sopenharmony_ci	DRM_V3D_PARAM_V3D_CORE0_IDENT1,
7922851890Sopenharmony_ci	DRM_V3D_PARAM_V3D_CORE0_IDENT2,
8022851890Sopenharmony_ci};
8122851890Sopenharmony_cistruct drm_v3d_get_param {
8222851890Sopenharmony_ci	__u32 param;
8322851890Sopenharmony_ci	__u32 pad;
8422851890Sopenharmony_ci	__u64 value;
8522851890Sopenharmony_ci};
8622851890Sopenharmony_cistruct drm_v3d_get_bo_offset {
8722851890Sopenharmony_ci	__u32 handle;
8822851890Sopenharmony_ci	__u32 offset;
8922851890Sopenharmony_ci};
9022851890Sopenharmony_ci#if defined(__cplusplus)
9122851890Sopenharmony_ci}
9222851890Sopenharmony_ci#endif
9322851890Sopenharmony_ci#endif
94