Skip to content

Commit 4e77f9f

Browse files
alexdeuchergregkh
authored andcommitted
drm/radeon: add a dpm quirk list
commit 4369a69 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>
1 parent 8dcffdd commit 4e77f9f

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

‎drivers/gpu/drm/radeon/radeon_pm.c‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,8 +1287,39 @@ static int radeon_pm_init_dpm(struct radeon_device *rdev)
12871287
return ret;
12881288
}
12891289

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+
12901306
int radeon_pm_init(struct radeon_device *rdev)
12911307
{
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+
12921323
/* enable dpm on rv6xx+ */
12931324
switch (rdev->family) {
12941325
case CHIP_RV610:
@@ -1344,6 +1375,8 @@ int radeon_pm_init(struct radeon_device *rdev)
13441375
(!(rdev->flags & RADEON_IS_IGP)) &&
13451376
(!rdev->smc_fw))
13461377
rdev->pm.pm_method = PM_METHOD_PROFILE;
1378+
else if (disable_dpm && (radeon_dpm == -1))
1379+
rdev->pm.pm_method = PM_METHOD_PROFILE;
13471380
else if (radeon_dpm == 0)
13481381
rdev->pm.pm_method = PM_METHOD_PROFILE;
13491382
else

0 commit comments

Comments
 (0)