aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
diff options
context:
space:
mode:
authorZhenGuo Yin <zhenguo.yin@amd.com>2024-03-06 17:59:29 +0800
committerAlex Deucher <alexander.deucher@amd.com>2024-03-20 13:12:57 -0400
commit56b30ac84c517eefcfd5384339fee5d8a675f811 (patch)
treeb8bcaf6d0f2a1ef2dd98e6dcce3096ffe6f9c53a /drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
parentf679fd6057fbf5ab34aaee28d58b7f81af0cbf48 (diff)
downloadlinux-56b30ac84c517eefcfd5384339fee5d8a675f811.tar.gz
drm/amdgpu: Skip access PF-only registers on gfx10/gfxhub2_1 under SRIOV
[Why] RLCG interface returns "out-of-range" error under SRIOV VF when accessing PF-only registers. [How] Skip access PF-only registers on gfx10/gfxhub2_1 under SRIOV. Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: ZhenGuo Yin <zhenguo.yin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
index cd0e8a321e460..17509f32f61a4 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
@@ -155,6 +155,9 @@ static void gfxhub_v2_1_init_system_aperture_regs(struct amdgpu_device *adev)
{
uint64_t value;
+ if (amdgpu_sriov_vf(adev))
+ return;
+
/* Program the AGP BAR */
WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BASE, 0);
WREG32_SOC15(GC, 0, mmGCMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);