[PATCH] drm/amdgpu: don't read DF register for SRIOV

Yintian Tao yttao at amd.com
Thu May 16 12:10:51 UTC 2019


Under SRIOV, reading DF register has chance to lead to
AER error in host side, just skip reading it.

Signed-off-by: Monk Liu <Monk.Liu at amd.com>
Signed-off-by: Yintian Tao <yttao at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index a417763..b5bf9ed 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -837,7 +837,7 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
 
 	if (amdgpu_emu_mode != 1)
 		adev->gmc.vram_width = amdgpu_atomfirmware_get_vram_width(adev);
-	if (!adev->gmc.vram_width) {
+	if (!adev->gmc.vram_width && !amdgpu_sriov_vf(adev)) {
 		/* hbm memory channel size */
 		if (adev->flags & AMD_IS_APU)
 			chansize = 64;
-- 
2.7.4



More information about the amd-gfx mailing list