Deleted Added
full compact
radeon_drm.h (152909) radeon_drm.h (157617)
1/* radeon_drm.h -- Public header for the radeon driver -*- linux-c -*-
2 *
3 * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
4 * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
5 * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
6 * All rights reserved.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a

--- 17 unchanged lines hidden (view full) ---

26 *
27 * Authors:
28 * Kevin E. Martin <martin@valinux.com>
29 * Gareth Hughes <gareth@valinux.com>
30 * Keith Whitwell <keith@tungstengraphics.com>
31 */
32
33#include <sys/cdefs.h>
1/* radeon_drm.h -- Public header for the radeon driver -*- linux-c -*-
2 *
3 * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
4 * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
5 * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
6 * All rights reserved.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a

--- 17 unchanged lines hidden (view full) ---

26 *
27 * Authors:
28 * Kevin E. Martin <martin@valinux.com>
29 * Gareth Hughes <gareth@valinux.com>
30 * Keith Whitwell <keith@tungstengraphics.com>
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/dev/drm/radeon_drm.h 152909 2005-11-28 23:13:57Z anholt $");
34__FBSDID("$FreeBSD: head/sys/dev/drm/radeon_drm.h 157617 2006-04-09 20:45:45Z anholt $");
35
36#ifndef __RADEON_DRM_H__
37#define __RADEON_DRM_H__
38
39/* WARNING: If you change any of these defines, make sure to change the
40 * defines in the X server file (radeon_sarea.h)
41 */
42#ifndef __RADEON_SAREA_DEFINES__

--- 166 unchanged lines hidden (view full) ---

209 */
210#define R300_CMD_PACKET3_CLEAR 0
211#define R300_CMD_PACKET3_RAW 1
212
213/* Commands understood by cmd_buffer ioctl for R300.
214 * The interface has not been stabilized, so some of these may be removed
215 * and eventually reordered before stabilization.
216 */
35
36#ifndef __RADEON_DRM_H__
37#define __RADEON_DRM_H__
38
39/* WARNING: If you change any of these defines, make sure to change the
40 * defines in the X server file (radeon_sarea.h)
41 */
42#ifndef __RADEON_SAREA_DEFINES__

--- 166 unchanged lines hidden (view full) ---

209 */
210#define R300_CMD_PACKET3_CLEAR 0
211#define R300_CMD_PACKET3_RAW 1
212
213/* Commands understood by cmd_buffer ioctl for R300.
214 * The interface has not been stabilized, so some of these may be removed
215 * and eventually reordered before stabilization.
216 */
217#define R300_CMD_PACKET0 1
218#define R300_CMD_VPU 2 /* emit vertex program upload */
219#define R300_CMD_PACKET3 3 /* emit a packet3 */
220#define R300_CMD_END3D 4 /* emit sequence ending 3d rendering */
217#define R300_CMD_PACKET0 1
218#define R300_CMD_VPU 2 /* emit vertex program upload */
219#define R300_CMD_PACKET3 3 /* emit a packet3 */
220#define R300_CMD_END3D 4 /* emit sequence ending 3d rendering */
221#define R300_CMD_CP_DELAY 5
222#define R300_CMD_DMA_DISCARD 6
223#define R300_CMD_WAIT 7
224# define R300_WAIT_2D 0x1
225# define R300_WAIT_3D 0x2
226# define R300_WAIT_2D_CLEAN 0x3
227# define R300_WAIT_3D_CLEAN 0x4
221#define R300_CMD_CP_DELAY 5
222#define R300_CMD_DMA_DISCARD 6
223#define R300_CMD_WAIT 7
224# define R300_WAIT_2D 0x1
225# define R300_WAIT_3D 0x2
226# define R300_WAIT_2D_CLEAN 0x3
227# define R300_WAIT_3D_CLEAN 0x4
228#define R300_CMD_SCRATCH 8
228
229typedef union {
230 unsigned int u;
231 struct {
232 unsigned char cmd_type, pad0, pad1, pad2;
233 } header;
234 struct {
235 unsigned char cmd_type, count, reglo, reghi;
236 } packet0;
237 struct {
238 unsigned char cmd_type, count, adrlo, adrhi;
239 } vpu;
240 struct {
241 unsigned char cmd_type, packet, pad0, pad1;
242 } packet3;
243 struct {
244 unsigned char cmd_type, packet;
229
230typedef union {
231 unsigned int u;
232 struct {
233 unsigned char cmd_type, pad0, pad1, pad2;
234 } header;
235 struct {
236 unsigned char cmd_type, count, reglo, reghi;
237 } packet0;
238 struct {
239 unsigned char cmd_type, count, adrlo, adrhi;
240 } vpu;
241 struct {
242 unsigned char cmd_type, packet, pad0, pad1;
243 } packet3;
244 struct {
245 unsigned char cmd_type, packet;
245 unsigned short count; /* amount of packet2 to emit */
246 unsigned short count; /* amount of packet2 to emit */
246 } delay;
247 struct {
248 unsigned char cmd_type, buf_idx, pad0, pad1;
249 } dma;
250 struct {
247 } delay;
248 struct {
249 unsigned char cmd_type, buf_idx, pad0, pad1;
250 } dma;
251 struct {
251 unsigned char cmd_type, flags, pad0, pad1;
252 unsigned char cmd_type, flags, pad0, pad1;
252 } wait;
253 } wait;
254 struct {
255 unsigned char cmd_type, reg, n_bufs, flags;
256 } scratch;
253} drm_r300_cmd_header_t;
254
255#define RADEON_FRONT 0x1
256#define RADEON_BACK 0x2
257#define RADEON_DEPTH 0x4
257} drm_r300_cmd_header_t;
258
259#define RADEON_FRONT 0x1
260#define RADEON_BACK 0x2
261#define RADEON_DEPTH 0x4
258#define RADEON_STENCIL 0x8
262#define RADEON_STENCIL 0x8
259#define RADEON_CLEAR_FASTZ 0x80000000
260#define RADEON_USE_HIERZ 0x40000000
261#define RADEON_USE_COMP_ZBUF 0x20000000
262
263/* Primitive types
264 */
265#define RADEON_POINTS 0x1
266#define RADEON_LINES 0x2

--- 355 unchanged lines hidden (view full) ---

622
623typedef struct drm_radeon_indirect {
624 int idx;
625 int start;
626 int end;
627 int discard;
628} drm_radeon_indirect_t;
629
263#define RADEON_CLEAR_FASTZ 0x80000000
264#define RADEON_USE_HIERZ 0x40000000
265#define RADEON_USE_COMP_ZBUF 0x20000000
266
267/* Primitive types
268 */
269#define RADEON_POINTS 0x1
270#define RADEON_LINES 0x2

--- 355 unchanged lines hidden (view full) ---

626
627typedef struct drm_radeon_indirect {
628 int idx;
629 int start;
630 int end;
631 int discard;
632} drm_radeon_indirect_t;
633
634/* enum for card type parameters */
635#define RADEON_CARD_PCI 0
636#define RADEON_CARD_AGP 1
637#define RADEON_CARD_PCIE 2
638
630/* 1.3: An ioctl to get parameters that aren't available to the 3d
631 * client any other way.
632 */
633#define RADEON_PARAM_GART_BUFFER_OFFSET 1 /* card offset of 1st GART buffer */
634#define RADEON_PARAM_LAST_FRAME 2
635#define RADEON_PARAM_LAST_DISPATCH 3
636#define RADEON_PARAM_LAST_CLEAR 4
637/* Added with DRM version 1.6. */
638#define RADEON_PARAM_IRQ_NR 5
639#define RADEON_PARAM_GART_BASE 6 /* card offset of GART base */
640/* Added with DRM version 1.8. */
641#define RADEON_PARAM_REGISTER_HANDLE 7 /* for drmMap() */
642#define RADEON_PARAM_STATUS_HANDLE 8
643#define RADEON_PARAM_SAREA_HANDLE 9
644#define RADEON_PARAM_GART_TEX_HANDLE 10
645#define RADEON_PARAM_SCRATCH_OFFSET 11
639/* 1.3: An ioctl to get parameters that aren't available to the 3d
640 * client any other way.
641 */
642#define RADEON_PARAM_GART_BUFFER_OFFSET 1 /* card offset of 1st GART buffer */
643#define RADEON_PARAM_LAST_FRAME 2
644#define RADEON_PARAM_LAST_DISPATCH 3
645#define RADEON_PARAM_LAST_CLEAR 4
646/* Added with DRM version 1.6. */
647#define RADEON_PARAM_IRQ_NR 5
648#define RADEON_PARAM_GART_BASE 6 /* card offset of GART base */
649/* Added with DRM version 1.8. */
650#define RADEON_PARAM_REGISTER_HANDLE 7 /* for drmMap() */
651#define RADEON_PARAM_STATUS_HANDLE 8
652#define RADEON_PARAM_SAREA_HANDLE 9
653#define RADEON_PARAM_GART_TEX_HANDLE 10
654#define RADEON_PARAM_SCRATCH_OFFSET 11
655#define RADEON_PARAM_CARD_TYPE 12
646
647typedef struct drm_radeon_getparam {
648 int param;
649 void __user *value;
650} drm_radeon_getparam_t;
651
652/* 1.6: Set up a memory manager for regions of shared memory:
653 */

--- 34 unchanged lines hidden (view full) ---

688
689typedef struct drm_radeon_setparam {
690 unsigned int param;
691 int64_t value;
692} drm_radeon_setparam_t;
693
694#define RADEON_SETPARAM_FB_LOCATION 1 /* determined framebuffer location */
695#define RADEON_SETPARAM_SWITCH_TILING 2 /* enable/disable color tiling */
656
657typedef struct drm_radeon_getparam {
658 int param;
659 void __user *value;
660} drm_radeon_getparam_t;
661
662/* 1.6: Set up a memory manager for regions of shared memory:
663 */

--- 34 unchanged lines hidden (view full) ---

698
699typedef struct drm_radeon_setparam {
700 unsigned int param;
701 int64_t value;
702} drm_radeon_setparam_t;
703
704#define RADEON_SETPARAM_FB_LOCATION 1 /* determined framebuffer location */
705#define RADEON_SETPARAM_SWITCH_TILING 2 /* enable/disable color tiling */
696#define RADEON_SETPARAM_PCIGART_LOCATION 3 /* PCI Gart Location */
706#define RADEON_SETPARAM_PCIGART_LOCATION 3 /* PCI Gart Location */
697
707
708#define RADEON_SETPARAM_NEW_MEMMAP 4 /* Use new memory map */
709
698/* 1.14: Clients can allocate/free a surface
699 */
700typedef struct drm_radeon_surface_alloc {
701 unsigned int address;
702 unsigned int size;
703 unsigned int flags;
704} drm_radeon_surface_alloc_t;
705
706typedef struct drm_radeon_surface_free {
707 unsigned int address;
708} drm_radeon_surface_free_t;
709
710
711#endif
710/* 1.14: Clients can allocate/free a surface
711 */
712typedef struct drm_radeon_surface_alloc {
713 unsigned int address;
714 unsigned int size;
715 unsigned int flags;
716} drm_radeon_surface_alloc_t;
717
718typedef struct drm_radeon_surface_free {
719 unsigned int address;
720} drm_radeon_surface_free_t;
721
722
723#endif