]> git.itanic.dy.fi Git - linux-stable/commitdiff
drm/amdgpu: fix a build warning by a typo in amdgpu_gfx.c
authorGuchun Chen <guchun.chen@amd.com>
Wed, 26 Apr 2023 03:05:49 +0000 (11:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:24:02 +0000 (09:24 -0400)
This should be a typo when intruducing multi-xx support.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Cc: Le Ma <le.ma@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c

index 60bb4bba199478ab6487f2de7fd19e126feca800..2cf1f88fde488b21aa26e4ed4279004538bd4834 100644 (file)
@@ -470,8 +470,8 @@ void amdgpu_gfx_mqd_sw_fini(struct amdgpu_device *adev, int xcc_id)
 
        for (i = 0; i < adev->gfx.num_compute_rings; i++) {
                j = i + xcc_id * adev->gfx.num_compute_rings;
-               ring = &adev->gfx.compute_ring[i];
-               kfree(adev->gfx.mec.mqd_backup[i]);
+               ring = &adev->gfx.compute_ring[j];
+               kfree(adev->gfx.mec.mqd_backup[j]);
                amdgpu_bo_free_kernel(&ring->mqd_obj,
                                      &ring->mqd_gpu_addr,
                                      &ring->mqd_ptr);