drm/amdgpu: MC_VM_FB_OFFSET is pf only register.

Submitted by Deng, Emily on Aug. 15, 2018, 9:48 a.m.

Details

Message ID 1534326508-17477-2-git-send-email-Emily.Deng@amd.com
State New
Headers show
Series "Series without cover letter" ( rev: 2 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Deng, Emily Aug. 15, 2018, 9:48 a.m.
Signed-off-by: Emily Deng <Emily.Deng@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index b60ed28..52b13e6 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -693,7 +693,10 @@  static void gmc_v9_0_vram_gtt_location(struct amdgpu_device *adev,
 	amdgpu_device_vram_location(adev, &adev->gmc, base);
 	amdgpu_device_gart_location(adev, mc);
 	/* base offset of vram pages */
-	adev->vm_manager.vram_base_offset = gfxhub_v1_0_get_mc_fb_offset(adev);
+	if (!amdgpu_sriov_vf(adev))
+		adev->vm_manager.vram_base_offset = gfxhub_v1_0_get_mc_fb_offset(adev);
+	else
+		adev->vm_manager.vram_base_offset = 0;
 }
 
 /**

Comments

Sorry, sent the wrong patch, please ignore this email.

>-----Original Message-----
>From: Emily Deng <Emily.Deng@amd.com>
>Sent: Wednesday, August 15, 2018 5:48 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Deng, Emily <Emily.Deng@amd.com>
>Subject: [PATCH] drm/amdgpu: MC_VM_FB_OFFSET is pf only register.
>
>Signed-off-by: Emily Deng <Emily.Deng@amd.com>
>---
> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 ++++-
> 1 file changed, 4 insertions(+), 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 b60ed28..52b13e6 100644
>--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>@@ -693,7 +693,10 @@ static void gmc_v9_0_vram_gtt_location(struct
>amdgpu_device *adev,
> 	amdgpu_device_vram_location(adev, &adev->gmc, base);
> 	amdgpu_device_gart_location(adev, mc);
> 	/* base offset of vram pages */
>-	adev->vm_manager.vram_base_offset =
>gfxhub_v1_0_get_mc_fb_offset(adev);
>+	if (!amdgpu_sriov_vf(adev))
>+		adev->vm_manager.vram_base_offset =
>gfxhub_v1_0_get_mc_fb_offset(adev);
>+	else
>+		adev->vm_manager.vram_base_offset = 0;
> }
>
> /**
>--
>2.7.4