Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Apr 2014 23:57:20 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r264207 - head/sys/powerpc/powermac
Message-ID:  <201404062357.s36NvKaE015942@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Sun Apr  6 23:57:19 2014
New Revision: 264207
URL: http://svnweb.freebsd.org/changeset/base/264207

Log:
  Clear the backlight level when it's turned off.  Also, reduce the delay times to
  less conservative values, also found in the radeonkms driver.
  
  MFC after:	2 weeks
  X-MFC-with:	r264205

Modified:
  head/sys/powerpc/powermac/atibl.c

Modified: head/sys/powerpc/powermac/atibl.c
==============================================================================
--- head/sys/powerpc/powermac/atibl.c	Sun Apr  6 23:22:42 2014	(r264206)
+++ head/sys/powerpc/powermac/atibl.c	Sun Apr  6 23:57:19 2014	(r264207)
@@ -235,21 +235,21 @@ atibl_setlevel(struct atibl_softc *sc, i
 		lvds_gen_cntl |= (newlevel << RADEON_LVDS_BL_MOD_LEVEL_SHIFT) &
 		    RADEON_LVDS_BL_MOD_LEVEL_MASK;
 		lvds_gen_cntl |= RADEON_LVDS_BL_MOD_EN;
-		DELAY(2000000);
+		DELAY(200000);
 		bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl);
 	} else {
 		pixclks_cntl = atibl_pll_rreg(sc, RADEON_PIXCLKS_CNTL);
 		atibl_pll_wreg(sc, RADEON_PIXCLKS_CNTL,
 		    pixclks_cntl & ~RADEON_PIXCLK_LVDS_ALWAYS_ONb);
 		lvds_gen_cntl |= RADEON_LVDS_DISPLAY_DIS;
-		lvds_gen_cntl &= ~RADEON_LVDS_BL_MOD_EN;
+		lvds_gen_cntl &= ~(RADEON_LVDS_BL_MOD_EN | RADEON_LVDS_BL_MOD_LEVEL_MASK);
 		bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl);
 		lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_EN);
-		DELAY(2000000);
+		DELAY(200000);
 		bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl);
 
 		atibl_pll_wreg(sc, RADEON_PIXCLKS_CNTL, pixclks_cntl);
-		DELAY(2000000);
+		DELAY(200000);
 	}
 
 	return (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404062357.s36NvKaE015942>