aboutsummaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-10-16 10:53:55 +1000
committerDave Airlie <airlied@redhat.com>2008-10-16 10:53:55 +1000
commit318770a78dc563a9a2780614fa3bf6c813584889 (patch)
tree94a1e5fa7dec6fa71cd67394198dba7359383d34 /linux-core
parent9c5819fc60808b00949f6aee55424f17a8b4f419 (diff)
radeon: fixup suspend/resume bus master enable
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/radeon_pm.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/linux-core/radeon_pm.c b/linux-core/radeon_pm.c
index 1a814d91..0a068cb8 100644
--- a/linux-core/radeon_pm.c
+++ b/linux-core/radeon_pm.c
@@ -97,12 +97,14 @@ int radeon_resume(struct drm_device *dev)
pci_restore_state(dev->pdev);
if (pci_enable_device(dev->pdev))
return -1;
- pci_set_master(dev->pdev);
- /* Turn on bus mastering */
- tmp = RADEON_READ(RADEON_BUS_CNTL) & ~RADEON_BUS_MASTER_DIS;
- RADEON_WRITE(RADEON_BUS_CNTL, tmp);
+ /* Turn on bus mastering -todo fix properly */
+ if (dev_priv->chip_family < CHIP_RV380) {
+ tmp = RADEON_READ(RADEON_BUS_CNTL) & ~RADEON_BUS_MASTER_DIS;
+ RADEON_WRITE(RADEON_BUS_CNTL, tmp);
+ }
+ DRM_ERROR("\n");
/* on atom cards re init the whole card
and set the modes again */
@@ -113,6 +115,8 @@ int radeon_resume(struct drm_device *dev)
radeon_combios_asic_init(dev);
}
+ pci_set_master(dev->pdev);
+
for (i = 0; i < 8; i++)
RADEON_WRITE(RADEON_BIOS_0_SCRATCH + (i * 4), dev_priv->pmregs.bios_scratch[i]);
@@ -160,7 +164,7 @@ int radeon_resume(struct drm_device *dev)
master_priv->sarea_priv->ctx_owner = 0;
}
- /* unpin the front buffers */
+ /* pin the front buffers */
list_for_each_entry(fb, &dev->mode_config.fb_kernel_list, filp_head) {
struct radeon_framebuffer *radeon_fb = to_radeon_framebuffer(fb);