aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
index 886df0902067..93c45f26b7c8 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)
249 dev_warn(adev->dev, "Wait for MC idle timedout !\n"); 249 dev_warn(adev->dev, "Wait for MC idle timedout !\n");
250 } 250 }
251 251
252 WREG32(mmVGA_HDP_CONTROL, VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK); 252 if (adev->mode_info.num_crtc) {
253 u32 tmp;
254
255 /* Lockout access through VGA aperture*/
256 tmp = RREG32(mmVGA_HDP_CONTROL);
257 tmp |= VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK;
258 WREG32(mmVGA_HDP_CONTROL, tmp);
259
260 /* disable VGA render */
261 tmp = RREG32(mmVGA_RENDER_CONTROL);
262 tmp &= ~VGA_VSTATUS_CNTL;
263 WREG32(mmVGA_RENDER_CONTROL, tmp);
264 }
253 /* Update configuration */ 265 /* Update configuration */
254 WREG32(mmMC_VM_SYSTEM_APERTURE_LOW_ADDR, 266 WREG32(mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
255 adev->mc.vram_start >> 12); 267 adev->mc.vram_start >> 12);