drm/amdgpu: Add mem sync flag for SDMA IB test
Subsystems (2)
PATCH 1/1 drm/amdgpu: Add mem sync flag for SDMA IB test
The buffer for SDMA IB test is allocated by sa bo which may be used by other purpose. Better to flush the cache before commit the IB.
--- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +1 -0
@@ -1000,6 +1000,7 @@ static int sdma_v5_2_ring_test_ib(struct amdgpu_ring *ring, long timeout) ib.ptr[7 ] =SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP ); ib.length_dw =8 ; + ib.flags =AMDGPU_IB_FLAG_EMIT_MEM_SYNC ; r =amdgpu_ib_schedule (ring,1 , &ib,NULL , &f);if (r) goto err1;
Signature · 6 lines
2.27.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 20.04.21 um 04:23 schrieb Jinzhou Su:
Quoted 3 lines
The buffer for SDMA IB test is allocated by sa bo which may be used by other purpose. Better to flush the cache before commit the IB.
Good point, but shouldn't we do this for a lot of other cases as well?
I think the only place where we should not set the flag is in the CS IOCTL.
Regards,
Christian.
Quoted 11 lines
Signed-off-by Jinzhou Su <[email protected]>--- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +0
-0
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c static int sdma_v5_2_ring_test_ib(struct amdgpu_ring *ring, long timeout) · line 1006
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +1
-0@@ -1000,6 +1000,7 @@ static int sdma_v5_2_ring_test_ib(struct amdgpu_ring *ring, long timeout) ib.ptr[7 ] =SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP ); ib.length_dw =8 ; + ib.flags =AMDGPU_IB_FLAG_EMIT_MEM_SYNC ; r =amdgpu_ib_schedule (ring,1 , &ib,NULL , &f);if (r) goto err1;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Hello Christian,
Thanks for your information. We add this due to sdma0 timeout during S3 stress test. Will update this for other cases in v2.
Regards,
Joe
-----Original Message-----
From: Christian König <[email protected]>
Sent: Tuesday, April 20, 2021 2:39 PM
To: Su, Jinzhou (Joe) <[email protected]>; [email protected]
Cc: Huang, Ray <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Add mem sync flag for SDMA IB test
Am 20.04.21 um 04:23 schrieb Jinzhou Su:
Quoted 2 lines
The buffer for SDMA IB test is allocated by sa bo which may be used by other purpose. Better to flush the cache before commit the IB.
Good point, but shouldn't we do this for a lot of other cases as well?
I think the only place where we should not set the flag is in the CS IOCTL.
Regards,
Christian.
Quoted 12 lines
Signed-off-by Jinzhou Su <[email protected]>--- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +0
-0
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c static int sdma_v5_2_ring_test_ib(struct amdgpu_ring *ring, long timeout) · line 1006
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +1
-0@@ -1000,6 +1000,7 @@ static int sdma_v5_2_ring_test_ib(struct amdgpu_ring *ring, long timeout) ib.ptr[7 ] =SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP ); ib.length_dw =8 ; + ib.flags =AMDGPU_IB_FLAG_EMIT_MEM_SYNC ; r =amdgpu_ib_schedule (ring,1 , &ib,NULL , &f);if (r) goto err1;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
I suggest to rather do this in amdgpu_ib_get() instead.
As soon as the size is specified we get some memory from the SA allocator and should also set the flag to be on the save side.
Thanks,
Christian.
Am 20.04.21 um 08:55 schrieb Su, Jinzhou (Joe):
Quoted 41 lines
[AMD Official Use Only - Internal Distribution Only]
Hello Christian,
Thanks for your information. We add this due to sdma0 timeout during S3 stress test. Will update this for other cases in v2.
Regards,
Joe-----Original Message-----
From: Christian König <[email protected]>
Sent: Tuesday, April 20, 2021 2:39 PM
To: Su, Jinzhou (Joe) <[email protected]>; [email protected]
Cc: Huang, Ray <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Add mem sync flag for SDMA IB testAm 20.04.21 um 04:23 schrieb Jinzhou Su:
Quoted 2 lines
The buffer for SDMA IB test is allocated by sa bo which may be used by other purpose. Better to flush the cache before commit the IB.
Good point, but shouldn't we do this for a lot of other cases as well?
I think the only place where we should not set the flag is in the CS IOCTL.
Regards,
Christian.Quoted 14 lines
Signed-off-by Jinzhou Su <[email protected]>--- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +0
-0@@ -1000,6 +1000,7 @@ static int sdma_v5_2_ring_test_ib(struct amdgpu_ring *ring, long timeout) ib.ptr[7 ] =SDMA_PKT_NOP_HEADER_OP (SDMA_OP_NOP ); ib.length_dw =8 ;
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c static int sdma_v5_2_ring_test_ib(struct amdgpu_ring *ring, long timeout) · line 1006
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +1
-0+ ib.flags =AMDGPU_IB_FLAG_EMIT_MEM_SYNC ; r =amdgpu_ib_schedule (ring,1 , &ib,NULL , &f);if (r) goto err1;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx