diff options
author | Shiwu Zhang <shiwu.zhang@amd.com> | 2023-05-17 13:21:15 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-06-09 10:41:04 -0400 |
commit | e825fb641b4c78a8dab5101559dd27e64d2f24aa (patch) | |
tree | 3395fd8b76b10b4ce14de65dbf3755a822cd823c /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | |
parent | c796d7e039b57f9407523b8c4a3ba5358dd2d8ff (diff) | |
download | linux-e825fb641b4c78a8dab5101559dd27e64d2f24aa.tar.gz linux-e825fb641b4c78a8dab5101559dd27e64d2f24aa.tar.bz2 linux-e825fb641b4c78a8dab5101559dd27e64d2f24aa.zip |
drm/amdgpu: fix the memory override in kiq ring struct
This is introduced by the code merge and will let the
adev->gfx.kiq[0].ring struct being overrided
Signed-off-by: Shiwu Zhang <shiwu.zhang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index f2d0b1d55d77..2b4bf6c11ae4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c @@ -448,8 +448,8 @@ int amdgpu_gfx_mqd_sw_init(struct amdgpu_device *adev, ring->mqd_size = mqd_size; /* prepare MQD backup */ - adev->gfx.mec.mqd_backup[j + xcc_id * adev->gfx.num_compute_rings] = kmalloc(mqd_size, GFP_KERNEL); - if (!adev->gfx.mec.mqd_backup[j + xcc_id * adev->gfx.num_compute_rings]) + adev->gfx.mec.mqd_backup[j] = kmalloc(mqd_size, GFP_KERNEL); + if (!adev->gfx.mec.mqd_backup[j]) dev_warn(adev->dev, "no memory to create MQD backup for ring %s\n", ring->name); } } |