summaryrefslogtreecommitdiff
path: root/shared/radeon_drv.h
diff options
context:
space:
mode:
Diffstat (limited to 'shared/radeon_drv.h')
-rw-r--r--shared/radeon_drv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/shared/radeon_drv.h b/shared/radeon_drv.h
index 57cd5f4fd..7c341b39e 100644
--- a/shared/radeon_drv.h
+++ b/shared/radeon_drv.h
@@ -76,6 +76,7 @@ typedef struct drm_radeon_private {
drm_radeon_freelist_t *tail;
int last_buf;
volatile u32 *scratch;
+ int writeback_works;
int usec_timeout;
@@ -233,6 +234,10 @@ extern int radeon_cp_flip( DRM_IOCTL_ARGS );
#define RADEON_SCRATCH_UMSK 0x0770
#define RADEON_SCRATCH_ADDR 0x0774
+#define GET_SCRATCH( x ) (dev_priv->writeback_works \
+ ? DRM_READ32( &dev_priv->scratch[(x)] ) \
+ : RADEON_READ( RADEON_SCRATCH_REG0 + 4*(x) ) )
+
#define RADEON_HOST_PATH_CNTL 0x0130
# define RADEON_HDP_SOFT_RESET (1 << 26)
# define RADEON_HDP_WC_TIMEOUT_MASK (7 << 28)