Re: [PATCH v2 2/3] drm/amdgpu: convert code name to ip version for noretry set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Christian,


Am 02.03.22 um 08:46 schrieb Christian König:
Am 01.03.22 um 16:24 schrieb Paul Menzel:

[…]

Am 01.03.22 um 16:01 schrieb Yifan Zhang:
Use IP version rather than codename for noretry set.

Why?

Why not?

No idea as the commit message currently does not document the motivation.

Signed-off-by: Yifan Zhang <yifan1.zhang@xxxxxxx>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 17 ++++++++---------
  1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index ab75e189bc0b..fbc22b7b6315 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -559,14 +559,14 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
  {
      struct amdgpu_gmc *gmc = &adev->gmc;
  -    switch (adev->asic_type) {
-    case CHIP_VEGA10:
-    case CHIP_VEGA20:
-    case CHIP_ARCTURUS:
-    case CHIP_ALDEBARAN:
-    case CHIP_BEIGE_GOBY:
-    case CHIP_YELLOW_CARP:
-    case CHIP_RENOIR:
+    switch (adev->ip_versions[GC_HWIP][0]) {
+    case IP_VERSION(9, 0, 1):
+    case IP_VERSION(9, 4, 0):
+    case IP_VERSION(9, 4, 1):
+    case IP_VERSION(9, 4, 2):
+    case IP_VERSION(10, 3, 5):
+    case IP_VERSION(10, 3, 3):
+    case IP_VERSION(9, 3, 0):

I think, sorting these entries might be useful.

Should the names be added as comments for those not having them memorized?

          /*
           * noretry = 0 will cause kfd page fault tests fail
           * for some ASICs, so set default to 1 for these ASICs.
@@ -576,7 +576,6 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
          else
              gmc->noretry = amdgpu_noretry;
          break;
-    case CHIP_RAVEN:

Why remove this?

      default:
          /* Raven currently has issues with noretry
           * regardless of what we decide for other


Kind regards,

Paul



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux