diff options
-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 9eae40dc..af62a692 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 7b851089..73c9efc4 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; |