From 76f625511e61f9d5561885c77d2ff1436ed83797 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Mon, 8 Jan 2007 21:03:23 +1100 Subject: via: some PCI posting flushes Signed-off-by: Dave Airlie --- drivers/char/drm/via_dma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/char/drm/via_dma.c') diff --git a/drivers/char/drm/via_dma.c b/drivers/char/drm/via_dma.c index a691ae74129..2f72cbefc2f 100644 --- a/drivers/char/drm/via_dma.c +++ b/drivers/char/drm/via_dma.c @@ -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) -- cgit v1.2.3 From 756db73df7b7d6b9f6421c1fb2e1cabeaede5846 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Thu, 8 Feb 2007 12:57:40 +1100 Subject: drm/via: Disable AGP DMA for chips with the new 3D engine. --- drivers/char/drm/via_dma.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/char/drm/via_dma.c') diff --git a/drivers/char/drm/via_dma.c b/drivers/char/drm/via_dma.c index 2f72cbefc2f..c0539c6299c 100644 --- a/drivers/char/drm/via_dma.c +++ b/drivers/char/drm/via_dma.c @@ -190,6 +190,11 @@ static int via_initialize(drm_device_t * dev, return DRM_ERR(EFAULT); } + if (dev_priv->chipset == VIA_DX9_0) { + DRM_ERROR("AGP DMA is not supported on this chip\n"); + return DRM_ERR(EINVAL); + } + dev_priv->ring.map.offset = dev->agp->base + init->offset; dev_priv->ring.map.size = init->size; dev_priv->ring.map.type = 0; -- cgit v1.2.3