Home | History | Annotate | Line # | Download | only in radeon
      1 /*	$NetBSD: radeon_drv.h,v 1.5 2024/04/16 14:34:02 riastradh 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 #include <linux/firmware.h>
     37 #include <linux/platform_device.h>
     38 #include <drm/drm_legacy.h>
     39 
     40 #include "radeon_family.h"
     41 
     42 /* General customization:
     43  */
     44 
     45 #define DRIVER_AUTHOR		"Gareth Hughes, Keith Whitwell, others."
     46 
     47 #define DRIVER_NAME		"radeon"
     48 #define DRIVER_DESC		"ATI Radeon"
     49 #define DRIVER_DATE		"20080528"
     50 
     51 /* Interface history:
     52  *
     53  * 1.1 - ??
     54  * 1.2 - Add vertex2 ioctl (keith)
     55  *     - Add stencil capability to clear ioctl (gareth, keith)
     56  *     - Increase MAX_TEXTURE_LEVELS (brian)
     57  * 1.3 - Add cmdbuf ioctl (keith)
     58  *     - Add support for new radeon packets (keith)
     59  *     - Add getparam ioctl (keith)
     60  *     - Add flip-buffers ioctl, deprecate fullscreen foo (keith).
     61  * 1.4 - Add scratch registers to get_param ioctl.
     62  * 1.5 - Add r200 packets to cmdbuf ioctl
     63  *     - Add r200 function to init ioctl
     64  *     - Add 'scalar2' instruction to cmdbuf
     65  * 1.6 - Add static GART memory manager
     66  *       Add irq handler (won't be turned on unless X server knows to)
     67  *       Add irq ioctls and irq_active getparam.
     68  *       Add wait command for cmdbuf ioctl
     69  *       Add GART offset query for getparam
     70  * 1.7 - Add support for cube map registers: R200_PP_CUBIC_FACES_[0..5]
     71  *       and R200_PP_CUBIC_OFFSET_F1_[0..5].
     72  *       Added packets R200_EMIT_PP_CUBIC_FACES_[0..5] and
     73  *       R200_EMIT_PP_CUBIC_OFFSETS_[0..5].  (brian)
     74  * 1.8 - Remove need to call cleanup ioctls on last client exit (keith)
     75  *       Add 'GET' queries for starting additional clients on different VT's.
     76  * 1.9 - Add DRM_IOCTL_RADEON_CP_RESUME ioctl.
     77  *       Add texture rectangle support for r100.
     78  * 1.10- Add SETPARAM ioctl; first parameter to set is FB_LOCATION, which
     79  *       clients use to tell the DRM where they think the framebuffer is
     80  *       located in the card's address space
     81  * 1.11- Add packet R200_EMIT_RB3D_BLENDCOLOR to support GL_EXT_blend_color
     82  *       and GL_EXT_blend_[func|equation]_separate on r200
     83  * 1.12- Add R300 CP microcode support - this just loads the CP on r300
     84  *       (No 3D support yet - just microcode loading).
     85  * 1.13- Add packet R200_EMIT_TCL_POINT_SPRITE_CNTL for ARB_point_parameters
     86  *     - Add hyperz support, add hyperz flags to clear ioctl.
     87  * 1.14- Add support for color tiling
     88  *     - Add R100/R200 surface allocation/free support
     89  * 1.15- Add support for texture micro tiling
     90  *     - Add support for r100 cube maps
     91  * 1.16- Add R200_EMIT_PP_TRI_PERF_CNTL packet to support brilinear
     92  *       texture filtering on r200
     93  * 1.17- Add initial support for R300 (3D).
     94  * 1.18- Add support for GL_ATI_fragment_shader, new packets
     95  *       R200_EMIT_PP_AFS_0/1, R200_EMIT_PP_TXCTLALL_0-5 (replaces
     96  *       R200_EMIT_PP_TXFILTER_0-5, 2 more regs) and R200_EMIT_ATF_TFACTOR
     97  *       (replaces R200_EMIT_TFACTOR_0 (8 consts instead of 6)
     98  * 1.19- Add support for gart table in FB memory and PCIE r300
     99  * 1.20- Add support for r300 texrect
    100  * 1.21- Add support for card type getparam
    101  * 1.22- Add support for texture cache flushes (R300_TX_CNTL)
    102  * 1.23- Add new radeon memory map work from benh
    103  * 1.24- Add general-purpose packet for manipulating scratch registers (r300)
    104  * 1.25- Add support for r200 vertex programs (R200_EMIT_VAP_PVS_CNTL,
    105  *       new packet type)
    106  * 1.26- Add support for variable size PCI(E) gart aperture
    107  * 1.27- Add support for IGP GART
    108  * 1.28- Add support for VBL on CRTC2
    109  * 1.29- R500 3D cmd buffer support
    110  * 1.30- Add support for occlusion queries
    111  * 1.31- Add support for num Z pipes from GET_PARAM
    112  * 1.32- fixes for rv740 setup
    113  * 1.33- Add r6xx/r7xx const buffer support
    114  * 1.34- fix evergreen/cayman GS register
    115  */
    116 #define DRIVER_MAJOR		1
    117 #define DRIVER_MINOR		34
    118 #define DRIVER_PATCHLEVEL	0
    119 
    120 long radeon_drm_ioctl(struct file *filp,
    121 		      unsigned int cmd, unsigned long arg);
    122 
    123 #endif				/* __RADEON_DRV_H__ */
    124