* [PATCH 1/2] drm/amdgpu: unity mc base address for arcturus
@ 2019-08-21 10:00 Frank.Min
[not found] ` <1566381635-6484-1-git-send-email-Frank.Min-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Frank.Min @ 2019-08-21 10:00 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Frank.Min
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(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 6de1726..683f47d 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -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);
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] drm/amdgpu: disable agp for sriov
[not found] ` <1566381635-6484-1-git-send-email-Frank.Min-5C7GfCeVMHo@public.gmane.org>
@ 2019-08-21 10:00 ` Frank.Min
[not found] ` <1566381635-6484-2-git-send-email-Frank.Min-5C7GfCeVMHo@public.gmane.org>
2019-08-21 10:13 ` [PATCH 1/2] drm/amdgpu: unity mc base address for arcturus Deng, Emily
1 sibling, 1 reply; 4+ messages in thread
From: Frank.Min @ 2019-08-21 10:00 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Frank.Min
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(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index 250d921..6094990 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -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);
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 683f47d..6ce2977 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -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);
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH 1/2] drm/amdgpu: unity mc base address for arcturus
[not found] ` <1566381635-6484-1-git-send-email-Frank.Min-5C7GfCeVMHo@public.gmane.org>
2019-08-21 10:00 ` [PATCH 2/2] drm/amdgpu: disable agp for sriov Frank.Min
@ 2019-08-21 10:13 ` Deng, Emily
1 sibling, 0 replies; 4+ messages in thread
From: Deng, Emily @ 2019-08-21 10:13 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Min, Frank
Series
Reviewed-by: Emily Deng <Emily.Deng@amd.com>
>-----Original Message-----
>From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of
>Frank.Min
>Sent: Wednesday, August 21, 2019 6:01 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Min, Frank <Frank.Min@amd.com>
>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(-)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>index 6de1726..683f47d 100644
>--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>@@ -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);
>--
>2.7.4
>
>_______________________________________________
>amd-gfx mailing list
>amd-gfx@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu: disable agp for sriov
[not found] ` <1566381635-6484-2-git-send-email-Frank.Min-5C7GfCeVMHo@public.gmane.org>
@ 2019-08-21 14:06 ` Christian König
0 siblings, 0 replies; 4+ messages in thread
From: Christian König @ 2019-08-21 14:06 UTC (permalink / raw)
To: Frank.Min, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Am 21.08.19 um 12:00 schrieb Frank.Min:
> 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 <christian.koenig@amd.com>
for the series.
> 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(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> index 250d921..6094990 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> @@ -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);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> index 683f47d..6ce2977 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> @@ -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
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-21 14:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-21 10:00 [PATCH 1/2] drm/amdgpu: unity mc base address for arcturus Frank.Min
[not found] ` <1566381635-6484-1-git-send-email-Frank.Min-5C7GfCeVMHo@public.gmane.org>
2019-08-21 10:00 ` [PATCH 2/2] drm/amdgpu: disable agp for sriov Frank.Min
[not found] ` <1566381635-6484-2-git-send-email-Frank.Min-5C7GfCeVMHo@public.gmane.org>
2019-08-21 14:06 ` Christian König
2019-08-21 10:13 ` [PATCH 1/2] drm/amdgpu: unity mc base address for arcturus Deng, Emily
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.