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: b579ea632f
("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>
This commit is contained in:
parent
602816c3ee
commit
9beb223f2a
|
@ -402,18 +402,15 @@ static void gfxhub_v1_2_xcc_program_invalidation(struct amdgpu_device *adev,
|
||||||
static int gfxhub_v1_2_xcc_gart_enable(struct amdgpu_device *adev,
|
static int gfxhub_v1_2_xcc_gart_enable(struct amdgpu_device *adev,
|
||||||
uint32_t xcc_mask)
|
uint32_t xcc_mask)
|
||||||
{
|
{
|
||||||
uint32_t tmp_mask;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
tmp_mask = xcc_mask;
|
|
||||||
/*
|
/*
|
||||||
* MC_VM_FB_LOCATION_BASE/TOP is NULL for VF, because they are
|
* MC_VM_FB_LOCATION_BASE/TOP is NULL for VF, because they are
|
||||||
* VF copy registers so vbios post doesn't program them, for
|
* VF copy registers so vbios post doesn't program them, for
|
||||||
* SRIOV driver need to program them
|
* SRIOV driver need to program them
|
||||||
*/
|
*/
|
||||||
if (amdgpu_sriov_vf(adev)) {
|
if (amdgpu_sriov_vf(adev)) {
|
||||||
for_each_inst(i, tmp_mask) {
|
for_each_inst(i, xcc_mask) {
|
||||||
i = ffs(tmp_mask) - 1;
|
|
||||||
WREG32_SOC15_RLC(GC, GET_INST(GC, i), regMC_VM_FB_LOCATION_BASE,
|
WREG32_SOC15_RLC(GC, GET_INST(GC, i), regMC_VM_FB_LOCATION_BASE,
|
||||||
adev->gmc.vram_start >> 24);
|
adev->gmc.vram_start >> 24);
|
||||||
WREG32_SOC15_RLC(GC, GET_INST(GC, i), regMC_VM_FB_LOCATION_TOP,
|
WREG32_SOC15_RLC(GC, GET_INST(GC, i), regMC_VM_FB_LOCATION_TOP,
|
||||||
|
|
Loading…
Reference in New Issue