Skip to content

Commit b8cbc52

Browse files
alexdeuchergregkh
authored andcommitted
drm/radeon: add missing revision check for CI
commit 1722381 upstream. The memory level workarounds only apply to revision 0 SKUs. Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/1816 Fixes: 127e056 ("drm/radeon: fix mclk vddc configuration for cards for hawaii") Fixes: 21b8a36 ("drm/radeon: fix dram timing for certain hawaii boards") Fixes: 90b2fee ("drm/radeon: fix dpm mc init for certain hawaii boards") Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Kent Russell <kent.russell@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 4d8dcc1) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 91c6dc5 commit b8cbc52

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

drivers/gpu/drm/radeon/ci_dpm.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2466,7 +2466,8 @@ static void ci_register_patching_mc_arb(struct radeon_device *rdev,
24662466

24672467
if (patch &&
24682468
((rdev->pdev->device == 0x67B0) ||
2469-
(rdev->pdev->device == 0x67B1))) {
2469+
(rdev->pdev->device == 0x67B1)) &&
2470+
(rdev->pdev->revision == 0)) {
24702471
if ((memory_clock > 100000) && (memory_clock <= 125000)) {
24712472
tmp2 = (((0x31 * engine_clock) / 125000) - 1) & 0xff;
24722473
*dram_timimg2 &= ~0x00ff0000;
@@ -3307,7 +3308,8 @@ static int ci_populate_all_memory_levels(struct radeon_device *rdev)
33073308
pi->smc_state_table.MemoryLevel[0].EnabledForActivity = 1;
33083309

33093310
if ((dpm_table->mclk_table.count >= 2) &&
3310-
((rdev->pdev->device == 0x67B0) || (rdev->pdev->device == 0x67B1))) {
3311+
((rdev->pdev->device == 0x67B0) || (rdev->pdev->device == 0x67B1)) &&
3312+
(rdev->pdev->revision == 0)) {
33113313
pi->smc_state_table.MemoryLevel[1].MinVddc =
33123314
pi->smc_state_table.MemoryLevel[0].MinVddc;
33133315
pi->smc_state_table.MemoryLevel[1].MinVddcPhases =
@@ -4504,7 +4506,8 @@ static int ci_register_patching_mc_seq(struct radeon_device *rdev,
45044506

45054507
if (patch &&
45064508
((rdev->pdev->device == 0x67B0) ||
4507-
(rdev->pdev->device == 0x67B1))) {
4509+
(rdev->pdev->device == 0x67B1)) &&
4510+
(rdev->pdev->revision == 0)) {
45084511
for (i = 0; i < table->last; i++) {
45094512
if (table->last >= SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE)
45104513
return -EINVAL;

0 commit comments

Comments
 (0)