blob: a5dd097957b2f6e4208574217f21a32bf5d17761 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -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 __SAVAGE_DRM_H__
20#define __SAVAGE_DRM_H__
Christopher Ferris106b3a82016-08-24 12:15:38 -070021#include "drm.h"
22#ifdef __cplusplus
Ben Cheng655a7c02013-10-16 16:09:24 -070023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris106b3a82016-08-24 12:15:38 -070024#endif
25#ifndef __SAVAGE_SAREA_DEFINES__
Christopher Ferris05d08e92016-02-04 13:16:38 -080026#define __SAVAGE_SAREA_DEFINES__
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define SAVAGE_CARD_HEAP 0
Christopher Ferris106b3a82016-08-24 12:15:38 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070029#define SAVAGE_AGP_HEAP 1
30#define SAVAGE_NR_TEX_HEAPS 2
Christopher Ferris05d08e92016-02-04 13:16:38 -080031#define SAVAGE_NR_TEX_REGIONS 16
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define SAVAGE_LOG_MIN_TEX_REGION_SIZE 16
Christopher Ferris106b3a82016-08-24 12:15:38 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070034#endif
35typedef struct _drm_savage_sarea {
Christopher Ferris05d08e92016-02-04 13:16:38 -080036 struct drm_tex_region texList[SAVAGE_NR_TEX_HEAPS][SAVAGE_NR_TEX_REGIONS + 1];
Tao Baod7db5942015-01-28 10:07:51 -080037 unsigned int texAge[SAVAGE_NR_TEX_HEAPS];
Christopher Ferris106b3a82016-08-24 12:15:38 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039 int ctxOwner;
40} drm_savage_sarea_t, * drm_savage_sarea_ptr;
Christopher Ferris05d08e92016-02-04 13:16:38 -080041#define DRM_SAVAGE_BCI_INIT 0x00
Ben Cheng655a7c02013-10-16 16:09:24 -070042#define DRM_SAVAGE_BCI_CMDBUF 0x01
Christopher Ferris106b3a82016-08-24 12:15:38 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070044#define DRM_SAVAGE_BCI_EVENT_EMIT 0x02
45#define DRM_SAVAGE_BCI_EVENT_WAIT 0x03
Christopher Ferris05d08e92016-02-04 13:16:38 -080046#define DRM_IOCTL_SAVAGE_BCI_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_INIT, drm_savage_init_t)
Tao Baod7db5942015-01-28 10:07:51 -080047#define DRM_IOCTL_SAVAGE_BCI_CMDBUF DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_CMDBUF, drm_savage_cmdbuf_t)
Christopher Ferris106b3a82016-08-24 12:15:38 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070049#define DRM_IOCTL_SAVAGE_BCI_EVENT_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_EMIT, drm_savage_event_emit_t)
Tao Baod7db5942015-01-28 10:07:51 -080050#define DRM_IOCTL_SAVAGE_BCI_EVENT_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_WAIT, drm_savage_event_wait_t)
Christopher Ferris05d08e92016-02-04 13:16:38 -080051#define SAVAGE_DMA_PCI 1
Ben Cheng655a7c02013-10-16 16:09:24 -070052#define SAVAGE_DMA_AGP 3
Christopher Ferris106b3a82016-08-24 12:15:38 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070054typedef struct drm_savage_init {
Tao Baod7db5942015-01-28 10:07:51 -080055 enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -080056 SAVAGE_INIT_BCI = 1,
Tao Baod7db5942015-01-28 10:07:51 -080057 SAVAGE_CLEANUP_BCI = 2
Christopher Ferris106b3a82016-08-24 12:15:38 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080059 } func;
60 unsigned int sarea_priv_offset;
Christopher Ferris05d08e92016-02-04 13:16:38 -080061 unsigned int cob_size;
Tao Baod7db5942015-01-28 10:07:51 -080062 unsigned int bci_threshold_lo, bci_threshold_hi;
Christopher Ferris106b3a82016-08-24 12:15:38 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064 unsigned int dma_type;
65 unsigned int fb_bpp;
Christopher Ferris05d08e92016-02-04 13:16:38 -080066 unsigned int front_offset, front_pitch;
Tao Baod7db5942015-01-28 10:07:51 -080067 unsigned int back_offset, back_pitch;
Christopher Ferris106b3a82016-08-24 12:15:38 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080069 unsigned int depth_bpp;
70 unsigned int depth_offset, depth_pitch;
Christopher Ferris05d08e92016-02-04 13:16:38 -080071 unsigned int texture_offset;
Tao Baod7db5942015-01-28 10:07:51 -080072 unsigned int texture_size;
Christopher Ferris106b3a82016-08-24 12:15:38 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 unsigned long status_offset;
75 unsigned long buffers_offset;
Christopher Ferris05d08e92016-02-04 13:16:38 -080076 unsigned long agp_textures_offset;
Tao Baod7db5942015-01-28 10:07:51 -080077 unsigned long cmd_dma_offset;
Christopher Ferris106b3a82016-08-24 12:15:38 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070079} drm_savage_init_t;
80typedef union drm_savage_cmd_header drm_savage_cmd_header_t;
Christopher Ferris05d08e92016-02-04 13:16:38 -080081typedef struct drm_savage_cmdbuf {
Tao Baod7db5942015-01-28 10:07:51 -080082 drm_savage_cmd_header_t __user * cmd_addr;
Christopher Ferris106b3a82016-08-24 12:15:38 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084 unsigned int size;
85 unsigned int dma_idx;
Christopher Ferris05d08e92016-02-04 13:16:38 -080086 int discard;
Tao Baod7db5942015-01-28 10:07:51 -080087 unsigned int __user * vb_addr;
Christopher Ferris106b3a82016-08-24 12:15:38 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089 unsigned int vb_size;
90 unsigned int vb_stride;
Christopher Ferris05d08e92016-02-04 13:16:38 -080091 struct drm_clip_rect __user * box_addr;
Tao Baod7db5942015-01-28 10:07:51 -080092 unsigned int nbox;
Christopher Ferris106b3a82016-08-24 12:15:38 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070094} drm_savage_cmdbuf_t;
95#define SAVAGE_WAIT_2D 0x1
Christopher Ferris05d08e92016-02-04 13:16:38 -080096#define SAVAGE_WAIT_3D 0x2
Ben Cheng655a7c02013-10-16 16:09:24 -070097#define SAVAGE_WAIT_IRQ 0x4
Christopher Ferris106b3a82016-08-24 12:15:38 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070099typedef struct drm_savage_event {
Tao Baod7db5942015-01-28 10:07:51 -0800100 unsigned int count;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800101 unsigned int flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700102} drm_savage_event_emit_t, drm_savage_event_wait_t;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700104#define SAVAGE_CMD_STATE 0
105#define SAVAGE_CMD_DMA_PRIM 1
Christopher Ferris05d08e92016-02-04 13:16:38 -0800106#define SAVAGE_CMD_VB_PRIM 2
Ben Cheng655a7c02013-10-16 16:09:24 -0700107#define SAVAGE_CMD_DMA_IDX 3
Christopher Ferris106b3a82016-08-24 12:15:38 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700109#define SAVAGE_CMD_VB_IDX 4
110#define SAVAGE_CMD_CLEAR 5
Christopher Ferris05d08e92016-02-04 13:16:38 -0800111#define SAVAGE_CMD_SWAP 6
Ben Cheng655a7c02013-10-16 16:09:24 -0700112#define SAVAGE_PRIM_TRILIST 0
Christopher Ferris106b3a82016-08-24 12:15:38 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700114#define SAVAGE_PRIM_TRISTRIP 1
115#define SAVAGE_PRIM_TRIFAN 2
Christopher Ferris05d08e92016-02-04 13:16:38 -0800116#define SAVAGE_PRIM_TRILIST_201 3
Ben Cheng655a7c02013-10-16 16:09:24 -0700117#define SAVAGE_SKIP_Z 0x01
Christopher Ferris106b3a82016-08-24 12:15:38 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700119#define SAVAGE_SKIP_W 0x02
120#define SAVAGE_SKIP_C0 0x04
Christopher Ferris05d08e92016-02-04 13:16:38 -0800121#define SAVAGE_SKIP_C1 0x08
Ben Cheng655a7c02013-10-16 16:09:24 -0700122#define SAVAGE_SKIP_S0 0x10
Christopher Ferris106b3a82016-08-24 12:15:38 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700124#define SAVAGE_SKIP_T0 0x20
125#define SAVAGE_SKIP_ST0 0x30
Christopher Ferris05d08e92016-02-04 13:16:38 -0800126#define SAVAGE_SKIP_S1 0x40
Ben Cheng655a7c02013-10-16 16:09:24 -0700127#define SAVAGE_SKIP_T1 0x80
Christopher Ferris106b3a82016-08-24 12:15:38 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700129#define SAVAGE_SKIP_ST1 0xc0
130#define SAVAGE_SKIP_ALL_S3D 0x3f
Christopher Ferris05d08e92016-02-04 13:16:38 -0800131#define SAVAGE_SKIP_ALL_S4 0xff
Ben Cheng655a7c02013-10-16 16:09:24 -0700132#define SAVAGE_FRONT 0x1
Christopher Ferris106b3a82016-08-24 12:15:38 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700134#define SAVAGE_BACK 0x2
135#define SAVAGE_DEPTH 0x4
Christopher Ferris05d08e92016-02-04 13:16:38 -0800136union drm_savage_cmd_header {
Tao Baod7db5942015-01-28 10:07:51 -0800137 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800139 unsigned char cmd;
140 unsigned char pad0;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800141 unsigned short pad1;
Tao Baod7db5942015-01-28 10:07:51 -0800142 unsigned short pad2;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800144 unsigned short pad3;
145 } cmd;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800146 struct {
Tao Baod7db5942015-01-28 10:07:51 -0800147 unsigned char cmd;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800149 unsigned char global;
150 unsigned short count;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800151 unsigned short start;
Tao Baod7db5942015-01-28 10:07:51 -0800152 unsigned short pad3;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800154 } state;
155 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800156 unsigned char cmd;
Tao Baod7db5942015-01-28 10:07:51 -0800157 unsigned char prim;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800159 unsigned short skip;
160 unsigned short count;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800161 unsigned short start;
Tao Baod7db5942015-01-28 10:07:51 -0800162 } prim;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800164 struct {
165 unsigned char cmd;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800166 unsigned char prim;
Tao Baod7db5942015-01-28 10:07:51 -0800167 unsigned short skip;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800169 unsigned short count;
170 unsigned short pad3;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800171 } idx;
Tao Baod7db5942015-01-28 10:07:51 -0800172 struct {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800174 unsigned char cmd;
175 unsigned char pad0;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800176 unsigned short pad1;
Tao Baod7db5942015-01-28 10:07:51 -0800177 unsigned int flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800179 } clear0;
180 struct {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800181 unsigned int mask;
Tao Baod7db5942015-01-28 10:07:51 -0800182 unsigned int value;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800184 } clear1;
Ben Cheng655a7c02013-10-16 16:09:24 -0700185};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700186#ifdef __cplusplus
187#endif
Tao Baod7db5942015-01-28 10:07:51 -0800188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800189#endif