diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2002-07-31 08:04:42 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2002-07-31 08:04:42 +0000 |
commit | 7adbd50d969c7c213e2c7a608738f62e9fd03781 (patch) | |
tree | 97b305b7eba8ba681fb07f7a73a3dc6e64faf812 /shared | |
parent | 6b4dd1a7a444945be81d9b81c22ef593236ae461 (diff) |
Add test to determine if ring ever empties
Diffstat (limited to 'shared')
-rw-r--r-- | shared/radeon_drv.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/shared/radeon_drv.h b/shared/radeon_drv.h index a504fedc0..57cd5f4fd 100644 --- a/shared/radeon_drv.h +++ b/shared/radeon_drv.h @@ -92,6 +92,8 @@ typedef struct drm_radeon_private { int requested_bufs; int last_frame_reads; int last_clear_reads; + int clears; + int texture_uploads; } stats; int do_boxes; @@ -163,10 +165,11 @@ extern int radeon_cp_flip( DRM_IOCTL_ARGS ); /* Flags for stats.boxes */ -#define RADEON_BOX_DMA_IDLE 0x1 -#define RADEON_BOX_RING_FULL 0x2 -#define RADEON_BOX_FLIP 0x4 -#define RADEON_BOX_WAIT_IDLE 0x8 +#define RADEON_BOX_DMA_IDLE 0x1 +#define RADEON_BOX_RING_FULL 0x2 +#define RADEON_BOX_FLIP 0x4 +#define RADEON_BOX_WAIT_IDLE 0x8 +#define RADEON_BOX_TEXTURE_LOAD 0x10 @@ -682,8 +685,16 @@ do { \ } \ } while (0) + +/* Perfbox functionality only. + */ #define RING_SPACE_TEST_WITH_RETURN( dev_priv ) \ do { \ + if (!(dev_priv->stats.boxes & RADEON_BOX_DMA_IDLE)) { \ + u32 head = GET_RING_HEAD(&dev_priv->ring); \ + if (head == dev_priv->ring.tail) \ + dev_priv->stats.boxes |= RADEON_BOX_DMA_IDLE; \ + } \ } while (0) #define VB_AGE_TEST_WITH_RETURN( dev_priv ) \ |