[PATCH 2/2] drm/amdgpu: fix the instance loop and build warning

Leo Liu leo.liu at amd.com
Thu Jan 16 00:45:08 UTC 2020


Fixes: 8ae1e132 "drm/amdgpu/vcn: support multiple instance direct SRAM read and write"

Signed-off-by: Leo Liu <leo.liu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index ab51f0e9539c..f96464e2c157 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -193,9 +193,9 @@ int amdgpu_vcn_sw_fini(struct amdgpu_device *adev)
 		if (adev->vcn.harvest_config & (1 << j))
 			continue;
 		if (adev->vcn.indirect_sram) {
-			amdgpu_bo_free_kernel(&adev->vcn.inst[i].dpg_sram_bo,
-						  &adev->vcn.inst[i].dpg_sram_gpu_addr,
-						  (void **)&adev->vcn.inst[i].dpg_sram_cpu_addr);
+			amdgpu_bo_free_kernel(&adev->vcn.inst[j].dpg_sram_bo,
+						  &adev->vcn.inst[j].dpg_sram_gpu_addr,
+						  (void **)&adev->vcn.inst[j].dpg_sram_cpu_addr);
 		}
 		kvfree(adev->vcn.inst[j].saved_bo);
 
-- 
2.20.1



More information about the amd-gfx mailing list