All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

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.