drm/amdgpu: Fix infinite loop in gfxhub_v1_2_xcc_gart_enable
Subsystems (2)
PATCH 1/1 drm/amdgpu: Fix infinite loop in gfxhub_v1_2_xcc_gart_enable
An instance of for_each_inst() was not changed to match its new behaviour and is causing a loop.
Fixes 50c1d81d6365 ("drm/amdgpu: Modify for_each_inst macro")
Signed-off-by Victor Lu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c +0 -1
@@ -413,7 +413,6 @@ static int gfxhub_v1_2_xcc_gart_enable(struct amdgpu_device *adev,*/ if (amdgpu_sriov_vf (adev)) {for_each_inst (i, tmp_mask) { - i =ffs (tmp_mask) -1 ;WREG32_SOC15_RLC (GC ,GET_INST (GC , i), regMC_VM_FB_LOCATION_BASE, adev->gmc.vram_start >>24 ); WREG32_SOC15_RLC(GC, GET_INST(GC, i), regMC_VM_FB_LOCATION_TOP,
Signature · 1 line
2.34.1
[AMD Official Use Only - General]
The variable tmp_mask also could be removed.
Regards,
Bob
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Victor Lu
Sent: Wednesday, July 19, 2023 3:02 AM
To: [email protected]
Cc: Lazar, Lijo <[email protected]>; Skvortsov, Victor <[email protected]>; Lu, Victor Cheng Chi (Victor) <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix infinite loop in gfxhub_v1_2_xcc_gart_enable
An instance of for_each_inst() was not changed to match its new behaviour and is causing a loop.
Fixes 50c1d81d6365 ("drm/amdgpu: Modify for_each_inst macro")
Signed-off-by Victor Lu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c +0 -1
@@ -413,7 +413,6 @@ static int gfxhub_v1_2_xcc_gart_enable(struct amdgpu_device *adev,*/ if (amdgpu_sriov_vf (adev)) {for_each_inst (i, tmp_mask) { - i =ffs (tmp_mask) -1 ;WREG32_SOC15_RLC (GC ,GET_INST (GC , i), regMC_VM_FB_LOCATION_BASE, adev->gmc.vram_start >>24 ); WREG32_SOC15_RLC(GC, GET_INST(GC, i), regMC_VM_FB_LOCATION_TOP,
--
2.34.1