[PATCH v2] drm/amdgpu: Do not program PF-only regs in hdp_v4_0.c under SRIOV (v2)
Dhume, Samir
Samir.Dhume at amd.com
Wed Nov 8 18:05:13 UTC 2023
[AMD Official Use Only - General]
Reviewed-by: Samir Dhume <samir.dhume at amd.com>
-----Original Message-----
From: Lu, Victor Cheng Chi (Victor) <VictorChengChi.Lu at amd.com>
Sent: Wednesday, November 8, 2023 10:25 AM
To: amd-gfx at lists.freedesktop.org
Cc: Dhume, Samir <Samir.Dhume at amd.com>; Lu, Victor Cheng Chi (Victor) <VictorChengChi.Lu at amd.com>
Subject: [PATCH v2] 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 <victorchengchi.lu at amd.com>
---
drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c b/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c
index 3f3a6445c006..bf3bdf67abb7 100644
--- a/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c
@@ -145,6 +145,11 @@ static void hdp_v4_0_init_registers(struct amdgpu_device *adev)
break;
}
+ /* Do not program registers if VF */
+ if (amdgpu_sriov_vf(adev)) {
+ return;
+ }
+
WREG32_FIELD15(HDP, 0, HDP_MISC_CNTL, FLUSH_INVALIDATE_CACHE, 1);
if (amdgpu_ip_version(adev, HDP_HWIP, 0) == IP_VERSION(4, 4, 0))
--
2.34.1
More information about the amd-gfx
mailing list