aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
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/radeon
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/radeon')
-rw-r--r--drivers/gpu/drm/radeon/radeon_cp.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_kms.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c
index 72ae8266b8e9..0ebb7d4796fa 100644
--- a/drivers/gpu/drm/radeon/radeon_cp.c
+++ b/drivers/gpu/drm/radeon/radeon_cp.c
@@ -2115,6 +2115,8 @@ int radeon_driver_load(struct drm_device *dev, unsigned long flags)
2115 break; 2115 break;
2116 } 2116 }
2117 2117
2118 pci_set_master(dev->pdev);
2119
2118 if (drm_pci_device_is_agp(dev)) 2120 if (drm_pci_device_is_agp(dev))
2119 dev_priv->flags |= RADEON_IS_AGP; 2121 dev_priv->flags |= RADEON_IS_AGP;
2120 else if (pci_is_pcie(dev->pdev)) 2122 else if (pci_is_pcie(dev->pdev))
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index d3352889a870..1986ebae1ef2 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -57,6 +57,8 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
57 } 57 }
58 dev->dev_private = (void *)rdev; 58 dev->dev_private = (void *)rdev;
59 59
60 pci_set_master(dev->pdev);
61
60 /* update BUS flag */ 62 /* update BUS flag */
61 if (drm_pci_device_is_agp(dev)) { 63 if (drm_pci_device_is_agp(dev)) {
62 flags |= RADEON_IS_AGP; 64 flags |= RADEON_IS_AGP;