From: Greg Kroah-Hartman Date: Sun, 11 Jun 2023 12:05:29 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v4.14.318~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=49091379def17b113f401162b37135b9f8eb928e;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: drm-amdgpu-fix-xclk-freq-on-chip_stoney.patch --- diff --git a/queue-4.19/drm-amdgpu-fix-xclk-freq-on-chip_stoney.patch b/queue-4.19/drm-amdgpu-fix-xclk-freq-on-chip_stoney.patch new file mode 100644 index 00000000000..941fd31022d --- /dev/null +++ b/queue-4.19/drm-amdgpu-fix-xclk-freq-on-chip_stoney.patch @@ -0,0 +1,41 @@ +From b447b079cf3a9971ea4d31301e673f49612ccc18 Mon Sep 17 00:00:00 2001 +From: Chia-I Wu +Date: Thu, 1 Jun 2023 14:48:08 -0700 +Subject: drm/amdgpu: fix xclk freq on CHIP_STONEY + +From: Chia-I Wu + +commit b447b079cf3a9971ea4d31301e673f49612ccc18 upstream. + +According to Alex, most APUs from that time seem to have the same issue +(vbios says 48Mhz, actual is 100Mhz). I only have a CHIP_STONEY so I +limit the fixup to CHIP_STONEY + +Signed-off-by: Chia-I Wu +Signed-off-by: Alex Deucher +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/vi.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/vi.c ++++ b/drivers/gpu/drm/amd/amdgpu/vi.c +@@ -328,8 +328,15 @@ static u32 vi_get_xclk(struct amdgpu_dev + u32 reference_clock = adev->clock.spll.reference_freq; + u32 tmp; + +- if (adev->flags & AMD_IS_APU) +- return reference_clock; ++ if (adev->flags & AMD_IS_APU) { ++ switch (adev->asic_type) { ++ case CHIP_STONEY: ++ /* vbios says 48Mhz, but the actual freq is 100Mhz */ ++ return 10000; ++ default: ++ return reference_clock; ++ } ++ } + + tmp = RREG32_SMC(ixCG_CLKPIN_CNTL_2); + if (REG_GET_FIELD(tmp, CG_CLKPIN_CNTL_2, MUX_TCLK_TO_XCLK)) diff --git a/queue-4.19/series b/queue-4.19/series index d98fcca40f6..f5a4bbcba8a 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -12,3 +12,4 @@ lib-cpu_rmap-fix-potential-use-after-free-in-irq_cpu.patch batman-adv-broken-sync-while-rescheduling-delayed-work.patch input-xpad-delete-a-razer-deathadder-mouse-vid-pid-entry.patch input-psmouse-fix-oob-access-in-elantech-protocol.patch +drm-amdgpu-fix-xclk-freq-on-chip_stoney.patch