Skip to content

Commit ff32f6a

Browse files
alexdeuchergregkh
authored andcommitted
drm/radeon: add si dpm quirk list
commit 5615f89 upstream. This adds a quirks list to fix stability problems with certain SI boards. bug: https://bugs.freedesktop.org/show_bug.cgi?id=76490 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4e77f9f commit ff32f6a

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

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

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2908,6 +2908,22 @@ static int si_init_smc_spll_table(struct radeon_device *rdev)
29082908
return ret;
29092909
}
29102910

2911+
struct si_dpm_quirk {
2912+
u32 chip_vendor;
2913+
u32 chip_device;
2914+
u32 subsys_vendor;
2915+
u32 subsys_device;
2916+
u32 max_sclk;
2917+
u32 max_mclk;
2918+
};
2919+
2920+
/* cards with dpm stability problems */
2921+
static struct si_dpm_quirk si_dpm_quirk_list[] = {
2922+
/* PITCAIRN - https://bugs.freedesktop.org/show_bug.cgi?id=76490 */
2923+
{ PCI_VENDOR_ID_ATI, 0x6810, 0x1462, 0x3036, 0, 120000 },
2924+
{ 0, 0, 0, 0 },
2925+
};
2926+
29112927
static void si_apply_state_adjust_rules(struct radeon_device *rdev,
29122928
struct radeon_ps *rps)
29132929
{
@@ -2918,7 +2934,22 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev,
29182934
u32 mclk, sclk;
29192935
u16 vddc, vddci;
29202936
u32 max_sclk_vddc, max_mclk_vddci, max_mclk_vddc;
2937+
u32 max_sclk = 0, max_mclk = 0;
29212938
int i;
2939+
struct si_dpm_quirk *p = si_dpm_quirk_list;
2940+
2941+
/* Apply dpm quirks */
2942+
while (p && p->chip_device != 0) {
2943+
if (rdev->pdev->vendor == p->chip_vendor &&
2944+
rdev->pdev->device == p->chip_device &&
2945+
rdev->pdev->subsystem_vendor == p->subsys_vendor &&
2946+
rdev->pdev->subsystem_device == p->subsys_device) {
2947+
max_sclk = p->max_sclk;
2948+
max_mclk = p->max_mclk;
2949+
break;
2950+
}
2951+
++p;
2952+
}
29222953

29232954
if ((rdev->pm.dpm.new_active_crtc_count > 1) ||
29242955
ni_dpm_vblank_too_short(rdev))
@@ -2972,6 +3003,14 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev,
29723003
if (ps->performance_levels[i].mclk > max_mclk_vddc)
29733004
ps->performance_levels[i].mclk = max_mclk_vddc;
29743005
}
3006+
if (max_mclk) {
3007+
if (ps->performance_levels[i].mclk > max_mclk)
3008+
ps->performance_levels[i].mclk = max_mclk;
3009+
}
3010+
if (max_sclk) {
3011+
if (ps->performance_levels[i].sclk > max_sclk)
3012+
ps->performance_levels[i].sclk = max_sclk;
3013+
}
29753014
}
29763015

29773016
/* XXX validate the min clocks required for display */

0 commit comments

Comments
 (0)