Skip to contentSkip to conversation

drm/amdgpu: export test ib debugfs interface

PATCH Superseded Huang Rui 4 participants 10 messages May 11, 2017 5 messages not in the archive

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Huang Rui

author
#0 lore raw

PATCH 1/2 drm/amdgpu: export test ib debugfs interface

As Christian and David's suggestion, submit the test ib ring debug interfaces. It's useful for debugging with the command submission without VM case.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 36 ++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +36 -0
index b93356b..7becf11 100644
@@ -59,6 +59,7 @@
 
 static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev);
 static void amdgpu_debugfs_regs_cleanup(struct amdgpu_device *adev);
+static int amdgpu_debugfs_test_ib_ring_init(struct amdgpu_device *adev);
 
 static const char *amdgpu_asic_name[] = {
 	"TAHITI",
@@ -2083,6 +2084,10 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 	if (r)
 		DRM_ERROR("registering register debugfs failed (%d).\n", r);
 
+	r = amdgpu_debugfs_test_ib_ring_init(adev);
+	if (r)
+		DRM_ERROR("registering register test ib ring debugfs failed (%d).\n", r);
+
 	r = amdgpu_debugfs_firmware_init(adev);
 	if (r)
 		DRM_ERROR("registering firmware debugfs failed (%d).\n", r);
@@ -3603,6 +3608,33 @@ static void amdgpu_debugfs_regs_cleanup(struct amdgpu_device *adev)
 	}
 }
 
+static int amdgpu_debugfs_test_ib(struct seq_file *m, void *data)
+{
+	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_device *dev = node->minor->dev;
+	struct amdgpu_device *adev = dev->dev_private;
+	int r = 0;
+
+	seq_printf(m, "run ib test:\n");
+	r = amdgpu_ib_ring_tests(adev);
+	if (r)
+		seq_printf(m, "ib ring tests failed (%d).\n", r);
+	else
+		seq_printf(m, "ib ring tests passed.\n");
+
+	return 0;
+}
+
+static const struct drm_info_list amdgpu_debugfs_test_ib_ring_list[] = {
+	{"amdgpu_test_ib", &amdgpu_debugfs_test_ib}
+};
+
+static int amdgpu_debugfs_test_ib_ring_init(struct amdgpu_device *adev)
+{
+	return amdgpu_debugfs_add_files(adev,
+					amdgpu_debugfs_test_ib_ring_list, 1);
+}
+
 int amdgpu_debugfs_init(struct drm_minor *minor)
 {
 	return 0;
@@ -3612,6 +3644,10 @@ void amdgpu_debugfs_cleanup(struct drm_minor *minor)
 {
 }
 #else
+static int amdgpu_debugfs_test_ib_init(struct amdgpu_device *adev)
+{
+	return 0;
+}
 static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev)
 {
 	return 0;
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#2 lore raw

PATCH 2/2 drm/amdgpu: export test ring debugfs interface

In reply to a message not in the archive
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 44 ++++++++++++++++++++++++++++--
 1 file changed, 42 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +42 -2
index 7becf11..3637396 100644
@@ -3625,14 +3625,54 @@ static int amdgpu_debugfs_test_ib(struct seq_file *m, void *data)
 	return 0;
 }
 
+static int amdgpu_ring_tests(struct amdgpu_device *adev)
+{
+	unsigned i;
+	int r = 0;
+
+	for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
+		struct amdgpu_ring *ring = adev->rings[i];
+
+		if (!ring || !ring->ready)
+			continue;
+
+		r = amdgpu_ring_test_ring(ring);
+		if (r) {
+			ring->ready = false;
+			DRM_ERROR("amdgpu: failed to test ring %d (%d).\n",
+				  i, r);
+		}
+	}
+
+	return r;
+}
+
+static int amdgpu_debugfs_test_ring(struct seq_file *m, void *data)
+{
+	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_device *dev = node->minor->dev;
+	struct amdgpu_device *adev = dev->dev_private;
+	int r = 0;
+
+	seq_printf(m, "run ring test:\n");
+	r = amdgpu_ring_tests(adev);
+	if (r)
+		seq_printf(m, "ring tests failed (%d).\n", r);
+	else
+		seq_printf(m, "ring tests passed.\n");
+
+	return 0;
+}
+
 static const struct drm_info_list amdgpu_debugfs_test_ib_ring_list[] = {
-	{"amdgpu_test_ib", &amdgpu_debugfs_test_ib}
+	{"amdgpu_test_ib", &amdgpu_debugfs_test_ib},
+	{"amdgpu_test_ring", &amdgpu_debugfs_test_ring}
 };
 
 static int amdgpu_debugfs_test_ib_ring_init(struct amdgpu_device *adev)
 {
 	return amdgpu_debugfs_add_files(adev,
-					amdgpu_debugfs_test_ib_ring_list, 1);
+					amdgpu_debugfs_test_ib_ring_list, 2);
 }
 
 int amdgpu_debugfs_init(struct drm_minor *minor)
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by Alex Deucher
#14 lore raw
In reply to a message not in the archive
Quoted 11 lines

-----Original Message-----
From: Huang Rui [mailto:[email protected]]
Sent: Wednesday, May 10, 2017 10:29 PM
To: [email protected]; Deucher, Alexander; Koenig, Christian
Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray
Subject: [PATCH 1/2] drm/amdgpu: export test ib debugfs interface

As Christian and David's suggestion, submit the test ib ring debug interfaces. It's useful for debugging with the command submission without VM case.

Quoted 80 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 36
++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +5 -0
index b93356b..7becf11 100644
@@ -59,6 +59,7 @@
 
 static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev);
 static void amdgpu_debugfs_regs_cleanup(struct amdgpu_device *adev);
+static int amdgpu_debugfs_test_ib_ring_init(struct amdgpu_device *adev);
 
 static const char *amdgpu_asic_name[] = {
 	"TAHITI",
@@ -2083,6 +2084,10 @@ int amdgpu_device_init(struct amdgpu_device
 *adev,
 	if (r)
 		DRM_ERROR("registering register debugfs failed (%d).\n", r);
 
+	r = amdgpu_debugfs_test_ib_ring_init(adev);
+	if (r)
+		DRM_ERROR("registering register test ib ring debugfs failed
 (%d).\n", r);
+
 	r = amdgpu_debugfs_firmware_init(adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
 	if (r)
 		DRM_ERROR("registering firmware debugfs failed (%d).\n",

r);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +27 -0
@@ -3603,6 +3608,33 @@ static void amdgpu_debugfs_regs_cleanup(struct
 amdgpu_device *adev)
 	}
 }
 
+static int amdgpu_debugfs_test_ib(struct seq_file *m, void *data)
+{
+	struct drm_info_node *node = (struct drm_info_node *) m-
 >private;
+	struct drm_device *dev = node->minor->dev;
+	struct amdgpu_device *adev = dev->dev_private;
+	int r = 0;
+
+	seq_printf(m, "run ib test:\n");
+	r = amdgpu_ib_ring_tests(adev);
+	if (r)
+		seq_printf(m, "ib ring tests failed (%d).\n", r);
+	else
+		seq_printf(m, "ib ring tests passed.\n");
+
+	return 0;
+}
+
+static const struct drm_info_list amdgpu_debugfs_test_ib_ring_list[] = {
+	{"amdgpu_test_ib", &amdgpu_debugfs_test_ib}
+};
+
+static int amdgpu_debugfs_test_ib_ring_init(struct amdgpu_device *adev)
+{
+	return amdgpu_debugfs_add_files(adev,
+					amdgpu_debugfs_test_ib_ring_list,
 1);
+}
+

int amdgpu_debugfs_init(struct drm_minor *minor)
{

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -0
 	return 0;
@@ -3612,6 +3644,10 @@ void amdgpu_debugfs_cleanup(struct drm_minor
 *minor)
 {
 }
 #else
+static int amdgpu_debugfs_test_ib_init(struct amdgpu_device *adev)
+{
+	return 0;
+}
 static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev)
 {
Quoted 3 lines

return 0;
--
2.7.4

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

Reviewed-by Alex Deucher
#4 lore raw

RE: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

In reply to a message not in the archive
Quoted 8 lines

-----Original Message-----
From: Huang Rui [mailto:[email protected]]
Sent: Wednesday, May 10, 2017 10:29 PM
To: [email protected]; Deucher, Alexander; Koenig, Christian
Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray
Subject: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

Quoted 71 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 44
++++++++++++++++++++++++++++--
 1 file changed, 42 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +41 -2
index 7becf11..3637396 100644
@@ -3625,14 +3625,54 @@ static int amdgpu_debugfs_test_ib(struct
 seq_file *m, void *data)
 	return 0;
 }
 
+static int amdgpu_ring_tests(struct amdgpu_device *adev)
+{
+	unsigned i;
+	int r = 0;
+
+	for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
+		struct amdgpu_ring *ring = adev->rings[i];
+
+		if (!ring || !ring->ready)
+			continue;
+
+		r = amdgpu_ring_test_ring(ring);
+		if (r) {
+			ring->ready = false;
+			DRM_ERROR("amdgpu: failed to test ring %d
 (%d).\n",
+				  i, r);
+		}
+	}
+
+	return r;
+}
+
+static int amdgpu_debugfs_test_ring(struct seq_file *m, void *data)
+{
+	struct drm_info_node *node = (struct drm_info_node *) m-
 >private;
+	struct drm_device *dev = node->minor->dev;
+	struct amdgpu_device *adev = dev->dev_private;
+	int r = 0;
+
+	seq_printf(m, "run ring test:\n");
+	r = amdgpu_ring_tests(adev);
+	if (r)
+		seq_printf(m, "ring tests failed (%d).\n", r);
+	else
+		seq_printf(m, "ring tests passed.\n");
+
+	return 0;
+}
+
 static const struct drm_info_list amdgpu_debugfs_test_ib_ring_list[] = {
-	{"amdgpu_test_ib", &amdgpu_debugfs_test_ib}
+	{"amdgpu_test_ib", &amdgpu_debugfs_test_ib},
+	{"amdgpu_test_ring", &amdgpu_debugfs_test_ring}
 };
 
 static int amdgpu_debugfs_test_ib_ring_init(struct amdgpu_device *adev)
 {
 	return amdgpu_debugfs_add_files(adev,
-					amdgpu_debugfs_test_ib_ring_list,

1);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+					amdgpu_debugfs_test_ib_ring_list,

2);
}

Quoted 3 lines

int amdgpu_debugfs_init(struct drm_minor *minor)
--
2.7.4

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

#6 lore raw

RE: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

In reply to a message not in the archive
Quoted 14 lines

-----Original Message-----
From: Deucher, Alexander
Sent: Wednesday, May 10, 2017 10:38 PM
To: Huang, Ray; [email protected]; Koenig, Christian
Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray
Subject: RE: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

Quoted 7 lines

-----Original Message-----
From: Huang Rui [mailto:[email protected]]
Sent: Wednesday, May 10, 2017 10:29 PM
To: [email protected]; Deucher, Alexander; Koenig, Christian
Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray
Subject: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

Quoted 3 lines
Quoted 1 line

Not sure if it's important for this since it's debugfs, but we don't have any sort of ring locks anymore (since everything should go through the scheduler once it's started) so we could theoretically get collisions if there are active apps using the GPU and you run these tests.

Alex

Quoted 73 lines
Quoted 54 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 44
++++++++++++++++++++++++++++--
 1 file changed, 42 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +36 -0
index 7becf11..3637396 100644
@@ -3625,14 +3625,54 @@ static int amdgpu_debugfs_test_ib(struct
 seq_file *m, void *data)
 	return 0;
 }
 
+static int amdgpu_ring_tests(struct amdgpu_device *adev)
+{
+	unsigned i;
+	int r = 0;
+
+	for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
+		struct amdgpu_ring *ring = adev->rings[i];
+
+		if (!ring || !ring->ready)
+			continue;
+
+		r = amdgpu_ring_test_ring(ring);
+		if (r) {
+			ring->ready = false;
+			DRM_ERROR("amdgpu: failed to test ring %d
 (%d).\n",
+				  i, r);
+		}
+	}
+
+	return r;
+}
+
+static int amdgpu_debugfs_test_ring(struct seq_file *m, void *data)
+{
+	struct drm_info_node *node = (struct drm_info_node *) m-
 >private;
+	struct drm_device *dev = node->minor->dev;
+	struct amdgpu_device *adev = dev->dev_private;
+	int r = 0;
+
+	seq_printf(m, "run ring test:\n");
+	r = amdgpu_ring_tests(adev);
+	if (r)
+		seq_printf(m, "ring tests failed (%d).\n", r);
+	else
+		seq_printf(m, "ring tests passed.\n");
+

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_debugfs_test_ib(struct · line 3675

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +5 -1
+	return 0;
+}
+
 static const struct drm_info_list amdgpu_debugfs_test_ib_ring_list[] = {
-	{"amdgpu_test_ib", &amdgpu_debugfs_test_ib}
+	{"amdgpu_test_ib", &amdgpu_debugfs_test_ib},
+	{"amdgpu_test_ring", &amdgpu_debugfs_test_ring}
 };
 
 static int amdgpu_debugfs_test_ib_ring_init(struct amdgpu_device

*adev)

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
 {
 	return amdgpu_debugfs_add_files(adev,
-					amdgpu_debugfs_test_ib_ring_list,

1);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
+					amdgpu_debugfs_test_ib_ring_list,

2);
}

Quoted 3 lines
Quoted 3 lines

int amdgpu_debugfs_init(struct drm_minor *minor)
--
2.7.4

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

#8 lore raw

Re: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

In reply to a message not in the archive
Quoted 12 lines · Alexander
Quoted 11 lines

-----Original Message-----
From: Deucher, Alexander
Sent: Wednesday, May 10, 2017 10:38 PM
To: Huang, Ray; [email protected]; Koenig, Christian
Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray
Subject: RE: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

Quoted 4 lines

-----Original Message-----
From: Huang Rui [mailto:[email protected]]
Sent: Wednesday, May 10, 2017 10:29 PM
To: [email protected]; Deucher, Alexander; Koenig,

Christian

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray
Subject: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

Not sure if it's important for this since it's debugfs, but we don't have any sort of ring locks anymore (since everything should go through the scheduler once it's started) so we could theoretically get collisions if there are active apps using the GPU and you run these tests.

Yes, agree. So patch#1 for ib test should use scheduler, but which could be a big change and Christian doesn't like to use scheduler for ib test case, consider this is only for test case, the problem isn't big:).

btw: I think patch#2 isn't need if patch#1 is landed, since when you use this sys interface, the amdgpu driver must be loaded successfully, ring test is meaningless.

Regards,
David Zhou

Quoted 46 lines

Alex

Quoted 43 lines
Quoted 43 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 44
++++++++++++++++++++++++++++--
 1 file changed, 42 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +25 -0
index 7becf11..3637396 100644
@@ -3625,14 +3625,54 @@ static int amdgpu_debugfs_test_ib(struct
 seq_file *m, void *data)
     return 0;
 }
 
+static int amdgpu_ring_tests(struct amdgpu_device *adev)
+{
+   unsigned i;
+   int r = 0;
+
+   for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
+           struct amdgpu_ring *ring = adev->rings[i];
+
+           if (!ring || !ring->ready)
+                   continue;
+
+           r = amdgpu_ring_test_ring(ring);
+           if (r) {
+                   ring->ready = false;
+                   DRM_ERROR("amdgpu: failed to test ring %d
 (%d).\n",
+                             i, r);
+           }
+   }
+
+   return r;
+}
+
+static int amdgpu_debugfs_test_ring(struct seq_file *m, void *data)
+{
+   struct drm_info_node *node = (struct drm_info_node *) m-
 >private;
Quoted 35 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -0
+   struct drm_device *dev = node->minor->dev;
+   struct amdgpu_device *adev = dev->dev_private;
+   int r = 0;
+
+   seq_printf(m, "run ring test:\n");
+   r = amdgpu_ring_tests(adev);
+   if (r)
Quoted 8 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_debugfs_test_ib(struct seq_file *m, void *data)

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -0
+           seq_printf(m, "ring tests failed (%d).\n", r);
+   else
+           seq_printf(m, "ring tests passed.\n");
+
+   return 0;
+}
+
 static const struct drm_info_list 

amdgpu_debugfs_test_ib_ring_list[] = {

Quoted 18 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_debugfs_test_ib(struct seq_file *m, void *data)

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
-   {"amdgpu_test_ib", &amdgpu_debugfs_test_ib}
+   {"amdgpu_test_ib", &amdgpu_debugfs_test_ib},
+   {"amdgpu_test_ring", &amdgpu_debugfs_test_ring}
 };
 
 static int amdgpu_debugfs_test_ib_ring_init(struct amdgpu_device

*adev)

Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
 {
     return amdgpu_debugfs_add_files(adev,
- amdgpu_debugfs_test_ib_ring_list,

1);
+ amdgpu_debugfs_test_ib_ring_list,
2);
}

int amdgpu_debugfs_init(struct drm_minor *minor)
--
2.7.4

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

author
#12 lore raw

Re: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

In reply to a message not in the archive
Quoted 14 lines · Alexander
Quoted 14 lines

-----Original Message-----
From: Deucher, Alexander
Sent: Wednesday, May 10, 2017 10:38 PM
To: Huang, Ray; [email protected]; Koenig, Christian
Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray
Subject: RE: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

Quoted 7 lines

-----Original Message-----
From: Huang Rui [mailto:[email protected]]
Sent: Wednesday, May 10, 2017 10:29 PM
To: [email protected]; Deucher, Alexander; Koenig, Christian
Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray
Subject: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

Quoted 9 lines
Quoted 3 lines
Quoted 1 line

Not sure if it's important for this since it's debugfs, but we don't have any sort of ring locks anymore (since everything should go through the scheduler once it's started) so we could theoretically get collisions if there are active apps using the GPU and you run these tests.

Right. Any idea to hold on scheduler when I try to run this test?

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

#13 lore raw

Re: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

Quoted 19 lines · Huang Rui
Quoted 18 lines · Alexander
Quoted 17 lines

-----Original Message-----
From: Deucher, Alexander
Sent: Wednesday, May 10, 2017 10:38 PM
To: Huang, Ray; [email protected]; Koenig, Christian
Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray
Subject: RE: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

Quoted 8 lines

-----Original Message-----
From: Huang Rui [mailto:[email protected]]
Sent: Wednesday, May 10, 2017 10:29 PM
To: [email protected]; Deucher, Alexander; Koenig, Christian
Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray
Subject: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

Quoted 7 lines
Quoted 5 lines

Not sure if it's important for this since it's debugfs, but we don't have any sort of ring locks anymore (since everything should go through the scheduler once it's started) so we could theoretically get collisions if there are active apps using the GPU and you run these tests.

Right. Any idea to hold on scheduler when I try to run this test?

Park the scheduler thread for each ring like we do for GPU reset? That said, I think the expectation is that you should only run these tests when the GPU is idle.

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

#11 lore raw

Re: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

In reply to Huang Rui
Quoted 28 lines · Huang Rui
Quoted 27 lines · David(ChunMing)

On 2017年05月11日 10:41, Deucher, Alexander wrote:

> -----Original Message-----
> From: Deucher, Alexander
> Sent: Wednesday, May 10, 2017 10:38 PM
> To: Huang, Ray; [email protected]; Koenig, Christian > Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray > Subject: RE: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface >
> > -----Original Message-----
> > From: Huang Rui [mailto:[email protected]]
> > Sent: Wednesday, May 10, 2017 10:29 PM
> > To: [email protected]; Deucher, Alexander; Koenig, Christian
> > Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray > > Subject: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface > >
> > Signed-off-by: Huang Rui <[email protected]>
>
> Reviewed-by: Alex Deucher <[email protected]>

Not sure if it's important for this since it's debugfs, but we don't have any sort of ring locks anymore (since everything should go through the scheduler once it's started) so we could theoretically get collisions if there are active apps using the GPU and you run these tests.

Quoted 4 lines
Quoted 3 lines

Yes, agree. So patch#1 for ib test should use scheduler, but which could be a big change and Christian doesn't like to use scheduler for ib test case, consider this is only for test case, the problem isn't big:).

Do you know any method to hold on the scheduler?

like Alex suggested, park scheduler, and then do your things.

Regards,
David Zhou

Quoted 10 lines
Quoted 5 lines

btw: I think patch#2 isn't need if patch#1 is landed, since when you use this sys interface, the amdgpu driver must be loaded successfully, ring test is meaningless.

In normal case, ring tests&ib tests must be passed during boot&resume&reset phase. Is there anything that will break the ring test at runtime?

Thanks,
Rui

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

author
#10 lore raw

Re: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

In reply to a message not in the archive
Quoted 23 lines · David(ChunMing)
Quoted 11 lines · Alexander

-----Original Message-----
From: Deucher, Alexander
Sent: Wednesday, May 10, 2017 10:38 PM
To: Huang, Ray; [email protected]; Koenig, Christian
Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray
Subject: RE: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface

Quoted 4 lines

-----Original Message-----
From: Huang Rui [mailto:[email protected]]
Sent: Wednesday, May 10, 2017 10:29 PM
To: [email protected]; Deucher, Alexander; Koenig,

Christian
> > Cc: Zhou, David(ChunMing); Wang, Ken; Huan, Alvin; Huang, Ray > > Subject: [PATCH 2/2] drm/amdgpu: export test ring debugfs interface > >
> > Signed-off-by: Huang Rui <[email protected]>
>
> Reviewed-by: Alex Deucher <[email protected]>

Quoted 8 lines

Not sure if it's important for this since it's debugfs, but we don't have any sort of ring locks anymore (since everything should go through the scheduler once it's started) so we could theoretically get collisions if there are active apps using the GPU and you run these tests.

Yes, agree. So patch#1 for ib test should use scheduler, but which could be a big change and Christian doesn't like to use scheduler for ib test case, consider this is only for test case, the problem isn't big:).

Do you know any method to hold on the scheduler?

Quoted 5 lines

btw: I think patch#2 isn't need if patch#1 is landed, since when you use this sys interface, the amdgpu driver must be loaded successfully, ring test is meaningless.

In normal case, ring tests&ib tests must be passed during boot&resume&reset phase. Is there anything that will break the ring test at runtime?

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