OSDN Git Service

drm/amdgpu:Fix the unpin warning about csb buffer
authorEmily Deng <Emily.Deng@amd.com>
Wed, 29 May 2019 08:15:52 +0000 (16:15 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 31 May 2019 15:39:29 +0000 (10:39 -0500)
As it will destroy clear_state_obj, and also will unpin it in the
gfx_v9_0_sw_fini, so don't need to
call amdgpu_bo_free_kernel in gfx_v9_0_sw_fini, or it will have unpin warning.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

index c763733..cc5a382 100644 (file)
@@ -1794,9 +1794,7 @@ static int gfx_v9_0_sw_fini(void *handle)
 
        gfx_v9_0_mec_fini(adev);
        gfx_v9_0_ngg_fini(adev);
-       amdgpu_bo_free_kernel(&adev->gfx.rlc.clear_state_obj,
-                               &adev->gfx.rlc.clear_state_gpu_addr,
-                               (void **)&adev->gfx.rlc.cs_ptr);
+       amdgpu_bo_unref(&adev->gfx.rlc.clear_state_obj);
        if (adev->asic_type == CHIP_RAVEN) {
                amdgpu_bo_free_kernel(&adev->gfx.rlc.cp_table_obj,
                                &adev->gfx.rlc.cp_table_gpu_addr,