* [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2)
@ 2017-07-25 3:30 Alex Deucher
[not found] ` <1500953449-19470-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 13+ messages in thread
From: Alex Deucher @ 2017-07-25 3:30 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
Needs to be done when the MC is set up.
v2: make consistent with other asics
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
index 117c4835..ab0a104 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
@@ -249,7 +249,19 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev)
dev_warn(adev->dev, "Wait for MC idle timedout !\n");
}
- WREG32(mmVGA_HDP_CONTROL, VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK);
+ if (adev->mode_info.num_crtc) {
+ u32 tmp;
+
+ /* Lockout access through VGA aperture*/
+ tmp = RREG32(mmVGA_HDP_CONTROL);
+ tmp |= VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK;
+ WREG32(mmVGA_HDP_CONTROL, tmp);
+
+ /* disable VGA render */
+ tmp = RREG32(mmVGA_RENDER_CONTROL);
+ tmp &= ~VGA_VSTATUS_CNTL;
+ WREG32(mmVGA_RENDER_CONTROL, tmp);
+ }
/* Update configuration */
WREG32(mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
adev->mc.vram_start >> 12);
--
2.5.5
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/4] drm/amdgpu/gmc7: disable legacy vga features in gmc init
[not found] ` <1500953449-19470-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2017-07-25 3:30 ` Alex Deucher
2017-07-25 3:30 ` [PATCH 3/4] drm/amdgpu/gmc8: " Alex Deucher
` (4 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Alex Deucher @ 2017-07-25 3:30 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
Needs to be done when the MC is set up.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
index 7ac92de..788e65e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
@@ -37,6 +37,9 @@
#include "oss/oss_2_0_d.h"
#include "oss/oss_2_0_sh_mask.h"
+#include "dce/dce_8_0_d.h"
+#include "dce/dce_8_0_sh_mask.h"
+
#include "amdgpu_atombios.h"
static void gmc_v7_0_set_gart_funcs(struct amdgpu_device *adev);
@@ -273,6 +276,17 @@ static void gmc_v7_0_mc_program(struct amdgpu_device *adev)
if (gmc_v7_0_wait_for_idle((void *)adev)) {
dev_warn(adev->dev, "Wait for MC idle timedout !\n");
}
+ if (adev->mode_info.num_crtc) {
+ /* Lockout access through VGA aperture*/
+ tmp = RREG32(mmVGA_HDP_CONTROL);
+ tmp = REG_SET_FIELD(tmp, VGA_HDP_CONTROL, VGA_MEMORY_DISABLE, 1);
+ WREG32(mmVGA_HDP_CONTROL, tmp);
+
+ /* disable VGA render */
+ tmp = RREG32(mmVGA_RENDER_CONTROL);
+ tmp = REG_SET_FIELD(tmp, VGA_RENDER_CONTROL, VGA_VSTATUS_CNTL, 0);
+ WREG32(mmVGA_RENDER_CONTROL, tmp);
+ }
/* Update configuration */
WREG32(mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
adev->mc.vram_start >> 12);
--
2.5.5
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/4] drm/amdgpu/gmc8: disable legacy vga features in gmc init
[not found] ` <1500953449-19470-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-07-25 3:30 ` [PATCH 2/4] drm/amdgpu/gmc7: disable legacy vga features in gmc init Alex Deucher
@ 2017-07-25 3:30 ` Alex Deucher
2017-07-25 3:30 ` [PATCH 4/4] drm/amdgpu/gmc9: " Alex Deucher
` (3 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Alex Deucher @ 2017-07-25 3:30 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
Needs to be done when the MC is set up.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index 04da556..8e20e50 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -35,6 +35,9 @@
#include "oss/oss_3_0_d.h"
#include "oss/oss_3_0_sh_mask.h"
+#include "dce/dce_10_0_d.h"
+#include "dce/dce_10_0_sh_mask.h"
+
#include "vid.h"
#include "vi.h"
@@ -438,6 +441,17 @@ static void gmc_v8_0_mc_program(struct amdgpu_device *adev)
if (gmc_v8_0_wait_for_idle((void *)adev)) {
dev_warn(adev->dev, "Wait for MC idle timedout !\n");
}
+ if (adev->mode_info.num_crtc) {
+ /* Lockout access through VGA aperture*/
+ tmp = RREG32(mmVGA_HDP_CONTROL);
+ tmp = REG_SET_FIELD(tmp, VGA_HDP_CONTROL, VGA_MEMORY_DISABLE, 1);
+ WREG32(mmVGA_HDP_CONTROL, tmp);
+
+ /* disable VGA render */
+ tmp = RREG32(mmVGA_RENDER_CONTROL);
+ tmp = REG_SET_FIELD(tmp, VGA_RENDER_CONTROL, VGA_VSTATUS_CNTL, 0);
+ WREG32(mmVGA_RENDER_CONTROL, tmp);
+ }
/* Update configuration */
WREG32(mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
adev->mc.vram_start >> 12);
--
2.5.5
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/4] drm/amdgpu/gmc9: disable legacy vga features in gmc init
[not found] ` <1500953449-19470-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-07-25 3:30 ` [PATCH 2/4] drm/amdgpu/gmc7: disable legacy vga features in gmc init Alex Deucher
2017-07-25 3:30 ` [PATCH 3/4] drm/amdgpu/gmc8: " Alex Deucher
@ 2017-07-25 3:30 ` Alex Deucher
[not found] ` <1500953449-19470-4-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-07-25 3:34 ` [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2) Michel Dänzer
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Alex Deucher @ 2017-07-25 3:30 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
Needs to be done when the MC is set up.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 677181f..c22899a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -29,6 +29,8 @@
#include "vega10/HDP/hdp_4_0_offset.h"
#include "vega10/HDP/hdp_4_0_sh_mask.h"
#include "vega10/GC/gc_9_0_sh_mask.h"
+#include "vega10/DC/dce_12_0_offset.h"
+#include "vega10/DC/dce_12_0_sh_mask.h"
#include "vega10/vega10_enum.h"
#include "soc15_common.h"
@@ -750,6 +752,20 @@ static int gmc_v9_0_hw_init(void *handle)
/* The sequence of these two function calls matters.*/
gmc_v9_0_init_golden_registers(adev);
+ if (adev->mode_info.num_crtc) {
+ u32 tmp;
+
+ /* Lockout access through VGA aperture*/
+ tmp = RREG32_SOC15(DCE, 0, mmVGA_HDP_CONTROL);
+ tmp = REG_SET_FIELD(tmp, VGA_HDP_CONTROL, VGA_MEMORY_DISABLE, 1);
+ WREG32_SOC15(DCE, 0, mmVGA_HDP_CONTROL, tmp);
+
+ /* disable VGA render */
+ tmp = RREG32_SOC15(DCE, 0, mmVGA_RENDER_CONTROL);
+ tmp = REG_SET_FIELD(tmp, VGA_RENDER_CONTROL, VGA_VSTATUS_CNTL, 0);
+ WREG32_SOC15(DCE, 0, mmVGA_RENDER_CONTROL, tmp);
+ }
+
r = gmc_v9_0_gart_enable(adev);
return r;
--
2.5.5
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2)
[not found] ` <1500953449-19470-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
` (2 preceding siblings ...)
2017-07-25 3:30 ` [PATCH 4/4] drm/amdgpu/gmc9: " Alex Deucher
@ 2017-07-25 3:34 ` Michel Dänzer
2017-07-25 3:59 ` Zhang, Jerry (Junwei)
2017-07-25 9:17 ` Christian König
5 siblings, 0 replies; 13+ messages in thread
From: Michel Dänzer @ 2017-07-25 3:34 UTC (permalink / raw)
To: Alex Deucher; +Cc: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On 25/07/17 12:30 PM, Alex Deucher wrote:
> Needs to be done when the MC is set up.
>
> v2: make consistent with other asics
Thanks for that. The series is
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2)
[not found] ` <1500953449-19470-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
` (3 preceding siblings ...)
2017-07-25 3:34 ` [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2) Michel Dänzer
@ 2017-07-25 3:59 ` Zhang, Jerry (Junwei)
2017-07-25 9:17 ` Christian König
5 siblings, 0 replies; 13+ messages in thread
From: Zhang, Jerry (Junwei) @ 2017-07-25 3:59 UTC (permalink / raw)
To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
On 07/25/2017 11:30 AM, Alex Deucher wrote:
> Needs to be done when the MC is set up.
>
> v2: make consistent with other asics
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> index 117c4835..ab0a104 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> @@ -249,7 +249,19 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev)
> dev_warn(adev->dev, "Wait for MC idle timedout !\n");
> }
>
> - WREG32(mmVGA_HDP_CONTROL, VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK);
> + if (adev->mode_info.num_crtc) {
> + u32 tmp;
> +
> + /* Lockout access through VGA aperture*/
> + tmp = RREG32(mmVGA_HDP_CONTROL);
> + tmp |= VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK;
Shall we use VGA_MEMORY_DISABLE like others?
It's available in sid.h.
Apart from that, all patches are
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Jerry
> + WREG32(mmVGA_HDP_CONTROL, tmp);
> +
> + /* disable VGA render */
> + tmp = RREG32(mmVGA_RENDER_CONTROL);
> + tmp &= ~VGA_VSTATUS_CNTL;
> + WREG32(mmVGA_RENDER_CONTROL, tmp);
> + }
> /* Update configuration */
> WREG32(mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
> adev->mc.vram_start >> 12);
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [PATCH 4/4] drm/amdgpu/gmc9: disable legacy vga features in gmc init
[not found] ` <1500953449-19470-4-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2017-07-25 4:06 ` Deucher, Alexander
[not found] ` <BN6PR12MB16521CF9048567F549713682F7B80-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
0 siblings, 1 reply; 13+ messages in thread
From: Deucher, Alexander @ 2017-07-25 4:06 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> -----Original Message-----
> From: Alex Deucher [mailto:alexdeucher@gmail.com]
> Sent: Monday, July 24, 2017 11:31 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander
> Subject: [PATCH 4/4] drm/amdgpu/gmc9: disable legacy vga features in gmc
> init
>
> Needs to be done when the MC is set up.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Can someone see if this patch fixes the problem with the lower 8 MB of vram on vega10? I think this may explain what was messing with vram on resume that caused us to reserve the first 8 MB of vram.
Alex
> ---
> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> index 677181f..c22899a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> @@ -29,6 +29,8 @@
> #include "vega10/HDP/hdp_4_0_offset.h"
> #include "vega10/HDP/hdp_4_0_sh_mask.h"
> #include "vega10/GC/gc_9_0_sh_mask.h"
> +#include "vega10/DC/dce_12_0_offset.h"
> +#include "vega10/DC/dce_12_0_sh_mask.h"
> #include "vega10/vega10_enum.h"
>
> #include "soc15_common.h"
> @@ -750,6 +752,20 @@ static int gmc_v9_0_hw_init(void *handle)
> /* The sequence of these two function calls matters.*/
> gmc_v9_0_init_golden_registers(adev);
>
> + if (adev->mode_info.num_crtc) {
> + u32 tmp;
> +
> + /* Lockout access through VGA aperture*/
> + tmp = RREG32_SOC15(DCE, 0, mmVGA_HDP_CONTROL);
> + tmp = REG_SET_FIELD(tmp, VGA_HDP_CONTROL,
> VGA_MEMORY_DISABLE, 1);
> + WREG32_SOC15(DCE, 0, mmVGA_HDP_CONTROL, tmp);
> +
> + /* disable VGA render */
> + tmp = RREG32_SOC15(DCE, 0, mmVGA_RENDER_CONTROL);
> + tmp = REG_SET_FIELD(tmp, VGA_RENDER_CONTROL,
> VGA_VSTATUS_CNTL, 0);
> + WREG32_SOC15(DCE, 0, mmVGA_RENDER_CONTROL, tmp);
> + }
> +
> r = gmc_v9_0_gart_enable(adev);
>
> return r;
> --
> 2.5.5
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/4] drm/amdgpu/gmc9: disable legacy vga features in gmc init
[not found] ` <BN6PR12MB16521CF9048567F549713682F7B80-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2017-07-25 5:06 ` Huang Rui
2017-07-25 9:05 ` Huang Rui
0 siblings, 1 reply; 13+ messages in thread
From: Huang Rui @ 2017-07-25 5:06 UTC (permalink / raw)
To: Deucher, Alexander
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
On Tue, Jul 25, 2017 at 04:06:00AM +0000, Deucher, Alexander wrote:
> > -----Original Message-----
> > From: Alex Deucher [mailto:alexdeucher@gmail.com]
> > Sent: Monday, July 24, 2017 11:31 PM
> > To: amd-gfx@lists.freedesktop.org
> > Cc: Deucher, Alexander
> > Subject: [PATCH 4/4] drm/amdgpu/gmc9: disable legacy vga features in gmc
> > init
> >
> > Needs to be done when the MC is set up.
> >
> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>
> Can someone see if this patch fixes the problem with the lower 8 MB of vram on vega10? I think this may explain what was messing with vram on resume that caused us to reserve the first 8 MB of vram.
>
Let me have a try. The start of vram overwrite is probably still caused by
VGA mode. So, here, you disable it at first.
Thanks,
Rui
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/4] drm/amdgpu/gmc9: disable legacy vga features in gmc init
2017-07-25 5:06 ` Huang Rui
@ 2017-07-25 9:05 ` Huang Rui
0 siblings, 0 replies; 13+ messages in thread
From: Huang Rui @ 2017-07-25 9:05 UTC (permalink / raw)
To: Deucher, Alexander
Cc: Ken Wang, Hawking Zhang,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Alvin Huan
On Tue, Jul 25, 2017 at 01:06:42PM +0800, Huang Rui wrote:
> On Tue, Jul 25, 2017 at 04:06:00AM +0000, Deucher, Alexander wrote:
> > > -----Original Message-----
> > > From: Alex Deucher [mailto:alexdeucher@gmail.com]
> > > Sent: Monday, July 24, 2017 11:31 PM
> > > To: amd-gfx@lists.freedesktop.org
> > > Cc: Deucher, Alexander
> > > Subject: [PATCH 4/4] drm/amdgpu/gmc9: disable legacy vga features in gmc
> > > init
> > >
> > > Needs to be done when the MC is set up.
> > >
> > > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> >
> > Can someone see if this patch fixes the problem with the lower 8 MB of vram on vega10? I think this may explain what was messing with vram on resume that caused us to reserve the first 8 MB of vram.
> >
>
> Let me have a try. The start of vram overwrite is probably still caused by
> VGA mode. So, here, you disable it at first.
>
This patch doesn't fix the start 8 MB of vram corruption.
But I just found the 8M corruption issue only encountered when DC is disabled.
Thanks,
Ray
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2)
[not found] ` <1500953449-19470-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
` (4 preceding siblings ...)
2017-07-25 3:59 ` Zhang, Jerry (Junwei)
@ 2017-07-25 9:17 ` Christian König
[not found] ` <3fe89777-6e9e-69f4-1052-dca5879f242e-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
5 siblings, 1 reply; 13+ messages in thread
From: Christian König @ 2017-07-25 9:17 UTC (permalink / raw)
To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
Am 25.07.2017 um 05:30 schrieb Alex Deucher:
> Needs to be done when the MC is set up.
>
> v2: make consistent with other asics
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
On first glance it kind of looks a bit odd to have that in the GMC code,
but on second glance it actually makes sense.
Christian.
> ---
> drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> index 117c4835..ab0a104 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> @@ -249,7 +249,19 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev)
> dev_warn(adev->dev, "Wait for MC idle timedout !\n");
> }
>
> - WREG32(mmVGA_HDP_CONTROL, VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK);
> + if (adev->mode_info.num_crtc) {
> + u32 tmp;
> +
> + /* Lockout access through VGA aperture*/
> + tmp = RREG32(mmVGA_HDP_CONTROL);
> + tmp |= VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK;
> + WREG32(mmVGA_HDP_CONTROL, tmp);
> +
> + /* disable VGA render */
> + tmp = RREG32(mmVGA_RENDER_CONTROL);
> + tmp &= ~VGA_VSTATUS_CNTL;
> + WREG32(mmVGA_RENDER_CONTROL, tmp);
> + }
> /* Update configuration */
> WREG32(mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
> adev->mc.vram_start >> 12);
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* 答复: [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2)
[not found] ` <3fe89777-6e9e-69f4-1052-dca5879f242e-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
@ 2017-07-25 9:26 ` Qu, Jim
[not found] ` <DM3PR12MB0873C12EF55F95694CB4BCCB99B80-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
0 siblings, 1 reply; 13+ messages in thread
From: Qu, Jim @ 2017-07-25 9:26 UTC (permalink / raw)
To: Christian König, Alex Deucher,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Deucher, Alexander
Hi Christian:
Could you share your minds when you are on second glance?
Thanks
JimQu
________________________________________
发件人: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> 代表 Christian König <deathsimple@vodafone.de>
发送时间: 2017年7月25日 17:17
收件人: Alex Deucher; amd-gfx@lists.freedesktop.org
抄送: Deucher, Alexander
主题: Re: [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2)
Am 25.07.2017 um 05:30 schrieb Alex Deucher:
> Needs to be done when the MC is set up.
>
> v2: make consistent with other asics
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
On first glance it kind of looks a bit odd to have that in the GMC code,
but on second glance it actually makes sense.
Christian.
> ---
> drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> index 117c4835..ab0a104 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> @@ -249,7 +249,19 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev)
> dev_warn(adev->dev, "Wait for MC idle timedout !\n");
> }
>
> - WREG32(mmVGA_HDP_CONTROL, VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK);
> + if (adev->mode_info.num_crtc) {
> + u32 tmp;
> +
> + /* Lockout access through VGA aperture*/
> + tmp = RREG32(mmVGA_HDP_CONTROL);
> + tmp |= VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK;
> + WREG32(mmVGA_HDP_CONTROL, tmp);
> +
> + /* disable VGA render */
> + tmp = RREG32(mmVGA_RENDER_CONTROL);
> + tmp &= ~VGA_VSTATUS_CNTL;
> + WREG32(mmVGA_RENDER_CONTROL, tmp);
> + }
> /* Update configuration */
> WREG32(mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
> adev->mc.vram_start >> 12);
_______________________________________________
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] 13+ messages in thread
* Re: 答复: [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2)
[not found] ` <DM3PR12MB0873C12EF55F95694CB4BCCB99B80-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2017-07-25 10:12 ` Christian König
[not found] ` <d3405b22-0e0a-cff3-9089-9f6380e96c84-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
0 siblings, 1 reply; 13+ messages in thread
From: Christian König @ 2017-07-25 10:12 UTC (permalink / raw)
To: Qu, Jim, Alex Deucher,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Deucher, Alexander
The term "legacy VGA" sounds like the whole render functionality which
actually isn't part of the GMC AFAIK.
But what Alex primary disables here is the old VGA BAR in the CPU
address space and that is part of the GMC (or at least related to it).
BTW: Patch are Acked-by: Christian König <christian.koenig@amd.com>.
Christian.
Am 25.07.2017 um 11:26 schrieb Qu, Jim:
> Hi Christian:
>
> Could you share your minds when you are on second glance?
>
> Thanks
> JimQu
>
> ________________________________________
> 发件人: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> 代表 Christian König <deathsimple@vodafone.de>
> 发送时间: 2017年7月25日 17:17
> 收件人: Alex Deucher; amd-gfx@lists.freedesktop.org
> 抄送: Deucher, Alexander
> 主题: Re: [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2)
>
> Am 25.07.2017 um 05:30 schrieb Alex Deucher:
>> Needs to be done when the MC is set up.
>>
>> v2: make consistent with other asics
>>
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> On first glance it kind of looks a bit odd to have that in the GMC code,
> but on second glance it actually makes sense.
>
> Christian.
>
>> ---
>> drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 14 +++++++++++++-
>> 1 file changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
>> index 117c4835..ab0a104 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
>> @@ -249,7 +249,19 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev)
>> dev_warn(adev->dev, "Wait for MC idle timedout !\n");
>> }
>>
>> - WREG32(mmVGA_HDP_CONTROL, VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK);
>> + if (adev->mode_info.num_crtc) {
>> + u32 tmp;
>> +
>> + /* Lockout access through VGA aperture*/
>> + tmp = RREG32(mmVGA_HDP_CONTROL);
>> + tmp |= VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK;
>> + WREG32(mmVGA_HDP_CONTROL, tmp);
>> +
>> + /* disable VGA render */
>> + tmp = RREG32(mmVGA_RENDER_CONTROL);
>> + tmp &= ~VGA_VSTATUS_CNTL;
>> + WREG32(mmVGA_RENDER_CONTROL, tmp);
>> + }
>> /* Update configuration */
>> WREG32(mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
>> adev->mc.vram_start >> 12);
>
> _______________________________________________
> 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] 13+ messages in thread
* Re: 答复: [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2)
[not found] ` <d3405b22-0e0a-cff3-9089-9f6380e96c84-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
@ 2017-07-25 13:09 ` Harry Wentland
0 siblings, 0 replies; 13+ messages in thread
From: Harry Wentland @ 2017-07-25 13:09 UTC (permalink / raw)
To: Christian König, Qu, Jim, Alex Deucher,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Deucher, Alexander
Not an expert on GMC but this seems to be the best place to disable VGA
render.
Series is Acked-by: Harry Wentland <harry.wentland@amd.com>
Harry
On 2017-07-25 06:12 AM, Christian König wrote:
> The term "legacy VGA" sounds like the whole render functionality which
> actually isn't part of the GMC AFAIK.
>
> But what Alex primary disables here is the old VGA BAR in the CPU
> address space and that is part of the GMC (or at least related to it).
>
> BTW: Patch are Acked-by: Christian König <christian.koenig@amd.com>.
>
> Christian.
>
> Am 25.07.2017 um 11:26 schrieb Qu, Jim:
>> Hi Christian:
>>
>> Could you share your minds when you are on second glance?
>>
>> Thanks
>> JimQu
>>
>> ________________________________________
>> 发件人: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> 代表 Christian
>> König <deathsimple@vodafone.de>
>> 发送时间: 2017年7月25日 17:17
>> 收件人: Alex Deucher; amd-gfx@lists.freedesktop.org
>> 抄送: Deucher, Alexander
>> 主题: Re: [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in
>> gmc init (v2)
>>
>> Am 25.07.2017 um 05:30 schrieb Alex Deucher:
>>> Needs to be done when the MC is set up.
>>>
>>> v2: make consistent with other asics
>>>
>>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>> On first glance it kind of looks a bit odd to have that in the GMC code,
>> but on second glance it actually makes sense.
>>
>> Christian.
>>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 14 +++++++++++++-
>>> 1 file changed, 13 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
>>> b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
>>> index 117c4835..ab0a104 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
>>> @@ -249,7 +249,19 @@ static void gmc_v6_0_mc_program(struct
>>> amdgpu_device *adev)
>>> dev_warn(adev->dev, "Wait for MC idle timedout !\n");
>>> }
>>>
>>> - WREG32(mmVGA_HDP_CONTROL,
>>> VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK);
>>> + if (adev->mode_info.num_crtc) {
>>> + u32 tmp;
>>> +
>>> + /* Lockout access through VGA aperture*/
>>> + tmp = RREG32(mmVGA_HDP_CONTROL);
>>> + tmp |= VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK;
>>> + WREG32(mmVGA_HDP_CONTROL, tmp);
>>> +
>>> + /* disable VGA render */
>>> + tmp = RREG32(mmVGA_RENDER_CONTROL);
>>> + tmp &= ~VGA_VSTATUS_CNTL;
>>> + WREG32(mmVGA_RENDER_CONTROL, tmp);
>>> + }
>>> /* Update configuration */
>>> WREG32(mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
>>> adev->mc.vram_start >> 12);
>>
>> _______________________________________________
>> 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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-07-25 13:09 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25 3:30 [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2) Alex Deucher
[not found] ` <1500953449-19470-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-07-25 3:30 ` [PATCH 2/4] drm/amdgpu/gmc7: disable legacy vga features in gmc init Alex Deucher
2017-07-25 3:30 ` [PATCH 3/4] drm/amdgpu/gmc8: " Alex Deucher
2017-07-25 3:30 ` [PATCH 4/4] drm/amdgpu/gmc9: " Alex Deucher
[not found] ` <1500953449-19470-4-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-07-25 4:06 ` Deucher, Alexander
[not found] ` <BN6PR12MB16521CF9048567F549713682F7B80-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-07-25 5:06 ` Huang Rui
2017-07-25 9:05 ` Huang Rui
2017-07-25 3:34 ` [PATCH 1/4] drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2) Michel Dänzer
2017-07-25 3:59 ` Zhang, Jerry (Junwei)
2017-07-25 9:17 ` Christian König
[not found] ` <3fe89777-6e9e-69f4-1052-dca5879f242e-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-25 9:26 ` 答复: " Qu, Jim
[not found] ` <DM3PR12MB0873C12EF55F95694CB4BCCB99B80-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-07-25 10:12 ` Christian König
[not found] ` <d3405b22-0e0a-cff3-9089-9f6380e96c84-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-25 13:09 ` Harry Wentland
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.