From 7800407a2db4b7307192bf3b43fffb9c4748b9c0 Mon Sep 17 00:00:00 2001 From: Marc Aurele La France Date: Sat, 29 Jul 2006 01:00:56 +0300 Subject: Bug #807: invalidate read-back cache. Fix corruption when scaling 1-pixel wide pixmaps, in which case the first CPU read of the framebuffer will return stale data. This bug always manifests itself in mach64 EXA (to be committed soon), with this patch mach64 EXA passes rendercheck. --- src/atimach64.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/atimach64.c') diff --git a/src/atimach64.c b/src/atimach64.c index 166aaf0c..2cdec787 100644 --- a/src/atimach64.c +++ b/src/atimach64.c @@ -183,6 +183,7 @@ ATIMach64PreInit if (pATI->Chip >= ATI_CHIP_264VTB) { + pATIHW->mem_buf_cntl = inr(MEM_BUF_CNTL) | INVALIDATE_RB_CACHE; pATIHW->mem_cntl = (pATI->LockData.mem_cntl & ~(CTL_MEM_LOWER_APER_ENDIAN | CTL_MEM_UPPER_APER_ENDIAN)) | SetBits(CTL_MEM_APER_BYTE_ENDIAN, CTL_MEM_LOWER_APER_ENDIAN); @@ -424,6 +425,7 @@ ATIMach64Save if (pATI->Chip >= ATI_CHIP_264VTB) { + pATIHW->mem_buf_cntl = inr(MEM_BUF_CNTL) | INVALIDATE_RB_CACHE; pATIHW->mem_cntl = inr(MEM_CNTL); pATIHW->mpp_config = inr(MPP_CONFIG); pATIHW->mpp_strobe_seq = inr(MPP_STROBE_SEQ); @@ -1057,6 +1059,7 @@ ATIMach64Set if (pATI->Chip >= ATI_CHIP_264VTB) { + outr(MEM_BUF_CNTL, pATIHW->mem_buf_cntl); outr(MEM_CNTL, pATIHW->mem_cntl); outr(MPP_CONFIG, pATIHW->mpp_config); outr(MPP_STROBE_SEQ, pATIHW->mpp_strobe_seq); -- cgit v1.2.3