diff options
Diffstat (limited to 'drivers/char/drm/savage_drv.h')
-rw-r--r-- | drivers/char/drm/savage_drv.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/drivers/char/drm/savage_drv.h b/drivers/char/drm/savage_drv.h index a4543494465..358f4fb2712 100644 --- a/drivers/char/drm/savage_drv.h +++ b/drivers/char/drm/savage_drv.h | |||
@@ -65,7 +65,7 @@ typedef struct drm_savage_dma_page { | |||
65 | drm_savage_age_t age; | 65 | drm_savage_age_t age; |
66 | unsigned int used, flushed; | 66 | unsigned int used, flushed; |
67 | } drm_savage_dma_page_t; | 67 | } drm_savage_dma_page_t; |
68 | #define SAVAGE_DMA_PAGE_SIZE 1024 /* in dwords */ | 68 | #define SAVAGE_DMA_PAGE_SIZE 1024 /* in dwords */ |
69 | /* Fake DMA buffer size in bytes. 4 pages. Allows a maximum command | 69 | /* Fake DMA buffer size in bytes. 4 pages. Allows a maximum command |
70 | * size of 16kbytes or 4k entries. Minimum requirement would be | 70 | * size of 16kbytes or 4k entries. Minimum requirement would be |
71 | * 10kbytes for 255 40-byte vertices in one drawing command. */ | 71 | * 10kbytes for 255 40-byte vertices in one drawing command. */ |
@@ -184,13 +184,13 @@ typedef struct drm_savage_private { | |||
184 | unsigned int waiting; | 184 | unsigned int waiting; |
185 | 185 | ||
186 | /* config/hardware-dependent function pointers */ | 186 | /* config/hardware-dependent function pointers */ |
187 | int (*wait_fifo)(struct drm_savage_private *dev_priv, unsigned int n); | 187 | int (*wait_fifo) (struct drm_savage_private * dev_priv, unsigned int n); |
188 | int (*wait_evnt)(struct drm_savage_private *dev_priv, uint16_t e); | 188 | int (*wait_evnt) (struct drm_savage_private * dev_priv, uint16_t e); |
189 | /* Err, there is a macro wait_event in include/linux/wait.h. | 189 | /* Err, there is a macro wait_event in include/linux/wait.h. |
190 | * Avoid unwanted macro expansion. */ | 190 | * Avoid unwanted macro expansion. */ |
191 | void (*emit_clip_rect)(struct drm_savage_private *dev_priv, | 191 | void (*emit_clip_rect) (struct drm_savage_private * dev_priv, |
192 | drm_clip_rect_t *pbox); | 192 | drm_clip_rect_t * pbox); |
193 | void (*dma_flush)(struct drm_savage_private *dev_priv); | 193 | void (*dma_flush) (struct drm_savage_private * dev_priv); |
194 | } drm_savage_private_t; | 194 | } drm_savage_private_t; |
195 | 195 | ||
196 | /* ioctls */ | 196 | /* ioctls */ |
@@ -198,23 +198,23 @@ extern int savage_bci_cmdbuf(DRM_IOCTL_ARGS); | |||
198 | extern int savage_bci_buffers(DRM_IOCTL_ARGS); | 198 | extern int savage_bci_buffers(DRM_IOCTL_ARGS); |
199 | 199 | ||
200 | /* BCI functions */ | 200 | /* BCI functions */ |
201 | extern uint16_t savage_bci_emit_event(drm_savage_private_t *dev_priv, | 201 | extern uint16_t savage_bci_emit_event(drm_savage_private_t * dev_priv, |
202 | unsigned int flags); | 202 | unsigned int flags); |
203 | extern void savage_freelist_put(drm_device_t *dev, drm_buf_t *buf); | 203 | extern void savage_freelist_put(drm_device_t * dev, drm_buf_t * buf); |
204 | extern void savage_dma_reset(drm_savage_private_t *dev_priv); | 204 | extern void savage_dma_reset(drm_savage_private_t * dev_priv); |
205 | extern void savage_dma_wait(drm_savage_private_t *dev_priv, unsigned int page); | 205 | extern void savage_dma_wait(drm_savage_private_t * dev_priv, unsigned int page); |
206 | extern uint32_t *savage_dma_alloc(drm_savage_private_t *dev_priv, | 206 | extern uint32_t *savage_dma_alloc(drm_savage_private_t * dev_priv, |
207 | unsigned int n); | 207 | unsigned int n); |
208 | extern int savage_preinit(drm_device_t *dev, unsigned long chipset); | 208 | extern int savage_preinit(drm_device_t * dev, unsigned long chipset); |
209 | extern int savage_postcleanup(drm_device_t *dev); | 209 | extern int savage_postcleanup(drm_device_t * dev); |
210 | extern int savage_do_cleanup_bci(drm_device_t *dev); | 210 | extern int savage_do_cleanup_bci(drm_device_t * dev); |
211 | extern void savage_reclaim_buffers(drm_device_t *dev, DRMFILE filp); | 211 | extern void savage_reclaim_buffers(drm_device_t * dev, DRMFILE filp); |
212 | 212 | ||
213 | /* state functions */ | 213 | /* state functions */ |
214 | extern void savage_emit_clip_rect_s3d(drm_savage_private_t *dev_priv, | 214 | extern void savage_emit_clip_rect_s3d(drm_savage_private_t * dev_priv, |
215 | drm_clip_rect_t *pbox); | 215 | drm_clip_rect_t * pbox); |
216 | extern void savage_emit_clip_rect_s4(drm_savage_private_t *dev_priv, | 216 | extern void savage_emit_clip_rect_s4(drm_savage_private_t * dev_priv, |
217 | drm_clip_rect_t *pbox); | 217 | drm_clip_rect_t * pbox); |
218 | 218 | ||
219 | #define SAVAGE_FB_SIZE_S3 0x01000000 /* 16MB */ | 219 | #define SAVAGE_FB_SIZE_S3 0x01000000 /* 16MB */ |
220 | #define SAVAGE_FB_SIZE_S4 0x02000000 /* 32MB */ | 220 | #define SAVAGE_FB_SIZE_S4 0x02000000 /* 32MB */ |
@@ -222,10 +222,10 @@ extern void savage_emit_clip_rect_s4(drm_savage_private_t *dev_priv, | |||
222 | #define SAVAGE_APERTURE_OFFSET 0x02000000 /* 32MB */ | 222 | #define SAVAGE_APERTURE_OFFSET 0x02000000 /* 32MB */ |
223 | #define SAVAGE_APERTURE_SIZE 0x05000000 /* 5 tiled surfaces, 16MB each */ | 223 | #define SAVAGE_APERTURE_SIZE 0x05000000 /* 5 tiled surfaces, 16MB each */ |
224 | 224 | ||
225 | #define SAVAGE_BCI_OFFSET 0x00010000 /* offset of the BCI region | 225 | #define SAVAGE_BCI_OFFSET 0x00010000 /* offset of the BCI region |
226 | * inside the MMIO region */ | 226 | * inside the MMIO region */ |
227 | #define SAVAGE_BCI_FIFO_SIZE 32 /* number of entries in on-chip | 227 | #define SAVAGE_BCI_FIFO_SIZE 32 /* number of entries in on-chip |
228 | * BCI FIFO */ | 228 | * BCI FIFO */ |
229 | 229 | ||
230 | /* | 230 | /* |
231 | * MMIO registers | 231 | * MMIO registers |
@@ -278,7 +278,7 @@ extern void savage_emit_clip_rect_s4(drm_savage_private_t *dev_priv, | |||
278 | #define SAVAGE_TEXADDR1_S4 0x23 | 278 | #define SAVAGE_TEXADDR1_S4 0x23 |
279 | #define SAVAGE_TEXBLEND0_S4 0x24 | 279 | #define SAVAGE_TEXBLEND0_S4 0x24 |
280 | #define SAVAGE_TEXBLEND1_S4 0x25 | 280 | #define SAVAGE_TEXBLEND1_S4 0x25 |
281 | #define SAVAGE_TEXXPRCLR_S4 0x26 /* never used */ | 281 | #define SAVAGE_TEXXPRCLR_S4 0x26 /* never used */ |
282 | #define SAVAGE_TEXDESCR_S4 0x27 | 282 | #define SAVAGE_TEXDESCR_S4 0x27 |
283 | #define SAVAGE_FOGTABLE_S4 0x28 | 283 | #define SAVAGE_FOGTABLE_S4 0x28 |
284 | #define SAVAGE_FOGCTRL_S4 0x30 | 284 | #define SAVAGE_FOGCTRL_S4 0x30 |
@@ -293,7 +293,7 @@ extern void savage_emit_clip_rect_s4(drm_savage_private_t *dev_priv, | |||
293 | #define SAVAGE_TEXBLENDCOLOR_S4 0x39 | 293 | #define SAVAGE_TEXBLENDCOLOR_S4 0x39 |
294 | /* Savage3D/MX/IX 3D registers */ | 294 | /* Savage3D/MX/IX 3D registers */ |
295 | #define SAVAGE_TEXPALADDR_S3D 0x18 | 295 | #define SAVAGE_TEXPALADDR_S3D 0x18 |
296 | #define SAVAGE_TEXXPRCLR_S3D 0x19 /* never used */ | 296 | #define SAVAGE_TEXXPRCLR_S3D 0x19 /* never used */ |
297 | #define SAVAGE_TEXADDR_S3D 0x1A | 297 | #define SAVAGE_TEXADDR_S3D 0x1A |
298 | #define SAVAGE_TEXDESCR_S3D 0x1B | 298 | #define SAVAGE_TEXDESCR_S3D 0x1B |
299 | #define SAVAGE_TEXCTRL_S3D 0x1C | 299 | #define SAVAGE_TEXCTRL_S3D 0x1C |
@@ -305,7 +305,7 @@ extern void savage_emit_clip_rect_s4(drm_savage_private_t *dev_priv, | |||
305 | #define SAVAGE_DESTCTRL_S3D 0x34 | 305 | #define SAVAGE_DESTCTRL_S3D 0x34 |
306 | #define SAVAGE_SCSTART_S3D 0x35 | 306 | #define SAVAGE_SCSTART_S3D 0x35 |
307 | #define SAVAGE_SCEND_S3D 0x36 | 307 | #define SAVAGE_SCEND_S3D 0x36 |
308 | #define SAVAGE_ZWATERMARK_S3D 0x37 | 308 | #define SAVAGE_ZWATERMARK_S3D 0x37 |
309 | #define SAVAGE_DESTTEXRWWATERMARK_S3D 0x38 | 309 | #define SAVAGE_DESTTEXRWWATERMARK_S3D 0x38 |
310 | /* common stuff */ | 310 | /* common stuff */ |
311 | #define SAVAGE_VERTBUFADDR 0x3e | 311 | #define SAVAGE_VERTBUFADDR 0x3e |
@@ -313,9 +313,9 @@ extern void savage_emit_clip_rect_s4(drm_savage_private_t *dev_priv, | |||
313 | #define SAVAGE_DMABUFADDR 0x51 | 313 | #define SAVAGE_DMABUFADDR 0x51 |
314 | 314 | ||
315 | /* texture enable bits (needed for tex addr checking) */ | 315 | /* texture enable bits (needed for tex addr checking) */ |
316 | #define SAVAGE_TEXCTRL_TEXEN_MASK 0x00010000 /* S3D */ | 316 | #define SAVAGE_TEXCTRL_TEXEN_MASK 0x00010000 /* S3D */ |
317 | #define SAVAGE_TEXDESCR_TEX0EN_MASK 0x02000000 /* S4 */ | 317 | #define SAVAGE_TEXDESCR_TEX0EN_MASK 0x02000000 /* S4 */ |
318 | #define SAVAGE_TEXDESCR_TEX1EN_MASK 0x04000000 /* S4 */ | 318 | #define SAVAGE_TEXDESCR_TEX1EN_MASK 0x04000000 /* S4 */ |
319 | 319 | ||
320 | /* Global fields in Savage4/Twister/ProSavage 3D registers: | 320 | /* Global fields in Savage4/Twister/ProSavage 3D registers: |
321 | * | 321 | * |
@@ -576,4 +576,4 @@ extern void savage_emit_clip_rect_s4(drm_savage_private_t *dev_priv, | |||
576 | #define TEST_AGE( age, e, w ) \ | 576 | #define TEST_AGE( age, e, w ) \ |
577 | ( (age)->wrap < (w) || ( (age)->wrap == (w) && (age)->event <= (e) ) ) | 577 | ( (age)->wrap < (w) || ( (age)->wrap == (w) && (age)->event <= (e) ) ) |
578 | 578 | ||
579 | #endif /* __SAVAGE_DRV_H__ */ | 579 | #endif /* __SAVAGE_DRV_H__ */ |