On 10/13/2021 12:42 PM, Das, Nirmoy wrote:


On 10/13/2021 3:22 AM, zhang wrote:

Hi . Nirmoy


If you let continue to unpin. this will  allways test a same va for gtt

I think we should  rafresh calculate the value n


Right, I guess then the test should only run till gart size.


Actually the test size calculation was fine, it is just that we wouldn't release BO after a successful test as the cleanup code is inside the test for loop.


Regards,

Nirmoy


Regards,

Nirmoy


On 2021/10/12 20:10, Nirmoy Das wrote:
When gart size is < gtt size this test will fail with
-ENOMEM as we are not freeing gtt bo after each move test.
This is generally not an issue when gart size >= gtt size.

Reported-by: zhang<botton_zh...@163.com>
Signed-off-by: Nirmoy Das<nirmoy....@amd.com>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
index 909d830b513e..0cf2a560d673 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
@@ -212,7 +212,6 @@ static void amdgpu_do_test_moves(struct amdgpu_device *adev)
DRM_INFO("Tested GTT->VRAM and VRAM->GTT copy for GTT offset 0x%llx\n",
                         gart_addr - adev->gmc.gart_start);
-               continue;
out_lclean_unpin:
                amdgpu_bo_unpin(gtt_obj[i]);
@@ -220,6 +219,7 @@ static void amdgpu_do_test_moves(struct amdgpu_device *adev)
                amdgpu_bo_unreserve(gtt_obj[i]);
  out_lclean_unref:
                amdgpu_bo_unref(&gtt_obj[i]);
+               continue;
  out_lclean:
                for (--i; i >= 0; --i) {
                        amdgpu_bo_unpin(gtt_obj[i]);

Reply via email to