diff --git a/src/legacy_output.c b/src/legacy_output.c index e5ddf1f..25850aa 100644 --- a/src/legacy_output.c +++ b/src/legacy_output.c @@ -769,6 +769,8 @@ RADEONEnableDisplay(xf86OutputPtr output, BOOL bEnable) OUTREG(RADEON_LVDS_GEN_CNTL, tmp); save->lvds_gen_cntl |= (RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN); save->lvds_gen_cntl &= ~(RADEON_LVDS_DISPLAY_DIS); + radeon_set_backlight_level(output, 255); + //radeon_set_backlight_level(output, 0); } else if (radeon_output->MonType == MT_STV || radeon_output->MonType == MT_CTV) { info->output_tv1 |= (1 << o); @@ -860,6 +862,8 @@ RADEONEnableDisplay(xf86OutputPtr output, BOOL bEnable) OUTREG(RADEON_LVDS_GEN_CNTL, tmp); save->lvds_gen_cntl |= RADEON_LVDS_DISPLAY_DIS; save->lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN); + radeon_set_backlight_level(output, 0); + //radeon_set_backlight_level(output, 255); if (info->IsMobility || info->IsIGP) { OUTPLL(pScrn, RADEON_PIXCLKS_CNTL, tmpPixclksCntl); } diff --git a/src/radeon_output.c b/src/radeon_output.c index 5924c81..df91d80 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -1081,12 +1081,13 @@ radeon_destroy (xf86OutputPtr output) xfree(output->driver_private); } -static void +void radeon_set_backlight_level(xf86OutputPtr output, int level) { -#if 0 +#if 1 ScrnInfoPtr pScrn = output->scrn; RADEONInfoPtr info = RADEONPTR(pScrn); + RADEONOutputPrivatePtr radeon_output = output->driver_private; unsigned char * RADEONMMIO = info->MMIO; uint32_t lvds_gen_cntl; @@ -1094,10 +1095,10 @@ radeon_set_backlight_level(xf86OutputPtr output, int level) lvds_gen_cntl |= RADEON_LVDS_BL_MOD_EN; lvds_gen_cntl &= ~RADEON_LVDS_BL_MOD_LEVEL_MASK; lvds_gen_cntl |= (level << RADEON_LVDS_BL_MOD_LEVEL_SHIFT) & RADEON_LVDS_BL_MOD_LEVEL_MASK; - //usleep (radeon_output->PanelPwrDly * 1000); + usleep (radeon_output->PanelPwrDly * 1000); OUTREG(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); lvds_gen_cntl &= ~RADEON_LVDS_BL_MOD_EN; - //usleep (radeon_output->PanelPwrDly * 1000); + usleep (radeon_output->PanelPwrDly * 1000); OUTREG(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); #endif }