Skip to content

Commit 0b16957

Browse files
victorlu-amdalexdeucher
authored andcommitted
drm/amdgpu: Do not program PF-only regs in hdp_v4_0.c under SRIOV (v2)
The following regs can only be programmed by the PF: HDP_MISC_CNTL HDP_NONSURFACE_BASE HDP_NONSURFACE_BASE_HI v2: update commit message Signed-off-by: Victor Lu <[email protected]> Reviewed-by: Samir Dhume <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent a78b481 commit 0b16957

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ static void hdp_v4_0_init_registers(struct amdgpu_device *adev)
145145
break;
146146
}
147147

148+
/* Do not program registers if VF */
149+
if (amdgpu_sriov_vf(adev))
150+
return;
151+
148152
WREG32_FIELD15(HDP, 0, HDP_MISC_CNTL, FLUSH_INVALIDATE_CACHE, 1);
149153

150154
if (amdgpu_ip_version(adev, HDP_HWIP, 0) == IP_VERSION(4, 4, 0))

0 commit comments

Comments
 (0)