Skip to contentSkip to conversation

drm/amdgpu: Adjust IB test timeout for XGMI configuration

PATCH In review Liu, Shaoyun 3 participants 4 messages Apr 3, 2019 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Adjust IB test timeout for XGMI configuration

On XGMI configuration the ib test may tooks longer to finish

Change-Id If3afd8eac3c342d32c387804b51fc4a4bdd35d35
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +3 -1
index 0b8ef2d..6c508d7 100644
@@ -35,6 +35,7 @@
 #include "amdgpu_trace.h"
 
 #define AMDGPU_IB_TEST_TIMEOUT	msecs_to_jiffies(1000)
+#define AMDGPU_IB_TEST_GFX_XGMI_TIMEOU	msecs_to_jiffies(2000)
 
 /*
  * IB
@@ -344,7 +345,8 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
 		 * cost waiting for it coming back under RUNTIME only
 		*/
 		tmo_gfx = 8 * AMDGPU_IB_TEST_TIMEOUT;
-	}
+	} else if (adev->gmc.xgmi.hive_id)
+		tmo_gfx = AMDGPU_IB_TEST_GFX_XGMI_TIMEOU;
 
 	for (i = 0; i < adev->num_rings; ++i) {
 		struct amdgpu_ring *ring = adev->rings[i];
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1554306139-17280-1-git-send-email-shaoyun.liu-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 14 lines · Shaoyun

On XGMI configuration the ib test may tooks longer to finish

Change-Id If3afd8eac3c342d32c387804b51fc4a4bdd35d35
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0 -0
index 0b8ef2d..6c508d7 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c line 38

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1 -0
@@ -35,6 +35,7 @@
 #include "amdgpu_trace.h"
 
 #define AMDGPU_IB_TEST_TIMEOUT msecs_to_jiffies(1000)
+#define AMDGPU_IB_TEST_GFX_XGMI_TIMEOU msecs_to_jiffies(2000)

Typo:
TIMEOU -> TIMEOUT

drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c int amdgpu_ib_ring_tests(struct amdgpu_device *adev) · line 350

Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +2 -1
 /*
  * IB
@@ -344,7 +345,8 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
                 * cost waiting for it coming back under RUNTIME only
                */
                tmo_gfx = 8 * AMDGPU_IB_TEST_TIMEOUT;
-       }
+       } else if (adev->gmc.xgmi.hive_id)
+               tmo_gfx = AMDGPU_IB_TEST_GFX_XGMI_TIMEOU;
 

Coding style, if any clause has parens, all should. With these issues fixed, patch is:

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0 -1
        for (i = 0; i < adev->num_rings; ++i) {
                struct amdgpu_ring *ring = adev->rings[i];
--

2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#3 lore raw
In reply to a message not in the archive

Am 03.04.19 um 17:42 schrieb Liu, Shaoyun:

Quoted 21 lines

On XGMI configuration the ib test may tooks longer to finish

Change-Id If3afd8eac3c342d32c387804b51fc4a4bdd35d35
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1 -0
index 0b8ef2d..6c508d7 100644
@@ -35,6 +35,7 @@
  #include "amdgpu_trace.h"
 
  #define AMDGPU_IB_TEST_TIMEOUT	msecs_to_jiffies(1000)
+#define AMDGPU_IB_TEST_GFX_XGMI_TIMEOU	msecs_to_jiffies(2000)
 
  /*
   * IB

drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c int amdgpu_ib_ring_tests(struct amdgpu_device *adev) · line 349

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +2 -1
@@ -344,7 +345,8 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
  		 * cost waiting for it coming back under RUNTIME only
  		*/
  		tmo_gfx = 8 * AMDGPU_IB_TEST_TIMEOUT;
-	}
+	} else if (adev->gmc.xgmi.hive_id)
+		tmo_gfx = AMDGPU_IB_TEST_GFX_XGMI_TIMEOU;

A style nit pick here: The "else" branch should have { } as well when the "if" has them.

Apart from that the patch is Reviewed-by: Christian König <[email protected]>.

Christian.

drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c int amdgpu_ib_ring_tests(struct amdgpu_device *adev) · line 352

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0 -0
  	for (i = 0; i < adev->num_rings; ++i) {
  		struct amdgpu_ring *ring = adev->rings[i];

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 627a8360-3393-3fb3-4412-18e2b9adf771-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#5 lore raw

Thanks , changed as suggested and  pushed

Shaoyun.liu

Quoted 31 lines · Christian König

Am 03.04.19 um 17:42 schrieb Liu, Shaoyun:

Quoted 20 lines

On XGMI configuration the ib test may tooks longer to finish

Change-Id If3afd8eac3c342d32c387804b51fc4a4bdd35d35

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 +++-

  1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +1 -0
index 0b8ef2d..6c508d7 100644
@@ -35,6 +35,7 @@
   #include "amdgpu_trace.h"
     #define AMDGPU_IB_TEST_TIMEOUT    msecs_to_jiffies(1000)
+#define AMDGPU_IB_TEST_GFX_XGMI_TIMEOU msecs_to_jiffies(2000)
     /*
    * IB

drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c int amdgpu_ib_ring_tests(struct amdgpu_device *adev) · line 349

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +2 -1
@@ -344,7 +345,8 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
            * cost waiting for it coming back under RUNTIME only
           */
           tmo_gfx = 8 * AMDGPU_IB_TEST_TIMEOUT;
-    }
+    } else if (adev->gmc.xgmi.hive_id)
+        tmo_gfx = AMDGPU_IB_TEST_GFX_XGMI_TIMEOU;

A style nit pick here: The "else" branch should have { } as well when the "if" has them.

Quoted 8 lines

Apart from that the patch is Reviewed-by: Christian König <[email protected]>.

Christian.

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0 -0
         for (i = 0; i < adev->num_rings; ++i) {
           struct amdgpu_ring *ring = adev->rings[i];

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx