[PATCH] drm/amdgpu: limit harvest bit read on several ASICs

Deucher, Alexander Alexander.Deucher at amd.com
Tue Feb 22 15:25:55 UTC 2022


[AMD Official Use Only]

Acked-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: Chen, Guchun <Guchun.Chen at amd.com>
Sent: Tuesday, February 22, 2022 10:07 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher at amd.com>; Zhang, Hawking <Hawking.Zhang at amd.com>; Koenig, Christian <Christian.Koenig at amd.com>; Pan, Xinhui <Xinhui.Pan at amd.com>
Cc: Chen, Guchun <Guchun.Chen at amd.com>
Subject: [PATCH] drm/amdgpu: limit harvest bit read on several ASICs

Due to faulty VBIOS out there, harvest bit setting is not
consistently correct especially for display IP. So far,
it's hard to work out a solution on all the legacy Navi1x
ASICs in a short time, so to avoid regression, limit harvest
bit read on several ASICs. Will revisit later once VBIOS has
corrected it in long term.

Fixes: b3f4ea887d5f("drm/amdgpu: read harvest bit per IP data on legacy GPUs")
Signed-off-by: Guchun Chen <guchun.chen at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index 11255290f117..2e0ff1ace6fc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -1129,12 +1129,20 @@ void amdgpu_discovery_harvest_ip(struct amdgpu_device *adev)
          * so read harvest bit per IP data structure to set
          * harvest configuration.
          */
-       if (adev->ip_versions[GC_HWIP][0] < IP_VERSION(10, 2, 0))
-               amdgpu_discovery_read_harvest_bit_per_ip(adev,
-                                                       &vcn_harvest_count);
-       else
+       if (adev->ip_versions[GC_HWIP][0] < IP_VERSION(10, 2, 0)) {
+               if ((adev->pdev->device == 0x731E &&
+                       (adev->pdev->revision == 0xC6 ||
+                        adev->pdev->revision == 0xC7)) ||
+                       (adev->pdev->device == 0x7340 &&
+                        adev->pdev->revision == 0xC9) ||
+                       (adev->pdev->device == 0x7360 &&
+                        adev->pdev->revision == 0xC7))
+                       amdgpu_discovery_read_harvest_bit_per_ip(adev,
+                               &vcn_harvest_count);
+       } else {
                 amdgpu_disocvery_read_from_harvest_table(adev,
-                                                       &vcn_harvest_count);
+                       &vcn_harvest_count);
+       }

         amdgpu_discovery_harvest_config_quirk(adev);

--
2.17.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20220222/5eee3978/attachment.htm>


More information about the amd-gfx mailing list