blob: d601c5b7684635211ac774176acf3c0283f25756 [file] [log] [blame]
Christopher Ferris38062f92014-07-09 15:33:25 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef __MSM_DRM_H__
20#define __MSM_DRM_H__
Christopher Ferris106b3a82016-08-24 12:15:38 -070021#include "drm.h"
22#ifdef __cplusplus
Christopher Ferris38062f92014-07-09 15:33:25 -070023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070024#endif
Christopher Ferris38062f92014-07-09 15:33:25 -070025#define MSM_PIPE_NONE 0x00
26#define MSM_PIPE_2D0 0x01
27#define MSM_PIPE_2D1 0x02
Christopher Ferris38062f92014-07-09 15:33:25 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070029#define MSM_PIPE_3D0 0x10
Christopher Ferris6a9755d2017-01-13 14:09:31 -080030#define MSM_PIPE_ID_MASK 0xffff
31#define MSM_PIPE_ID(x) ((x) & MSM_PIPE_ID_MASK)
32#define MSM_PIPE_FLAGS(x) ((x) & ~MSM_PIPE_ID_MASK)
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070034struct drm_msm_timespec {
Christopher Ferris05d08e92016-02-04 13:16:38 -080035 __s64 tv_sec;
36 __s64 tv_nsec;
Christopher Ferris106b3a82016-08-24 12:15:38 -070037};
Christopher Ferris6a9755d2017-01-13 14:09:31 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070039#define MSM_PARAM_GPU_ID 0x01
40#define MSM_PARAM_GMEM_SIZE 0x02
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070041#define MSM_PARAM_CHIP_ID 0x03
Christopher Ferris106b3a82016-08-24 12:15:38 -070042#define MSM_PARAM_MAX_FREQ 0x04
Christopher Ferris6a9755d2017-01-13 14:09:31 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070044#define MSM_PARAM_TIMESTAMP 0x05
45struct drm_msm_param {
Christopher Ferris05d08e92016-02-04 13:16:38 -080046 __u32 pipe;
47 __u32 param;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080049 __u64 value;
Christopher Ferris38062f92014-07-09 15:33:25 -070050};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070051#define MSM_BO_SCANOUT 0x00000001
Christopher Ferris38062f92014-07-09 15:33:25 -070052#define MSM_BO_GPU_READONLY 0x00000002
Christopher Ferris6a9755d2017-01-13 14:09:31 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070054#define MSM_BO_CACHE_MASK 0x000f0000
55#define MSM_BO_CACHED 0x00010000
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070056#define MSM_BO_WC 0x00020000
Christopher Ferris38062f92014-07-09 15:33:25 -070057#define MSM_BO_UNCACHED 0x00040000
Christopher Ferris6a9755d2017-01-13 14:09:31 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080059#define MSM_BO_FLAGS (MSM_BO_SCANOUT | MSM_BO_GPU_READONLY | MSM_BO_CACHED | MSM_BO_WC | MSM_BO_UNCACHED)
Christopher Ferris38062f92014-07-09 15:33:25 -070060struct drm_msm_gem_new {
Christopher Ferris05d08e92016-02-04 13:16:38 -080061 __u64 size;
62 __u32 flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080064 __u32 handle;
Christopher Ferris38062f92014-07-09 15:33:25 -070065};
66struct drm_msm_gem_info {
Christopher Ferris05d08e92016-02-04 13:16:38 -080067 __u32 handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080069 __u32 pad;
70 __u64 offset;
Christopher Ferris38062f92014-07-09 15:33:25 -070071};
72#define MSM_PREP_READ 0x01
Christopher Ferris6a9755d2017-01-13 14:09:31 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070074#define MSM_PREP_WRITE 0x02
75#define MSM_PREP_NOSYNC 0x04
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070076#define MSM_PREP_FLAGS (MSM_PREP_READ | MSM_PREP_WRITE | MSM_PREP_NOSYNC)
Christopher Ferris38062f92014-07-09 15:33:25 -070077struct drm_msm_gem_cpu_prep {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080079 __u32 handle;
80 __u32 op;
Tao Baod7db5942015-01-28 10:07:51 -080081 struct drm_msm_timespec timeout;
Christopher Ferris38062f92014-07-09 15:33:25 -070082};
Christopher Ferris6a9755d2017-01-13 14:09:31 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070084struct drm_msm_gem_cpu_fini {
Christopher Ferris05d08e92016-02-04 13:16:38 -080085 __u32 handle;
Christopher Ferris38062f92014-07-09 15:33:25 -070086};
87struct drm_msm_gem_submit_reloc {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080089 __u32 submit_offset;
90 __u32 or;
Christopher Ferris05d08e92016-02-04 13:16:38 -080091 __s32 shift;
92 __u32 reloc_idx;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080094 __u64 reloc_offset;
Christopher Ferris38062f92014-07-09 15:33:25 -070095};
96#define MSM_SUBMIT_CMD_BUF 0x0001
97#define MSM_SUBMIT_CMD_IB_TARGET_BUF 0x0002
Christopher Ferris6a9755d2017-01-13 14:09:31 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -070099#define MSM_SUBMIT_CMD_CTX_RESTORE_BUF 0x0003
Christopher Ferris38062f92014-07-09 15:33:25 -0700100struct drm_msm_gem_submit_cmd {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800101 __u32 type;
102 __u32 submit_idx;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800104 __u32 submit_offset;
105 __u32 size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800106 __u32 pad;
107 __u32 nr_relocs;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800109 __u64 __user relocs;
Christopher Ferris38062f92014-07-09 15:33:25 -0700110};
111#define MSM_SUBMIT_BO_READ 0x0001
112#define MSM_SUBMIT_BO_WRITE 0x0002
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700114#define MSM_SUBMIT_BO_FLAGS (MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_WRITE)
Christopher Ferris38062f92014-07-09 15:33:25 -0700115struct drm_msm_gem_submit_bo {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800116 __u32 flags;
117 __u32 handle;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800119 __u64 presumed;
Christopher Ferris38062f92014-07-09 15:33:25 -0700120};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800121#define MSM_SUBMIT_NO_IMPLICIT 0x80000000
122#define MSM_SUBMIT_FENCE_FD_IN 0x40000000
Christopher Ferris106b3a82016-08-24 12:15:38 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800124#define MSM_SUBMIT_FENCE_FD_OUT 0x20000000
125#define MSM_SUBMIT_FLAGS (MSM_SUBMIT_NO_IMPLICIT | MSM_SUBMIT_FENCE_FD_IN | MSM_SUBMIT_FENCE_FD_OUT | 0)
126struct drm_msm_gem_submit {
127 __u32 flags;
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800129 __u32 fence;
130 __u32 nr_bos;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800131 __u32 nr_cmds;
132 __u64 __user bos;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800134 __u64 __user cmds;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800135 __s32 fence_fd;
Christopher Ferris38062f92014-07-09 15:33:25 -0700136};
Christopher Ferris38062f92014-07-09 15:33:25 -0700137struct drm_msm_wait_fence {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800139 __u32 fence;
140 __u32 pad;
Tao Baod7db5942015-01-28 10:07:51 -0800141 struct drm_msm_timespec timeout;
Christopher Ferris38062f92014-07-09 15:33:25 -0700142};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris49f525c2016-12-12 14:55:36 -0800144#define MSM_MADV_WILLNEED 0
145#define MSM_MADV_DONTNEED 1
146#define __MSM_MADV_PURGED 2
147struct drm_msm_gem_madvise {
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 __u32 handle;
150 __u32 madv;
151 __u32 retained;
152};
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700154#define DRM_MSM_GET_PARAM 0x00
155#define DRM_MSM_GEM_NEW 0x02
156#define DRM_MSM_GEM_INFO 0x03
Christopher Ferris38062f92014-07-09 15:33:25 -0700157#define DRM_MSM_GEM_CPU_PREP 0x04
Christopher Ferris106b3a82016-08-24 12:15:38 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700159#define DRM_MSM_GEM_CPU_FINI 0x05
160#define DRM_MSM_GEM_SUBMIT 0x06
161#define DRM_MSM_WAIT_FENCE 0x07
Christopher Ferris49f525c2016-12-12 14:55:36 -0800162#define DRM_MSM_GEM_MADVISE 0x08
Christopher Ferris106b3a82016-08-24 12:15:38 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris49f525c2016-12-12 14:55:36 -0800164#define DRM_MSM_NUM_IOCTLS 0x09
Christopher Ferris38062f92014-07-09 15:33:25 -0700165#define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param)
166#define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new)
167#define DRM_IOCTL_MSM_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_INFO, struct drm_msm_gem_info)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris49f525c2016-12-12 14:55:36 -0800169#define DRM_IOCTL_MSM_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_PREP, struct drm_msm_gem_cpu_prep)
Tao Baod7db5942015-01-28 10:07:51 -0800170#define DRM_IOCTL_MSM_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_FINI, struct drm_msm_gem_cpu_fini)
Christopher Ferris38062f92014-07-09 15:33:25 -0700171#define DRM_IOCTL_MSM_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SUBMIT, struct drm_msm_gem_submit)
Tao Baod7db5942015-01-28 10:07:51 -0800172#define DRM_IOCTL_MSM_WAIT_FENCE DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_WAIT_FENCE, struct drm_msm_wait_fence)
Christopher Ferris38062f92014-07-09 15:33:25 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris49f525c2016-12-12 14:55:36 -0800174#define DRM_IOCTL_MSM_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_MADVISE, struct drm_msm_gem_madvise)
175#ifdef __cplusplus
Christopher Ferris38062f92014-07-09 15:33:25 -0700176#endif
Christopher Ferris106b3a82016-08-24 12:15:38 -0700177#endif
Christopher Ferris49f525c2016-12-12 14:55:36 -0800178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */