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