diff options
Diffstat (limited to 'linux/r128_drv.h')
-rw-r--r-- | linux/r128_drv.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/linux/r128_drv.h b/linux/r128_drv.h index c5cd2181..0b2e9259 100644 --- a/linux/r128_drv.h +++ b/linux/r128_drv.h @@ -289,6 +289,8 @@ extern int r128_context_switch_complete(drm_device_t *dev, int new); #define R128_TEX_CNTL_C 0x1c9c # define R128_TEX_CACHE_FLUSH (1 << 23) +#define R128_WAIT_UNTIL 0x1720 +# define R128_EVENT_CRTC_OFFSET (1 << 0) #define R128_WINDOW_XY_OFFSET 0x1bcc @@ -398,6 +400,8 @@ extern int r128_context_switch_complete(drm_device_t *dev, int new); #define R128_RING_HIGH_MARK 128 +#define R128_PERFORMANCE_BOXES 0 + #define R128_BASE(reg) ((u32)(dev_priv->mmio->handle)) #define R128_ADDR(reg) (R128_BASE(reg) + reg) @@ -410,6 +414,7 @@ extern int r128_context_switch_complete(drm_device_t *dev, int new); #define R128_READ8(reg) R128_DEREF8(reg) #define R128_WRITE8(reg,val) do { R128_DEREF8(reg) = val; } while (0) + #define R128_WRITE_PLL(addr,val) \ do { \ R128_WRITE8(R128_CLOCK_CNTL_INDEX, ((addr) & 0x1f) | R128_PLL_WR_EN); \ @@ -428,8 +433,6 @@ extern int R128_READ_PLL(drm_device_t *dev, int addr); (pkt) | ((n) << 16)) - - /* ================================================================ * Misc helper macros */ @@ -473,6 +476,12 @@ do { \ } \ } while (0) +#define R128_WAIT_UNTIL_PAGE_FLIPPED() \ +do { \ + OUT_RING( CCE_PACKET0( R128_WAIT_UNTIL, 0 ) ); \ + OUT_RING( R128_EVENT_CRTC_OFFSET ); \ +} while (0) + /* ================================================================ * Ring control @@ -518,6 +527,4 @@ do { \ write &= tail_mask; \ } while (0) -#define R128_PERFORMANCE_BOXES 0 - #endif /* __R128_DRV_H__ */ |