From 8c7c22e22b6076abc80e4e1aaa8d1f4cf2f3ed14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 23 Aug 2007 11:38:17 +0200 Subject: radeon: Wait for pending overlay flip to finish before emitting new one. --- src/radeon_reg.h | 1 + src/radeon_video.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3