18c2ecf20Sopenharmony_ci/* r128_drm.h -- Public header for the r128 driver -*- linux-c -*- 28c2ecf20Sopenharmony_ci * Created: Wed Apr 5 19:24:19 2000 by kevin@precisioninsight.com 38c2ecf20Sopenharmony_ci */ 48c2ecf20Sopenharmony_ci/* 58c2ecf20Sopenharmony_ci * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. 68c2ecf20Sopenharmony_ci * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 78c2ecf20Sopenharmony_ci * All rights reserved. 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 108c2ecf20Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 118c2ecf20Sopenharmony_ci * to deal in the Software without restriction, including without limitation 128c2ecf20Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 138c2ecf20Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 148c2ecf20Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 158c2ecf20Sopenharmony_ci * 168c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice (including the next 178c2ecf20Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the 188c2ecf20Sopenharmony_ci * Software. 198c2ecf20Sopenharmony_ci * 208c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 218c2ecf20Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 228c2ecf20Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 238c2ecf20Sopenharmony_ci * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 248c2ecf20Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 258c2ecf20Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 268c2ecf20Sopenharmony_ci * DEALINGS IN THE SOFTWARE. 278c2ecf20Sopenharmony_ci * 288c2ecf20Sopenharmony_ci * Authors: 298c2ecf20Sopenharmony_ci * Gareth Hughes <gareth@valinux.com> 308c2ecf20Sopenharmony_ci * Kevin E. Martin <martin@valinux.com> 318c2ecf20Sopenharmony_ci */ 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#ifndef __R128_DRM_H__ 348c2ecf20Sopenharmony_ci#define __R128_DRM_H__ 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#include "drm.h" 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#if defined(__cplusplus) 398c2ecf20Sopenharmony_ciextern "C" { 408c2ecf20Sopenharmony_ci#endif 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci/* WARNING: If you change any of these defines, make sure to change the 438c2ecf20Sopenharmony_ci * defines in the X server file (r128_sarea.h) 448c2ecf20Sopenharmony_ci */ 458c2ecf20Sopenharmony_ci#ifndef __R128_SAREA_DEFINES__ 468c2ecf20Sopenharmony_ci#define __R128_SAREA_DEFINES__ 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci/* What needs to be changed for the current vertex buffer? 498c2ecf20Sopenharmony_ci */ 508c2ecf20Sopenharmony_ci#define R128_UPLOAD_CONTEXT 0x001 518c2ecf20Sopenharmony_ci#define R128_UPLOAD_SETUP 0x002 528c2ecf20Sopenharmony_ci#define R128_UPLOAD_TEX0 0x004 538c2ecf20Sopenharmony_ci#define R128_UPLOAD_TEX1 0x008 548c2ecf20Sopenharmony_ci#define R128_UPLOAD_TEX0IMAGES 0x010 558c2ecf20Sopenharmony_ci#define R128_UPLOAD_TEX1IMAGES 0x020 568c2ecf20Sopenharmony_ci#define R128_UPLOAD_CORE 0x040 578c2ecf20Sopenharmony_ci#define R128_UPLOAD_MASKS 0x080 588c2ecf20Sopenharmony_ci#define R128_UPLOAD_WINDOW 0x100 598c2ecf20Sopenharmony_ci#define R128_UPLOAD_CLIPRECTS 0x200 /* handled client-side */ 608c2ecf20Sopenharmony_ci#define R128_REQUIRE_QUIESCENCE 0x400 618c2ecf20Sopenharmony_ci#define R128_UPLOAD_ALL 0x7ff 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci#define R128_FRONT 0x1 648c2ecf20Sopenharmony_ci#define R128_BACK 0x2 658c2ecf20Sopenharmony_ci#define R128_DEPTH 0x4 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci/* Primitive types 688c2ecf20Sopenharmony_ci */ 698c2ecf20Sopenharmony_ci#define R128_POINTS 0x1 708c2ecf20Sopenharmony_ci#define R128_LINES 0x2 718c2ecf20Sopenharmony_ci#define R128_LINE_STRIP 0x3 728c2ecf20Sopenharmony_ci#define R128_TRIANGLES 0x4 738c2ecf20Sopenharmony_ci#define R128_TRIANGLE_FAN 0x5 748c2ecf20Sopenharmony_ci#define R128_TRIANGLE_STRIP 0x6 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci/* Vertex/indirect buffer size 778c2ecf20Sopenharmony_ci */ 788c2ecf20Sopenharmony_ci#define R128_BUFFER_SIZE 16384 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci/* Byte offsets for indirect buffer data 818c2ecf20Sopenharmony_ci */ 828c2ecf20Sopenharmony_ci#define R128_INDEX_PRIM_OFFSET 20 838c2ecf20Sopenharmony_ci#define R128_HOSTDATA_BLIT_OFFSET 32 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci/* Keep these small for testing. 868c2ecf20Sopenharmony_ci */ 878c2ecf20Sopenharmony_ci#define R128_NR_SAREA_CLIPRECTS 12 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci/* There are 2 heaps (local/AGP). Each region within a heap is a 908c2ecf20Sopenharmony_ci * minimum of 64k, and there are at most 64 of them per heap. 918c2ecf20Sopenharmony_ci */ 928c2ecf20Sopenharmony_ci#define R128_LOCAL_TEX_HEAP 0 938c2ecf20Sopenharmony_ci#define R128_AGP_TEX_HEAP 1 948c2ecf20Sopenharmony_ci#define R128_NR_TEX_HEAPS 2 958c2ecf20Sopenharmony_ci#define R128_NR_TEX_REGIONS 64 968c2ecf20Sopenharmony_ci#define R128_LOG_TEX_GRANULARITY 16 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci#define R128_NR_CONTEXT_REGS 12 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci#define R128_MAX_TEXTURE_LEVELS 11 1018c2ecf20Sopenharmony_ci#define R128_MAX_TEXTURE_UNITS 2 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci#endif /* __R128_SAREA_DEFINES__ */ 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_citypedef struct { 1068c2ecf20Sopenharmony_ci /* Context state - can be written in one large chunk */ 1078c2ecf20Sopenharmony_ci unsigned int dst_pitch_offset_c; 1088c2ecf20Sopenharmony_ci unsigned int dp_gui_master_cntl_c; 1098c2ecf20Sopenharmony_ci unsigned int sc_top_left_c; 1108c2ecf20Sopenharmony_ci unsigned int sc_bottom_right_c; 1118c2ecf20Sopenharmony_ci unsigned int z_offset_c; 1128c2ecf20Sopenharmony_ci unsigned int z_pitch_c; 1138c2ecf20Sopenharmony_ci unsigned int z_sten_cntl_c; 1148c2ecf20Sopenharmony_ci unsigned int tex_cntl_c; 1158c2ecf20Sopenharmony_ci unsigned int misc_3d_state_cntl_reg; 1168c2ecf20Sopenharmony_ci unsigned int texture_clr_cmp_clr_c; 1178c2ecf20Sopenharmony_ci unsigned int texture_clr_cmp_msk_c; 1188c2ecf20Sopenharmony_ci unsigned int fog_color_c; 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci /* Texture state */ 1218c2ecf20Sopenharmony_ci unsigned int tex_size_pitch_c; 1228c2ecf20Sopenharmony_ci unsigned int constant_color_c; 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci /* Setup state */ 1258c2ecf20Sopenharmony_ci unsigned int pm4_vc_fpu_setup; 1268c2ecf20Sopenharmony_ci unsigned int setup_cntl; 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_ci /* Mask state */ 1298c2ecf20Sopenharmony_ci unsigned int dp_write_mask; 1308c2ecf20Sopenharmony_ci unsigned int sten_ref_mask_c; 1318c2ecf20Sopenharmony_ci unsigned int plane_3d_mask_c; 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci /* Window state */ 1348c2ecf20Sopenharmony_ci unsigned int window_xy_offset; 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci /* Core state */ 1378c2ecf20Sopenharmony_ci unsigned int scale_3d_cntl; 1388c2ecf20Sopenharmony_ci} drm_r128_context_regs_t; 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ci/* Setup registers for each texture unit 1418c2ecf20Sopenharmony_ci */ 1428c2ecf20Sopenharmony_citypedef struct { 1438c2ecf20Sopenharmony_ci unsigned int tex_cntl; 1448c2ecf20Sopenharmony_ci unsigned int tex_combine_cntl; 1458c2ecf20Sopenharmony_ci unsigned int tex_size_pitch; 1468c2ecf20Sopenharmony_ci unsigned int tex_offset[R128_MAX_TEXTURE_LEVELS]; 1478c2ecf20Sopenharmony_ci unsigned int tex_border_color; 1488c2ecf20Sopenharmony_ci} drm_r128_texture_regs_t; 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_citypedef struct drm_r128_sarea { 1518c2ecf20Sopenharmony_ci /* The channel for communication of state information to the kernel 1528c2ecf20Sopenharmony_ci * on firing a vertex buffer. 1538c2ecf20Sopenharmony_ci */ 1548c2ecf20Sopenharmony_ci drm_r128_context_regs_t context_state; 1558c2ecf20Sopenharmony_ci drm_r128_texture_regs_t tex_state[R128_MAX_TEXTURE_UNITS]; 1568c2ecf20Sopenharmony_ci unsigned int dirty; 1578c2ecf20Sopenharmony_ci unsigned int vertsize; 1588c2ecf20Sopenharmony_ci unsigned int vc_format; 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_ci /* The current cliprects, or a subset thereof. 1618c2ecf20Sopenharmony_ci */ 1628c2ecf20Sopenharmony_ci struct drm_clip_rect boxes[R128_NR_SAREA_CLIPRECTS]; 1638c2ecf20Sopenharmony_ci unsigned int nbox; 1648c2ecf20Sopenharmony_ci 1658c2ecf20Sopenharmony_ci /* Counters for client-side throttling of rendering clients. 1668c2ecf20Sopenharmony_ci */ 1678c2ecf20Sopenharmony_ci unsigned int last_frame; 1688c2ecf20Sopenharmony_ci unsigned int last_dispatch; 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ci struct drm_tex_region tex_list[R128_NR_TEX_HEAPS][R128_NR_TEX_REGIONS + 1]; 1718c2ecf20Sopenharmony_ci unsigned int tex_age[R128_NR_TEX_HEAPS]; 1728c2ecf20Sopenharmony_ci int ctx_owner; 1738c2ecf20Sopenharmony_ci int pfAllowPageFlip; /* number of 3d windows (0,1,2 or more) */ 1748c2ecf20Sopenharmony_ci int pfCurrentPage; /* which buffer is being displayed? */ 1758c2ecf20Sopenharmony_ci} drm_r128_sarea_t; 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_ci/* WARNING: If you change any of these defines, make sure to change the 1788c2ecf20Sopenharmony_ci * defines in the Xserver file (xf86drmR128.h) 1798c2ecf20Sopenharmony_ci */ 1808c2ecf20Sopenharmony_ci 1818c2ecf20Sopenharmony_ci/* Rage 128 specific ioctls 1828c2ecf20Sopenharmony_ci * The device specific ioctl range is 0x40 to 0x79. 1838c2ecf20Sopenharmony_ci */ 1848c2ecf20Sopenharmony_ci#define DRM_R128_INIT 0x00 1858c2ecf20Sopenharmony_ci#define DRM_R128_CCE_START 0x01 1868c2ecf20Sopenharmony_ci#define DRM_R128_CCE_STOP 0x02 1878c2ecf20Sopenharmony_ci#define DRM_R128_CCE_RESET 0x03 1888c2ecf20Sopenharmony_ci#define DRM_R128_CCE_IDLE 0x04 1898c2ecf20Sopenharmony_ci/* 0x05 not used */ 1908c2ecf20Sopenharmony_ci#define DRM_R128_RESET 0x06 1918c2ecf20Sopenharmony_ci#define DRM_R128_SWAP 0x07 1928c2ecf20Sopenharmony_ci#define DRM_R128_CLEAR 0x08 1938c2ecf20Sopenharmony_ci#define DRM_R128_VERTEX 0x09 1948c2ecf20Sopenharmony_ci#define DRM_R128_INDICES 0x0a 1958c2ecf20Sopenharmony_ci#define DRM_R128_BLIT 0x0b 1968c2ecf20Sopenharmony_ci#define DRM_R128_DEPTH 0x0c 1978c2ecf20Sopenharmony_ci#define DRM_R128_STIPPLE 0x0d 1988c2ecf20Sopenharmony_ci/* 0x0e not used */ 1998c2ecf20Sopenharmony_ci#define DRM_R128_INDIRECT 0x0f 2008c2ecf20Sopenharmony_ci#define DRM_R128_FULLSCREEN 0x10 2018c2ecf20Sopenharmony_ci#define DRM_R128_CLEAR2 0x11 2028c2ecf20Sopenharmony_ci#define DRM_R128_GETPARAM 0x12 2038c2ecf20Sopenharmony_ci#define DRM_R128_FLIP 0x13 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_R128_INIT, drm_r128_init_t) 2068c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_CCE_START DRM_IO( DRM_COMMAND_BASE + DRM_R128_CCE_START) 2078c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_CCE_STOP DRM_IOW( DRM_COMMAND_BASE + DRM_R128_CCE_STOP, drm_r128_cce_stop_t) 2088c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_CCE_RESET DRM_IO( DRM_COMMAND_BASE + DRM_R128_CCE_RESET) 2098c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_CCE_IDLE DRM_IO( DRM_COMMAND_BASE + DRM_R128_CCE_IDLE) 2108c2ecf20Sopenharmony_ci/* 0x05 not used */ 2118c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_RESET DRM_IO( DRM_COMMAND_BASE + DRM_R128_RESET) 2128c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_SWAP DRM_IO( DRM_COMMAND_BASE + DRM_R128_SWAP) 2138c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_R128_CLEAR, drm_r128_clear_t) 2148c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_VERTEX DRM_IOW( DRM_COMMAND_BASE + DRM_R128_VERTEX, drm_r128_vertex_t) 2158c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_INDICES DRM_IOW( DRM_COMMAND_BASE + DRM_R128_INDICES, drm_r128_indices_t) 2168c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_BLIT DRM_IOW( DRM_COMMAND_BASE + DRM_R128_BLIT, drm_r128_blit_t) 2178c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_DEPTH DRM_IOW( DRM_COMMAND_BASE + DRM_R128_DEPTH, drm_r128_depth_t) 2188c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_STIPPLE DRM_IOW( DRM_COMMAND_BASE + DRM_R128_STIPPLE, drm_r128_stipple_t) 2198c2ecf20Sopenharmony_ci/* 0x0e not used */ 2208c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_INDIRECT DRM_IOWR(DRM_COMMAND_BASE + DRM_R128_INDIRECT, drm_r128_indirect_t) 2218c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_FULLSCREEN DRM_IOW( DRM_COMMAND_BASE + DRM_R128_FULLSCREEN, drm_r128_fullscreen_t) 2228c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_CLEAR2 DRM_IOW( DRM_COMMAND_BASE + DRM_R128_CLEAR2, drm_r128_clear2_t) 2238c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_GETPARAM DRM_IOWR( DRM_COMMAND_BASE + DRM_R128_GETPARAM, drm_r128_getparam_t) 2248c2ecf20Sopenharmony_ci#define DRM_IOCTL_R128_FLIP DRM_IO( DRM_COMMAND_BASE + DRM_R128_FLIP) 2258c2ecf20Sopenharmony_ci 2268c2ecf20Sopenharmony_citypedef struct drm_r128_init { 2278c2ecf20Sopenharmony_ci enum { 2288c2ecf20Sopenharmony_ci R128_INIT_CCE = 0x01, 2298c2ecf20Sopenharmony_ci R128_CLEANUP_CCE = 0x02 2308c2ecf20Sopenharmony_ci } func; 2318c2ecf20Sopenharmony_ci unsigned long sarea_priv_offset; 2328c2ecf20Sopenharmony_ci int is_pci; 2338c2ecf20Sopenharmony_ci int cce_mode; 2348c2ecf20Sopenharmony_ci int cce_secure; 2358c2ecf20Sopenharmony_ci int ring_size; 2368c2ecf20Sopenharmony_ci int usec_timeout; 2378c2ecf20Sopenharmony_ci 2388c2ecf20Sopenharmony_ci unsigned int fb_bpp; 2398c2ecf20Sopenharmony_ci unsigned int front_offset, front_pitch; 2408c2ecf20Sopenharmony_ci unsigned int back_offset, back_pitch; 2418c2ecf20Sopenharmony_ci unsigned int depth_bpp; 2428c2ecf20Sopenharmony_ci unsigned int depth_offset, depth_pitch; 2438c2ecf20Sopenharmony_ci unsigned int span_offset; 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ci unsigned long fb_offset; 2468c2ecf20Sopenharmony_ci unsigned long mmio_offset; 2478c2ecf20Sopenharmony_ci unsigned long ring_offset; 2488c2ecf20Sopenharmony_ci unsigned long ring_rptr_offset; 2498c2ecf20Sopenharmony_ci unsigned long buffers_offset; 2508c2ecf20Sopenharmony_ci unsigned long agp_textures_offset; 2518c2ecf20Sopenharmony_ci} drm_r128_init_t; 2528c2ecf20Sopenharmony_ci 2538c2ecf20Sopenharmony_citypedef struct drm_r128_cce_stop { 2548c2ecf20Sopenharmony_ci int flush; 2558c2ecf20Sopenharmony_ci int idle; 2568c2ecf20Sopenharmony_ci} drm_r128_cce_stop_t; 2578c2ecf20Sopenharmony_ci 2588c2ecf20Sopenharmony_citypedef struct drm_r128_clear { 2598c2ecf20Sopenharmony_ci unsigned int flags; 2608c2ecf20Sopenharmony_ci unsigned int clear_color; 2618c2ecf20Sopenharmony_ci unsigned int clear_depth; 2628c2ecf20Sopenharmony_ci unsigned int color_mask; 2638c2ecf20Sopenharmony_ci unsigned int depth_mask; 2648c2ecf20Sopenharmony_ci} drm_r128_clear_t; 2658c2ecf20Sopenharmony_ci 2668c2ecf20Sopenharmony_citypedef struct drm_r128_vertex { 2678c2ecf20Sopenharmony_ci int prim; 2688c2ecf20Sopenharmony_ci int idx; /* Index of vertex buffer */ 2698c2ecf20Sopenharmony_ci int count; /* Number of vertices in buffer */ 2708c2ecf20Sopenharmony_ci int discard; /* Client finished with buffer? */ 2718c2ecf20Sopenharmony_ci} drm_r128_vertex_t; 2728c2ecf20Sopenharmony_ci 2738c2ecf20Sopenharmony_citypedef struct drm_r128_indices { 2748c2ecf20Sopenharmony_ci int prim; 2758c2ecf20Sopenharmony_ci int idx; 2768c2ecf20Sopenharmony_ci int start; 2778c2ecf20Sopenharmony_ci int end; 2788c2ecf20Sopenharmony_ci int discard; /* Client finished with buffer? */ 2798c2ecf20Sopenharmony_ci} drm_r128_indices_t; 2808c2ecf20Sopenharmony_ci 2818c2ecf20Sopenharmony_citypedef struct drm_r128_blit { 2828c2ecf20Sopenharmony_ci int idx; 2838c2ecf20Sopenharmony_ci int pitch; 2848c2ecf20Sopenharmony_ci int offset; 2858c2ecf20Sopenharmony_ci int format; 2868c2ecf20Sopenharmony_ci unsigned short x, y; 2878c2ecf20Sopenharmony_ci unsigned short width, height; 2888c2ecf20Sopenharmony_ci} drm_r128_blit_t; 2898c2ecf20Sopenharmony_ci 2908c2ecf20Sopenharmony_citypedef struct drm_r128_depth { 2918c2ecf20Sopenharmony_ci enum { 2928c2ecf20Sopenharmony_ci R128_WRITE_SPAN = 0x01, 2938c2ecf20Sopenharmony_ci R128_WRITE_PIXELS = 0x02, 2948c2ecf20Sopenharmony_ci R128_READ_SPAN = 0x03, 2958c2ecf20Sopenharmony_ci R128_READ_PIXELS = 0x04 2968c2ecf20Sopenharmony_ci } func; 2978c2ecf20Sopenharmony_ci int n; 2988c2ecf20Sopenharmony_ci int __user *x; 2998c2ecf20Sopenharmony_ci int __user *y; 3008c2ecf20Sopenharmony_ci unsigned int __user *buffer; 3018c2ecf20Sopenharmony_ci unsigned char __user *mask; 3028c2ecf20Sopenharmony_ci} drm_r128_depth_t; 3038c2ecf20Sopenharmony_ci 3048c2ecf20Sopenharmony_citypedef struct drm_r128_stipple { 3058c2ecf20Sopenharmony_ci unsigned int __user *mask; 3068c2ecf20Sopenharmony_ci} drm_r128_stipple_t; 3078c2ecf20Sopenharmony_ci 3088c2ecf20Sopenharmony_citypedef struct drm_r128_indirect { 3098c2ecf20Sopenharmony_ci int idx; 3108c2ecf20Sopenharmony_ci int start; 3118c2ecf20Sopenharmony_ci int end; 3128c2ecf20Sopenharmony_ci int discard; 3138c2ecf20Sopenharmony_ci} drm_r128_indirect_t; 3148c2ecf20Sopenharmony_ci 3158c2ecf20Sopenharmony_citypedef struct drm_r128_fullscreen { 3168c2ecf20Sopenharmony_ci enum { 3178c2ecf20Sopenharmony_ci R128_INIT_FULLSCREEN = 0x01, 3188c2ecf20Sopenharmony_ci R128_CLEANUP_FULLSCREEN = 0x02 3198c2ecf20Sopenharmony_ci } func; 3208c2ecf20Sopenharmony_ci} drm_r128_fullscreen_t; 3218c2ecf20Sopenharmony_ci 3228c2ecf20Sopenharmony_ci/* 2.3: An ioctl to get parameters that aren't available to the 3d 3238c2ecf20Sopenharmony_ci * client any other way. 3248c2ecf20Sopenharmony_ci */ 3258c2ecf20Sopenharmony_ci#define R128_PARAM_IRQ_NR 1 3268c2ecf20Sopenharmony_ci 3278c2ecf20Sopenharmony_citypedef struct drm_r128_getparam { 3288c2ecf20Sopenharmony_ci int param; 3298c2ecf20Sopenharmony_ci void __user *value; 3308c2ecf20Sopenharmony_ci} drm_r128_getparam_t; 3318c2ecf20Sopenharmony_ci 3328c2ecf20Sopenharmony_ci#if defined(__cplusplus) 3338c2ecf20Sopenharmony_ci} 3348c2ecf20Sopenharmony_ci#endif 3358c2ecf20Sopenharmony_ci 3368c2ecf20Sopenharmony_ci#endif 337