diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c index 8e71330..68aad17 100644 --- a/src/radeon_crtc.c +++ b/src/radeon_crtc.c @@ -378,6 +378,17 @@ RADEONInitCrtcRegisters(xf86CrtcPtr crtc, RADEONSavePtr save, save->fp_crtc_h_total_disp = save->crtc_h_total_disp; save->fp_crtc_v_total_disp = save->crtc_v_total_disp; + /* Set initial value of following registers for all cases first, + if a DFP/LCD is connected on internal TMDS/LVDS port, + they will be set by RADEONInitFPRegister + */ + save->fp_gen_cntl = 0; + save->fp_vert_stretch = info->SavedReg.fp_vert_stretch & + RADEON_VERT_STRETCH_RESERVED; + save->fp_horz_stretch = info->SavedReg.fp_horz_stretch & + (RADEON_HORZ_FP_LOOP_STRETCH | + RADEON_HORZ_AUTO_RATIO_INC); + if (info->IsDellServer) { save->dac2_cntl = info->SavedReg.dac2_cntl; save->tv_dac_cntl = info->SavedReg.tv_dac_cntl; diff --git a/src/radeon_driver.c b/src/radeon_driver.c index c1f0c3c..44ac0a0 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -4166,7 +4166,14 @@ void RADEONRestoreCrtcRegisters(ScrnInfoPtr pScrn, OUTREG(RADEON_FP_V_SYNC_STRT_WID, restore->fp_v_sync_strt_wid); OUTREG(RADEON_FP_CRTC_H_TOTAL_DISP, restore->fp_crtc_h_total_disp); OUTREG(RADEON_FP_CRTC_V_TOTAL_DISP, restore->fp_crtc_v_total_disp); - + + /* Write the initial values of the following registers here, + if LCD/DFP are connected on internal TMDS/LVDS port, + they will be restored by RADEONRestoreRMXRegisters + */ + OUTREG(RADEON_FP_HORZ_STRETCH, restore->fp_horz_stretch); + OUTREG(RADEON_FP_VERT_STRETCH, restore->fp_vert_stretch); + if (IS_R300_VARIANT) OUTREG(R300_CRTC_TILE_X0_Y0, restore->crtc_tile_x0_y0); OUTREG(RADEON_CRTC_OFFSET_CNTL, restore->crtc_offset_cntl);