Skip to contentSkip to conversation

drm/amdgpu: unity mc base address for arcturus

PATCH In review Frank.Min 3 participants 4 messages Aug 21, 2019 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Frank.Min

author
#0 lore raw

PATCH 1/2 drm/amdgpu: unity mc base address for arcturus

arcturus for sriov would use the unified mc base address

Change-Id: I3f10f88877aa38145a259b88c11a6aa2329f3fe2

---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +6 -6
index 6de1726..683f47d 100644
@@ -920,12 +920,12 @@ static void gmc_v9_0_vram_gtt_location(struct amdgpu_device *adev,
 					struct amdgpu_gmc *mc)
 {
 	u64 base = 0;
-	if (!amdgpu_sriov_vf(adev)) {
-		if (adev->asic_type == CHIP_ARCTURUS)
-			base = mmhub_v9_4_get_fb_location(adev);
-		else
-			base = mmhub_v1_0_get_fb_location(adev);
-	}
+
+	if (adev->asic_type == CHIP_ARCTURUS)
+		base = mmhub_v9_4_get_fb_location(adev);
+	else if (!amdgpu_sriov_vf(adev))
+		base = mmhub_v1_0_get_fb_location(adev);
+
 	/* add the xgmi offset of the physical node */
 	base += adev->gmc.xgmi.physical_node_id * adev->gmc.xgmi.node_segment_size;
 	amdgpu_gmc_vram_location(adev, mc, base);
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1566381635-6484-1-git-send-email-Frank.Min-5C7GfCeVMHo@public.gmane.org

author
#2 lore raw

PATCH 2/2 drm/amdgpu: disable agp for sriov

Since agp is not used for sriov, just disable it

Change-Id: I3aa9753499e2e74d982bb611214f94bd57bdcd9e

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 8 ++++++++
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c   | 3 +--
 2 files changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +8 -0
index 250d921..6094990 100644
@@ -218,6 +218,14 @@ void amdgpu_gmc_agp_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc)
 	const uint64_t sixteen_gb_mask = ~(sixteen_gb - 1);
 	u64 size_af, size_bf;
 
+	if (amdgpu_sriov_vf(adev)) {
+		mc->agp_start = 0xffffffff;
+		mc->agp_end = 0x0;
+		mc->agp_size = 0;
+
+		return;
+	}
+
 	if (mc->fb_start > mc->gart_start) {
 		size_bf = (mc->fb_start & sixteen_gb_mask) -
 			ALIGN(mc->gart_end + 1, sixteen_gb);
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +1 -2
index 683f47d..6ce2977 100644
@@ -930,8 +930,7 @@ static void gmc_v9_0_vram_gtt_location(struct amdgpu_device *adev,
 	base += adev->gmc.xgmi.physical_node_id * adev->gmc.xgmi.node_segment_size;
 	amdgpu_gmc_vram_location(adev, mc, base);
 	amdgpu_gmc_gart_location(adev, mc);
-	if (!amdgpu_sriov_vf(adev))
-		amdgpu_gmc_agp_location(adev, mc);
+	amdgpu_gmc_agp_location(adev, mc);
 	/* base offset of vram pages */
 	adev->vm_manager.vram_base_offset = gfxhub_v1_0_get_mc_fb_offset(adev);
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1566381635-6484-2-git-send-email-Frank.Min-5C7GfCeVMHo@public.gmane.org

#4 lore raw

Re: [PATCH 2/2] drm/amdgpu: disable agp for sriov

Am 21.08.19 um 12:00 schrieb Frank.Min:

Quoted 3 lines

Since agp is not used for sriov, just disable it

Change-Id: I3aa9753499e2e74d982bb611214f94bd57bd

Missing Signed-of-by line in the commit message.

With that fixed Reviewed-by: Christian König <[email protected]> for the series.

Quoted 30 lines

cd9e

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 8 ++++++++
  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c   | 3 +--
  2 files changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +8 -0
index 250d921..6094990 100644
@@ -218,6 +218,14 @@ void amdgpu_gmc_agp_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc)
  	const uint64_t sixteen_gb_mask = ~(sixteen_gb - 1);
  	u64 size_af, size_bf;
 
+	if (amdgpu_sriov_vf(adev)) {
+		mc->agp_start = 0xffffffff;
+		mc->agp_end = 0x0;
+		mc->agp_size = 0;
+
+		return;
+	}
+
  	if (mc->fb_start > mc->gart_start) {
  		size_bf = (mc->fb_start & sixteen_gb_mask) -
  			ALIGN(mc->gart_end + 1, sixteen_gb);
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0 -0
index 683f47d..6ce2977 100644

drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static void gmc_v9_0_vram_gtt_location(struct amdgpu_device *adev, · line 936

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +1 -2
@@ -930,8 +930,7 @@ static void gmc_v9_0_vram_gtt_location(struct amdgpu_device *adev,
  	base += adev->gmc.xgmi.physical_node_id * adev->gmc.xgmi.node_segment_size;
  	amdgpu_gmc_vram_location(adev, mc, base);
  	amdgpu_gmc_gart_location(adev, mc);
-	if (!amdgpu_sriov_vf(adev))
-		amdgpu_gmc_agp_location(adev, mc);
+	amdgpu_gmc_agp_location(adev, mc);
  	/* base offset of vram pages */
  	adev->vm_manager.vram_base_offset = gfxhub_v1_0_get_mc_fb_offset(adev);
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Emily Deng
#5 lore raw
In reply to a message not in the archive

Series

Quoted 40 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Frank.Min
Sent: Wednesday, August 21, 2019 6:01 PM
To: [email protected]
Cc: Min, Frank <[email protected]>
Subject: [PATCH 1/2] drm/amdgpu: unity mc base address for arcturus

arcturus for sriov would use the unified mc base address

Change-Id: I3f10f88877aa38145a259b88c11a6aa2329f3fe2
---
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 12 ++++++------

1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +6 -6
index 6de1726..683f47d 100644
@@ -920,12 +920,12 @@ static void gmc_v9_0_vram_gtt_location(struct
 amdgpu_device *adev,
 					struct amdgpu_gmc *mc)
 {
 	u64 base = 0;
-	if (!amdgpu_sriov_vf(adev)) {
-		if (adev->asic_type == CHIP_ARCTURUS)
-			base = mmhub_v9_4_get_fb_location(adev);
-		else
-			base = mmhub_v1_0_get_fb_location(adev);
-	}
+
+	if (adev->asic_type == CHIP_ARCTURUS)
+		base = mmhub_v9_4_get_fb_location(adev);
+	else if (!amdgpu_sriov_vf(adev))
+		base = mmhub_v1_0_get_fb_location(adev);
+
 	/* add the xgmi offset of the physical node */
 	base += adev->gmc.xgmi.physical_node_id * adev-
Quoted 1 line

gmc.xgmi.node_segment_size;

Quoted 8 lines
	amdgpu_gmc_vram_location(adev, mc, base);

--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx