aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Wan <[email protected]>2023-04-03 17:49:41 -0400
committerAlex Deucher <[email protected]>2023-06-09 09:58:02 -0400
commitb0a3bbf947f6ed690336cec1f6cde2a30d082dbb (patch)
treed0c67cca70d021bef094062bf44b52aaa2a2ea5b
parent63630c9e5c3481c51ac3b4ee058628a01ac91ba8 (diff)
drm/amdgpu: Skip using MC FB Offset when APU flag is set for SRIOV.
The MC_VM_FB_OFFSET is PF only register. It cannot be read on VF. So, the driver should not use MC_VM_FB_OFFSET address to set the address of dev->gmc.aper_base. Signed-off-by: Gavin Wan <[email protected]> Reviewed-by: Zhigang Luo <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 1653d77df3ba..58bcd1e1f1b6 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -1644,7 +1644,8 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
*/
/* check whether both host-gpu and gpu-gpu xgmi links exist */
- if (((adev->flags & AMD_IS_APU) && !amdgpu_passthrough(adev)) ||
+ if ((!amdgpu_sriov_vf(adev) &&
+ (adev->flags & AMD_IS_APU) && !amdgpu_passthrough(adev)) ||
(adev->gmc.xgmi.supported &&
adev->gmc.xgmi.connected_to_cpu)) {
adev->gmc.aper_base =