aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-12-19 06:15:29 -0500
committerDave Airlie <airlied@redhat.com>2012-02-16 13:31:07 -0500
commit466e69b8b03b8c1987367912782bc12988ad8794 (patch)
tree60ac84ef32b7590618bc81b0b52a5ba14a49bf45 /drivers/gpu/drm/vmwgfx
parent42b923b587d055cd98fb84f32e3e758672026ae9 (diff)
drm: move pci bus master enable into driver.
The current enabling of bus mastering in the drm midlayer allows a large race condition under kexec. When a kexec'ed kernel re-enables bus mastering for the GPU, previously setup dma blocks may cause writes to random pieces of memory. On radeon the writeback mechanism can cause these sorts of issues. This patch doesn't fix the problem, but it moves the bus master enable under the individual drivers control so they can move enabling it until later in their load cycle and close the race. Fix for radeon kms driver will be in a follow-up patch. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_drv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index f076f66b1153..1760aba9ecef 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -439,6 +439,8 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
439 } 439 }
440 memset(dev_priv, 0, sizeof(*dev_priv)); 440 memset(dev_priv, 0, sizeof(*dev_priv));
441 441
442 pci_set_master(dev->pdev);
443
442 dev_priv->dev = dev; 444 dev_priv->dev = dev;
443 dev_priv->vmw_chipset = chipset; 445 dev_priv->vmw_chipset = chipset;
444 dev_priv->last_read_seqno = (uint32_t) -100; 446 dev_priv->last_read_seqno = (uint32_t) -100;