Skip to content

Commit 9beb223

Browse files
victorlu-amdalexdeucher
authored andcommitted
drm/amdgpu: Fix infinite loop in gfxhub_v1_2_xcc_gart_enable (v2)
An instance of for_each_inst() was not changed to match its new behaviour and is causing a loop. v2: remove tmp_mask variable Fixes: b579ea6 ("drm/amdgpu: Modify for_each_inst macro") Signed-off-by: Victor Lu <victorchengchi.lu@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 602816c commit 9beb223

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,18 +402,15 @@ static void gfxhub_v1_2_xcc_program_invalidation(struct amdgpu_device *adev,
402402
static int gfxhub_v1_2_xcc_gart_enable(struct amdgpu_device *adev,
403403
uint32_t xcc_mask)
404404
{
405-
uint32_t tmp_mask;
406405
int i;
407406

408-
tmp_mask = xcc_mask;
409407
/*
410408
* MC_VM_FB_LOCATION_BASE/TOP is NULL for VF, because they are
411409
* VF copy registers so vbios post doesn't program them, for
412410
* SRIOV driver need to program them
413411
*/
414412
if (amdgpu_sriov_vf(adev)) {
415-
for_each_inst(i, tmp_mask) {
416-
i = ffs(tmp_mask) - 1;
413+
for_each_inst(i, xcc_mask) {
417414
WREG32_SOC15_RLC(GC, GET_INST(GC, i), regMC_VM_FB_LOCATION_BASE,
418415
adev->gmc.vram_start >> 24);
419416
WREG32_SOC15_RLC(GC, GET_INST(GC, i), regMC_VM_FB_LOCATION_TOP,

0 commit comments

Comments
 (0)