diff options
author | Eric Anholt <anholt@freebsd.org> | 2002-07-03 07:54:13 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2002-07-03 07:54:13 +0000 |
commit | c44982e1593075a53cc8378db58b418c5badb44f (patch) | |
tree | b8a49da4fca6bc8f6f5cd0f63cf91e6e2e87bd65 | |
parent | a7dfacf68c280a642f40f1ed6ce733968a672420 (diff) |
Merge from trunk to bsd-3-0-0-branch.
-rw-r--r-- | shared-core/radeon_drv.h | 4 | ||||
-rw-r--r-- | shared-core/radeon_state.c | 7 | ||||
-rw-r--r-- | shared/radeon_drv.h | 4 | ||||
-rw-r--r-- | shared/radeon_state.c | 7 |
4 files changed, 14 insertions, 8 deletions
diff --git a/shared-core/radeon_drv.h b/shared-core/radeon_drv.h index 981ae20d..ae66f12e 100644 --- a/shared-core/radeon_drv.h +++ b/shared-core/radeon_drv.h @@ -458,6 +458,7 @@ extern int radeon_cp_flip( DRM_IOCTL_ARGS ); # define RADEON_CNTL_HOSTDATA_BLT 0x00009400 # define RADEON_CNTL_PAINT_MULTI 0x00009A00 # define RADEON_CNTL_BITBLT_MULTI 0x00009B00 +# define RADEON_CNTL_SET_SCISSORS 0xC0001E00 #define RADEON_CP_PACKET_MASK 0xC0000000 #define RADEON_CP_PACKET_COUNT_MASK 0x3fff0000 @@ -712,7 +713,8 @@ do { \ } while (0) #define COMMIT_RING() do { \ - RADEON_WRITE( RADEON_CP_RB_WPTR, dev_priv->ring.tail ); \ + radeon_flush_write_combine(); \ + RADEON_WRITE( RADEON_CP_RB_WPTR, dev_priv->ring.tail ); \ } while (0) #define OUT_RING( x ) do { \ diff --git a/shared-core/radeon_state.c b/shared-core/radeon_state.c index ec00b880..88f0605f 100644 --- a/shared-core/radeon_state.c +++ b/shared-core/radeon_state.c @@ -46,10 +46,9 @@ static __inline__ void radeon_emit_clip_rect( drm_radeon_private_t *dev_priv, DRM_DEBUG( " box: x1=%d y1=%d x2=%d y2=%d\n", box->x1, box->y1, box->x2, box->y2 ); - BEGIN_RING( 4 ); - OUT_RING( CP_PACKET0( RADEON_RE_TOP_LEFT, 0 ) ); + BEGIN_RING( 3 ); + OUT_RING( CP_PACKET3( RADEON_CNTL_SET_SCISSORS, 1 )); OUT_RING( (box->y1 << 16) | box->x1 ); - OUT_RING( CP_PACKET0( RADEON_RE_WIDTH_HEIGHT, 0 ) ); /* OUT_RING( ((box->y2 - 1) << 16) | (box->x2 - 1) );*/ OUT_RING( (box->y2 << 16) | box->x2 ); ADVANCE_RING(); @@ -1083,6 +1082,7 @@ static int radeon_do_init_pageflip( drm_device_t *dev ) dev_priv->page_flipping = 1; dev_priv->current_page = 0; + dev_priv->sarea_priv->pfCurrentPage = dev_priv->current_page; return 0; } @@ -1097,6 +1097,7 @@ int radeon_do_cleanup_pageflip( drm_device_t *dev ) dev_priv->page_flipping = 0; dev_priv->current_page = 0; + dev_priv->sarea_priv->pfCurrentPage = dev_priv->current_page; return 0; } diff --git a/shared/radeon_drv.h b/shared/radeon_drv.h index 981ae20d..ae66f12e 100644 --- a/shared/radeon_drv.h +++ b/shared/radeon_drv.h @@ -458,6 +458,7 @@ extern int radeon_cp_flip( DRM_IOCTL_ARGS ); # define RADEON_CNTL_HOSTDATA_BLT 0x00009400 # define RADEON_CNTL_PAINT_MULTI 0x00009A00 # define RADEON_CNTL_BITBLT_MULTI 0x00009B00 +# define RADEON_CNTL_SET_SCISSORS 0xC0001E00 #define RADEON_CP_PACKET_MASK 0xC0000000 #define RADEON_CP_PACKET_COUNT_MASK 0x3fff0000 @@ -712,7 +713,8 @@ do { \ } while (0) #define COMMIT_RING() do { \ - RADEON_WRITE( RADEON_CP_RB_WPTR, dev_priv->ring.tail ); \ + radeon_flush_write_combine(); \ + RADEON_WRITE( RADEON_CP_RB_WPTR, dev_priv->ring.tail ); \ } while (0) #define OUT_RING( x ) do { \ diff --git a/shared/radeon_state.c b/shared/radeon_state.c index ec00b880..88f0605f 100644 --- a/shared/radeon_state.c +++ b/shared/radeon_state.c @@ -46,10 +46,9 @@ static __inline__ void radeon_emit_clip_rect( drm_radeon_private_t *dev_priv, DRM_DEBUG( " box: x1=%d y1=%d x2=%d y2=%d\n", box->x1, box->y1, box->x2, box->y2 ); - BEGIN_RING( 4 ); - OUT_RING( CP_PACKET0( RADEON_RE_TOP_LEFT, 0 ) ); + BEGIN_RING( 3 ); + OUT_RING( CP_PACKET3( RADEON_CNTL_SET_SCISSORS, 1 )); OUT_RING( (box->y1 << 16) | box->x1 ); - OUT_RING( CP_PACKET0( RADEON_RE_WIDTH_HEIGHT, 0 ) ); /* OUT_RING( ((box->y2 - 1) << 16) | (box->x2 - 1) );*/ OUT_RING( (box->y2 << 16) | box->x2 ); ADVANCE_RING(); @@ -1083,6 +1082,7 @@ static int radeon_do_init_pageflip( drm_device_t *dev ) dev_priv->page_flipping = 1; dev_priv->current_page = 0; + dev_priv->sarea_priv->pfCurrentPage = dev_priv->current_page; return 0; } @@ -1097,6 +1097,7 @@ int radeon_do_cleanup_pageflip( drm_device_t *dev ) dev_priv->page_flipping = 0; dev_priv->current_page = 0; + dev_priv->sarea_priv->pfCurrentPage = dev_priv->current_page; return 0; } |