aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_pm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 32522cc940a1..f7da8fe96a66 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -1287,8 +1287,39 @@ dpm_failed:
1287 return ret; 1287 return ret;
1288} 1288}
1289 1289
1290struct radeon_dpm_quirk {
1291 u32 chip_vendor;
1292 u32 chip_device;
1293 u32 subsys_vendor;
1294 u32 subsys_device;
1295};
1296
1297/* cards with dpm stability problems */
1298static struct radeon_dpm_quirk radeon_dpm_quirk_list[] = {
1299 /* TURKS - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1386534 */
1300 { PCI_VENDOR_ID_ATI, 0x6759, 0x1682, 0x3195 },
1301 /* TURKS - https://bugzilla.kernel.org/show_bug.cgi?id=83731 */
1302 { PCI_VENDOR_ID_ATI, 0x6840, 0x1179, 0xfb81 },
1303 { 0, 0, 0, 0 },
1304};
1305
1290int radeon_pm_init(struct radeon_device *rdev) 1306int radeon_pm_init(struct radeon_device *rdev)
1291{ 1307{
1308 struct radeon_dpm_quirk *p = radeon_dpm_quirk_list;
1309 bool disable_dpm = false;
1310
1311 /* Apply dpm quirks */
1312 while (p && p->chip_device != 0) {
1313 if (rdev->pdev->vendor == p->chip_vendor &&
1314 rdev->pdev->device == p->chip_device &&
1315 rdev->pdev->subsystem_vendor == p->subsys_vendor &&
1316 rdev->pdev->subsystem_device == p->subsys_device) {
1317 disable_dpm = true;
1318 break;
1319 }
1320 ++p;
1321 }
1322
1292 /* enable dpm on rv6xx+ */ 1323 /* enable dpm on rv6xx+ */
1293 switch (rdev->family) { 1324 switch (rdev->family) {
1294 case CHIP_RV610: 1325 case CHIP_RV610:
@@ -1344,6 +1375,8 @@ int radeon_pm_init(struct radeon_device *rdev)
1344 (!(rdev->flags & RADEON_IS_IGP)) && 1375 (!(rdev->flags & RADEON_IS_IGP)) &&
1345 (!rdev->smc_fw)) 1376 (!rdev->smc_fw))
1346 rdev->pm.pm_method = PM_METHOD_PROFILE; 1377 rdev->pm.pm_method = PM_METHOD_PROFILE;
1378 else if (disable_dpm && (radeon_dpm == -1))
1379 rdev->pm.pm_method = PM_METHOD_PROFILE;
1347 else if (radeon_dpm == 0) 1380 else if (radeon_dpm == 0)
1348 rdev->pm.pm_method = PM_METHOD_PROFILE; 1381 rdev->pm.pm_method = PM_METHOD_PROFILE;
1349 else 1382 else