From 9da844ca48204f6656c3fab4585709ec11fa6a50 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 5 Oct 2010 18:05:26 -0400 Subject: [PATCH] drm/radeon/kms/legacy: don't use alt timing for primary dac Some laptops enable alternate timing registers for the CRT, this can lead to a blank screen when the driver takes over is the alternate values are still enabled for the CRT. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=30620 Signed-off-by: Alex Deucher Cc: stable@kernel.org --- drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index 0b83970..89516de 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c @@ -313,7 +313,7 @@ static void radeon_legacy_primary_dac_mode_set(struct drm_encoder *encoder, struct radeon_device *rdev = dev->dev_private; struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); - uint32_t disp_output_cntl, dac_cntl, dac2_cntl, dac_macro_cntl; + u32 disp_output_cntl, dac_cntl, dac2_cntl, dac_macro_cntl, fp_gen_cntl; DRM_DEBUG_KMS("\n"); @@ -338,6 +338,17 @@ static void radeon_legacy_primary_dac_mode_set(struct drm_encoder *encoder, } } + /* don't use alt/shadow sync values for CRT/DFP */ + fp_gen_cntl = RREG32(RADEON_FP_GEN_CNTL); + fp_gen_cntl &= ~(RADEON_FP_RMX_HVSYNC_CONTROL_EN | + RADEON_FP_DFP_SYNC_SEL | + RADEON_FP_CRT_SYNC_SEL | + RADEON_FP_CRTC_LOCK_8DOT | + RADEON_FP_USE_SHADOW_EN | + RADEON_FP_CRTC_USE_SHADOW_VEND | + RADEON_FP_CRT_SYNC_ALT); + WREG32(RADEON_FP_GEN_CNTL, fp_gen_cntl); + dac_cntl = (RADEON_DAC_MASK_ALL | RADEON_DAC_VGA_ADR_EN | /* TODO 6-bits */ -- 1.7.1.1