All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhigang Luo <zhigang.luo@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Zhigang Luo <zhigang.luo@amd.com>
Subject: [PATCH 3/5] drm/amdgpu: remove sriov vf mmhub system aperture and fb location programming
Date: Thu, 3 Jun 2021 10:13:03 -0400	[thread overview]
Message-ID: <20210603141305.2542-3-zhigang.luo@amd.com> (raw)
In-Reply-To: <20210603141305.2542-1-zhigang.luo@amd.com>

host driver programmed mmhub system aperture and fb location for vf, no
need to program in guest side.

Signed-off-by: Zhigang Luo <zhigang.luo@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c
index 998e674f9369..f5f7181f9af5 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c
@@ -111,6 +111,9 @@ static void mmhub_v1_7_init_system_aperture_regs(struct amdgpu_device *adev)
 	WREG32_SOC15(MMHUB, 0, regMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
 	WREG32_SOC15(MMHUB, 0, regMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
 
+	if (amdgpu_sriov_vf(adev))
+		return;
+
 	/* Program the system aperture low logical page number. */
 	WREG32_SOC15(MMHUB, 0, regMC_VM_SYSTEM_APERTURE_LOW_ADDR,
 		     min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18);
@@ -129,8 +132,6 @@ static void mmhub_v1_7_init_system_aperture_regs(struct amdgpu_device *adev)
 		WREG32_SOC15(MMHUB, 0, regMC_VM_SYSTEM_APERTURE_LOW_ADDR, 0x3FFFFFFF);
 		WREG32_SOC15(MMHUB, 0, regMC_VM_SYSTEM_APERTURE_HIGH_ADDR, 0);
 	}
-	if (amdgpu_sriov_vf(adev))
-		return;
 
 	/* Set default page address. */
 	value = amdgpu_gmc_vram_mc2pa(adev, adev->vram_scratch.gpu_addr);
@@ -331,18 +332,6 @@ static void mmhub_v1_7_program_invalidation(struct amdgpu_device *adev)
 
 static int mmhub_v1_7_gart_enable(struct amdgpu_device *adev)
 {
-	if (amdgpu_sriov_vf(adev)) {
-		/*
-		 * MC_VM_FB_LOCATION_BASE/TOP is NULL for VF, becuase they are
-		 * VF copy registers so vbios post doesn't program them, for
-		 * SRIOV driver need to program them
-		 */
-		WREG32_SOC15(MMHUB, 0, regMC_VM_FB_LOCATION_BASE,
-			     adev->gmc.vram_start >> 24);
-		WREG32_SOC15(MMHUB, 0, regMC_VM_FB_LOCATION_TOP,
-			     adev->gmc.vram_end >> 24);
-	}
-
 	/* GART Enable. */
 	mmhub_v1_7_init_gart_aperture_regs(adev);
 	mmhub_v1_7_init_system_aperture_regs(adev);
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2021-06-03 14:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 14:13 [PATCH 1/5] drm/amdgpu: remove sriov vf checking from getting fb location Zhigang Luo
2021-06-03 14:13 ` [PATCH 2/5] drm/amdgpu: remove sriov vf gfxhub fb location programming Zhigang Luo
2021-06-03 15:10   ` Liu, Shaoyun
2021-06-03 15:22     ` Luo, Zhigang
2021-06-03 14:13 ` Zhigang Luo [this message]
2021-06-03 15:11   ` [PATCH 3/5] drm/amdgpu: remove sriov vf mmhub system aperture and " Liu, Shaoyun
2021-06-03 14:13 ` [PATCH 4/5] drm/amdgpu: add psp microcode init for arcturus and aldebaran sriov vf Zhigang Luo
2021-06-03 15:12   ` Liu, Shaoyun
2021-06-03 15:31     ` Luo, Zhigang
2021-06-07 13:51       ` Zhang, Hawking
2021-06-07 13:59         ` Luo, Zhigang
2021-06-03 14:13 ` [PATCH 5/5] drm/amdgpu: allocate psp fw private buffer from VRAM for " Zhigang Luo
2021-06-03 15:14   ` Liu, Shaoyun
2021-06-03 15:47     ` Luo, Zhigang
2021-06-03 16:43       ` Liu, Shaoyun
2021-06-03 15:09 ` [PATCH 1/5] drm/amdgpu: remove sriov vf checking from getting fb location Liu, Shaoyun
2021-06-04  1:13   ` Deng, Emily
2021-06-04 11:14     ` Christian König
2021-06-04 13:23       ` Luo, Zhigang
2021-06-04 13:46         ` Christian König
2021-06-04 14:06           ` Luo, Zhigang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210603141305.2542-3-zhigang.luo@amd.com \
    --to=zhigang.luo@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.