radeon_drv.h revision 1.4 1 /* $NetBSD: radeon_drv.h,v 1.4 2022/05/28 01:07:47 manu Exp $ */
2
3 /* radeon_drv.h -- Private header for radeon driver -*- linux-c -*-
4 *
5 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
6 * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
7 * All rights reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26 * DEALINGS IN THE SOFTWARE.
27 *
28 * Authors:
29 * Kevin E. Martin <martin (at) valinux.com>
30 * Gareth Hughes <gareth (at) valinux.com>
31 */
32
33 #ifndef __RADEON_DRV_H__
34 #define __RADEON_DRV_H__
35
36 #if defined(__NetBSD__)
37 #ifdef _KERNEL_OPT
38 #include "acpica.h"
39 #endif /* _KERNEL_OPT */
40 #if (NACPICA > 0)
41 #define CONFIG_ACPI
42 #endif /* NACPICA > 0 */
43 #endif /* __NetBSD__ */
44
45 #include <linux/firmware.h>
46 #include <linux/platform_device.h>
47 #include <drm/drm_legacy.h>
48
49 #include "radeon_family.h"
50
51 /* General customization:
52 */
53
54 #define DRIVER_AUTHOR "Gareth Hughes, Keith Whitwell, others."
55
56 #define DRIVER_NAME "radeon"
57 #define DRIVER_DESC "ATI Radeon"
58 #define DRIVER_DATE "20080528"
59
60 /* Interface history:
61 *
62 * 1.1 - ??
63 * 1.2 - Add vertex2 ioctl (keith)
64 * - Add stencil capability to clear ioctl (gareth, keith)
65 * - Increase MAX_TEXTURE_LEVELS (brian)
66 * 1.3 - Add cmdbuf ioctl (keith)
67 * - Add support for new radeon packets (keith)
68 * - Add getparam ioctl (keith)
69 * - Add flip-buffers ioctl, deprecate fullscreen foo (keith).
70 * 1.4 - Add scratch registers to get_param ioctl.
71 * 1.5 - Add r200 packets to cmdbuf ioctl
72 * - Add r200 function to init ioctl
73 * - Add 'scalar2' instruction to cmdbuf
74 * 1.6 - Add static GART memory manager
75 * Add irq handler (won't be turned on unless X server knows to)
76 * Add irq ioctls and irq_active getparam.
77 * Add wait command for cmdbuf ioctl
78 * Add GART offset query for getparam
79 * 1.7 - Add support for cube map registers: R200_PP_CUBIC_FACES_[0..5]
80 * and R200_PP_CUBIC_OFFSET_F1_[0..5].
81 * Added packets R200_EMIT_PP_CUBIC_FACES_[0..5] and
82 * R200_EMIT_PP_CUBIC_OFFSETS_[0..5]. (brian)
83 * 1.8 - Remove need to call cleanup ioctls on last client exit (keith)
84 * Add 'GET' queries for starting additional clients on different VT's.
85 * 1.9 - Add DRM_IOCTL_RADEON_CP_RESUME ioctl.
86 * Add texture rectangle support for r100.
87 * 1.10- Add SETPARAM ioctl; first parameter to set is FB_LOCATION, which
88 * clients use to tell the DRM where they think the framebuffer is
89 * located in the card's address space
90 * 1.11- Add packet R200_EMIT_RB3D_BLENDCOLOR to support GL_EXT_blend_color
91 * and GL_EXT_blend_[func|equation]_separate on r200
92 * 1.12- Add R300 CP microcode support - this just loads the CP on r300
93 * (No 3D support yet - just microcode loading).
94 * 1.13- Add packet R200_EMIT_TCL_POINT_SPRITE_CNTL for ARB_point_parameters
95 * - Add hyperz support, add hyperz flags to clear ioctl.
96 * 1.14- Add support for color tiling
97 * - Add R100/R200 surface allocation/free support
98 * 1.15- Add support for texture micro tiling
99 * - Add support for r100 cube maps
100 * 1.16- Add R200_EMIT_PP_TRI_PERF_CNTL packet to support brilinear
101 * texture filtering on r200
102 * 1.17- Add initial support for R300 (3D).
103 * 1.18- Add support for GL_ATI_fragment_shader, new packets
104 * R200_EMIT_PP_AFS_0/1, R200_EMIT_PP_TXCTLALL_0-5 (replaces
105 * R200_EMIT_PP_TXFILTER_0-5, 2 more regs) and R200_EMIT_ATF_TFACTOR
106 * (replaces R200_EMIT_TFACTOR_0 (8 consts instead of 6)
107 * 1.19- Add support for gart table in FB memory and PCIE r300
108 * 1.20- Add support for r300 texrect
109 * 1.21- Add support for card type getparam
110 * 1.22- Add support for texture cache flushes (R300_TX_CNTL)
111 * 1.23- Add new radeon memory map work from benh
112 * 1.24- Add general-purpose packet for manipulating scratch registers (r300)
113 * 1.25- Add support for r200 vertex programs (R200_EMIT_VAP_PVS_CNTL,
114 * new packet type)
115 * 1.26- Add support for variable size PCI(E) gart aperture
116 * 1.27- Add support for IGP GART
117 * 1.28- Add support for VBL on CRTC2
118 * 1.29- R500 3D cmd buffer support
119 * 1.30- Add support for occlusion queries
120 * 1.31- Add support for num Z pipes from GET_PARAM
121 * 1.32- fixes for rv740 setup
122 * 1.33- Add r6xx/r7xx const buffer support
123 * 1.34- fix evergreen/cayman GS register
124 */
125 #define DRIVER_MAJOR 1
126 #define DRIVER_MINOR 34
127 #define DRIVER_PATCHLEVEL 0
128
129 long radeon_drm_ioctl(struct file *filp,
130 unsigned int cmd, unsigned long arg);
131
132 #endif /* __RADEON_DRV_H__ */
133