]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Jun 2023 12:05:05 +0000 (14:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Jun 2023 12:05:05 +0000 (14:05 +0200)
added patches:
drm-amdgpu-fix-xclk-freq-on-chip_stoney.patch

queue-4.14/drm-amdgpu-fix-xclk-freq-on-chip_stoney.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/drm-amdgpu-fix-xclk-freq-on-chip_stoney.patch b/queue-4.14/drm-amdgpu-fix-xclk-freq-on-chip_stoney.patch
new file mode 100644 (file)
index 0000000..bac6b8b
--- /dev/null
@@ -0,0 +1,41 @@
+From b447b079cf3a9971ea4d31301e673f49612ccc18 Mon Sep 17 00:00:00 2001
+From: Chia-I Wu <olvaffe@gmail.com>
+Date: Thu, 1 Jun 2023 14:48:08 -0700
+Subject: drm/amdgpu: fix xclk freq on CHIP_STONEY
+
+From: Chia-I Wu <olvaffe@gmail.com>
+
+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 <olvaffe@gmail.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -327,8 +327,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))
index 82b7318c591e18a1f5eca54b36b8a16f47dc82ee..05d709c2d786ba25910cb752826e19649f6091b7 100644 (file)
@@ -11,3 +11,4 @@ bnxt_en-query-default-vlan-before-vnic-setup-on-a-vf.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