]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
via: some PCI posting flushes
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Mon, 8 Jan 2007 10:03:23 +0000 (21:03 +1100)
committerDave Airlie <airlied@linux.ie>
Thu, 8 Feb 2007 02:24:25 +0000 (13:24 +1100)
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/char/drm/via_dma.c
drivers/char/drm/via_dmablit.c

index a691ae74129db2db470f843de39ec1199e7a82e1..2f72cbefc2ff6f107e41c8ba0a4ef6cd7e80ed39 100644 (file)
@@ -480,6 +480,7 @@ static int via_hook_segment(drm_via_private_t * dev_priv,
                        VIA_WRITE(VIA_REG_TRANSET, (HC_ParaType_PreCR << 16));
                        VIA_WRITE(VIA_REG_TRANSPACE, pause_addr_hi);
                        VIA_WRITE(VIA_REG_TRANSPACE, pause_addr_lo);
+                       VIA_READ(VIA_REG_TRANSPACE);
                }
        }
        return paused;
@@ -557,8 +558,9 @@ static void via_cmdbuf_start(drm_via_private_t * dev_priv)
 
        VIA_WRITE(VIA_REG_TRANSPACE, pause_addr_hi);
        VIA_WRITE(VIA_REG_TRANSPACE, pause_addr_lo);
-
+       DRM_WRITEMEMORYBARRIER();
        VIA_WRITE(VIA_REG_TRANSPACE, command | HC_HAGPCMNT_MASK);
+       VIA_READ(VIA_REG_TRANSPACE);
 }
 
 static void via_pad_cache(drm_via_private_t * dev_priv, int qwords)
index 806f9ce5f47b6a16dfb5c5ddc9943879b25239cb..2054d5773717ac6952fcfcf84186930c022067a5 100644 (file)
@@ -218,7 +218,9 @@ via_fire_dmablit(drm_device_t *dev, drm_via_sg_info_t *vsg, int engine)
        VIA_WRITE(VIA_PCI_DMA_MR0  + engine*0x04, VIA_DMA_MR_CM | VIA_DMA_MR_TDIE);
        VIA_WRITE(VIA_PCI_DMA_BCR0 + engine*0x10, 0);
        VIA_WRITE(VIA_PCI_DMA_DPR0 + engine*0x10, vsg->chain_start);
+       DRM_WRITEMEMORYBARRIER();
        VIA_WRITE(VIA_PCI_DMA_CSR0 + engine*0x04, VIA_DMA_CSR_DE | VIA_DMA_CSR_TS);
+       VIA_READ(VIA_PCI_DMA_CSR0 + engine*0x04);
 }
 
 /*