2 * Author: Max Lingua <sunmax@libero.it>
5 /* WARNING: If you change any of these defines, make sure to change
6 * the kernel include file as well (s3v_drm.h)
9 #ifndef _XF86DRI_S3V_H_
10 #define _XF86DRI_S3V_H_
14 #define S3V_USE_BATCH 1
16 /* #define S3V_BUF_4K 1 */
19 #define S3V_DMA_BUF_ORDER 12
20 #define S3V_DMA_BUF_NR 256
22 #define S3V_DMA_BUF_ORDER 16 /* -much- better */
23 #define S3V_DMA_BUF_NR 16
25 /* on s3virge you can only choose between *
26 * 4k (2^12) and 64k (2^16) dma bufs */
27 #define S3V_DMA_BUF_SZ (1<<S3V_DMA_BUF_ORDER)
29 #define S3V_NR_SAREA_CLIPRECTS 8
31 /* Each region is a minimum of 16k (64*64@4bpp)
32 * and there are at most 40 of them.
34 #define S3V_NR_TEX_REGIONS 64 /* was 40 */
35 #define S3V_LOG_TEX_GRANULARITY 16 /* was 4 */
36 /* 40 * (2 ^ 4) = 640k, that's all we have for tex on 4mb gfx card */
37 /* FIXME: will it work with card with less than 4mb? */
38 /* FIXME: we should set this at run time */
40 #endif /* _S3V_DEFINES */
43 * WARNING: If you change any of these defines, make sure to change
44 * the kernel include file as well (gamma_drm.h)
47 /* Driver specific DRM command indices
48 * NOTE: these are not OS specific, but they are driver specific
50 #define DRM_S3V_INIT_DMA 0x00
51 #define DRM_S3V_CLEANUP_DMA 0x01
53 typedef struct _drmS3VInit
{
56 S3V_CLEANUP_DMA
= 0x02
59 unsigned int pcimode
; /* bool: 1=pci 0=agp */
61 unsigned int mmio_offset
;
62 unsigned int buffers_offset
;
63 unsigned int sarea_priv_offset
;
65 unsigned int front_offset
;
66 unsigned int front_width
;
67 unsigned int front_height
;
68 unsigned int front_pitch
;
70 unsigned int back_offset
;
71 unsigned int back_width
;
72 unsigned int back_height
;
73 unsigned int back_pitch
;
75 unsigned int depth_offset
;
76 unsigned int depth_width
;
77 unsigned int depth_height
;
78 unsigned int depth_pitch
;
80 unsigned int texture_offset
;