diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-08-23 11:38:17 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-08-23 11:38:17 +0200 |
commit | 8c7c22e22b6076abc80e4e1aaa8d1f4cf2f3ed14 (patch) | |
tree | a85e8625ba44d6a390da2e7067686b4981d08dd1 | |
parent | 92fa7cc00688d7bfc1fb72e645ac30c6d92669c6 (diff) |
radeon: Wait for pending overlay flip to finish before emitting new one.
-rw-r--r-- | src/radeon_reg.h | 1 | ||||
-rw-r--r-- | src/radeon_video.c | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/radeon_reg.h b/src/radeon_reg.h index 9eae40d..af62a69 100644 --- a/src/radeon_reg.h +++ b/src/radeon_reg.h @@ -1094,6 +1094,7 @@ # define RADEON_REG_LD_CTL_VBLANK_DURING_LOCK 0x00000002L # define RADEON_REG_LD_CTL_STALL_GUI_UNTIL_FLIP 0x00000004L # define RADEON_REG_LD_CTL_LOCK_READBACK 0x00000008L +# define RADEON_REG_LD_CTL_FLIP_READBACK 0x00000010L #define RADEON_OV0_SCALE_CNTL 0x0420 # define RADEON_SCALER_HORZ_PICK_NEAREST 0x00000004L # define RADEON_SCALER_VERT_PICK_NEAREST 0x00000008L diff --git a/src/radeon_video.c b/src/radeon_video.c index 7b85108..73c9efc 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -2966,8 +2966,14 @@ RADEONPutImage( offset = (pPriv->video_offset) + (top * dstPitch); - if(pPriv->doubleBuffer) + if(pPriv->doubleBuffer) { + unsigned char *RADEONMMIO = info->MMIO; + + /* Wait for last flip to take effect */ + while(!(INREG(RADEON_OV0_REG_LOAD_CNTL) & RADEON_REG_LD_CTL_FLIP_READBACK)); + offset += pPriv->currentBuffer * new_size; + } dst_start = info->FB + offset; |