diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_drv.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index fef207881f45..13a60f4d4227 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -41,23 +41,15 @@ int radeon_no_wb; | |||
41 | MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers"); | 41 | MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers"); |
42 | module_param_named(no_wb, radeon_no_wb, int, 0444); | 42 | module_param_named(no_wb, radeon_no_wb, int, 0444); |
43 | 43 | ||
44 | static int dri_library_name(struct drm_device *dev, char *buf) | ||
45 | { | ||
46 | drm_radeon_private_t *dev_priv = dev->dev_private; | ||
47 | int family = dev_priv->flags & RADEON_FAMILY_MASK; | ||
48 | |||
49 | return snprintf(buf, PAGE_SIZE, "%s\n", | ||
50 | (family < CHIP_R200) ? "radeon" : | ||
51 | ((family < CHIP_R300) ? "r200" : | ||
52 | "r300")); | ||
53 | } | ||
54 | |||
55 | static int radeon_suspend(struct drm_device *dev, pm_message_t state) | 44 | static int radeon_suspend(struct drm_device *dev, pm_message_t state) |
56 | { | 45 | { |
57 | drm_radeon_private_t *dev_priv = dev->dev_private; | 46 | drm_radeon_private_t *dev_priv = dev->dev_private; |
58 | 47 | ||
48 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) | ||
49 | return 0; | ||
50 | |||
59 | /* Disable *all* interrupts */ | 51 | /* Disable *all* interrupts */ |
60 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS690) | 52 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS600) |
61 | RADEON_WRITE(R500_DxMODE_INT_MASK, 0); | 53 | RADEON_WRITE(R500_DxMODE_INT_MASK, 0); |
62 | RADEON_WRITE(RADEON_GEN_INT_CNTL, 0); | 54 | RADEON_WRITE(RADEON_GEN_INT_CNTL, 0); |
63 | return 0; | 55 | return 0; |
@@ -67,8 +59,11 @@ static int radeon_resume(struct drm_device *dev) | |||
67 | { | 59 | { |
68 | drm_radeon_private_t *dev_priv = dev->dev_private; | 60 | drm_radeon_private_t *dev_priv = dev->dev_private; |
69 | 61 | ||
62 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) | ||
63 | return 0; | ||
64 | |||
70 | /* Restore interrupt registers */ | 65 | /* Restore interrupt registers */ |
71 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS690) | 66 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RS600) |
72 | RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg); | 67 | RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg); |
73 | RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg); | 68 | RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg); |
74 | return 0; | 69 | return 0; |
@@ -95,7 +90,6 @@ static struct drm_driver driver = { | |||
95 | .get_vblank_counter = radeon_get_vblank_counter, | 90 | .get_vblank_counter = radeon_get_vblank_counter, |
96 | .enable_vblank = radeon_enable_vblank, | 91 | .enable_vblank = radeon_enable_vblank, |
97 | .disable_vblank = radeon_disable_vblank, | 92 | .disable_vblank = radeon_disable_vblank, |
98 | .dri_library_name = dri_library_name, | ||
99 | .master_create = radeon_master_create, | 93 | .master_create = radeon_master_create, |
100 | .master_destroy = radeon_master_destroy, | 94 | .master_destroy = radeon_master_destroy, |
101 | .irq_preinstall = radeon_driver_irq_preinstall, | 95 | .irq_preinstall = radeon_driver_irq_preinstall, |