Commit 4e77f9fb47c9455be7ef8a2aa23bb3bf54567b2c
Committed by
Greg Kroah-Hartman
1 parent
8dcffdd314
drm/radeon: add a dpm quirk list
commit 4369a69ec6ab86821352bd753c68af5880f87956 upstream. Disable dpm on certain problematic boards rather than disabling dpm for the entire chip family since most boards work fine. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1386534 https://bugzilla.kernel.org/show_bug.cgi?id=83731 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 1 changed file with 33 additions and 0 deletions Side-by-side Diff
drivers/gpu/drm/radeon/radeon_pm.c
... | ... | @@ -1287,8 +1287,39 @@ |
1287 | 1287 | return ret; |
1288 | 1288 | } |
1289 | 1289 | |
1290 | +struct 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 */ | |
1298 | +static 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 | + | |
1290 | 1306 | int 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 | 1323 | /* enable dpm on rv6xx+ */ |
1293 | 1324 | switch (rdev->family) { |
1294 | 1325 | case CHIP_RV610: |
... | ... | @@ -1343,6 +1374,8 @@ |
1343 | 1374 | else if ((rdev->family >= CHIP_RV770) && |
1344 | 1375 | (!(rdev->flags & RADEON_IS_IGP)) && |
1345 | 1376 | (!rdev->smc_fw)) |
1377 | + rdev->pm.pm_method = PM_METHOD_PROFILE; | |
1378 | + else if (disable_dpm && (radeon_dpm == -1)) | |
1346 | 1379 | rdev->pm.pm_method = PM_METHOD_PROFILE; |
1347 | 1380 | else if (radeon_dpm == 0) |
1348 | 1381 | rdev->pm.pm_method = PM_METHOD_PROFILE; |