Module Name: src Committed By: macallan Date: Tue Feb 15 04:06:44 UTC 2011
Modified Files: src/sys/dev/pci: r128fb.c Log Message: don't muck with the LVDS_BLON bit To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/r128fb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/r128fb.c diff -u src/sys/dev/pci/r128fb.c:1.20 src/sys/dev/pci/r128fb.c:1.21 --- src/sys/dev/pci/r128fb.c:1.20 Sat Jan 22 15:14:28 2011 +++ src/sys/dev/pci/r128fb.c Tue Feb 15 04:06:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: r128fb.c,v 1.20 2011/01/22 15:14:28 cegger Exp $ */ +/* $NetBSD: r128fb.c,v 1.21 2011/02/15 04:06:43 macallan Exp $ */ /* * Copyright (c) 2007 Michael Lorenz @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.20 2011/01/22 15:14:28 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.21 2011/02/15 04:06:43 macallan Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -962,8 +962,7 @@ level = 255 - level; reg = bus_space_read_4(sc->sc_memt, sc->sc_regh, R128_LVDS_GEN_CNTL); reg &= ~R128_LEVEL_MASK; - reg |= (level << R128_LEVEL_SHIFT) | - (level != 255 ? R128_LVDS_BLON : 0); + reg |= (level << R128_LEVEL_SHIFT); bus_space_write_4(sc->sc_memt, sc->sc_regh, R128_LVDS_GEN_CNTL, reg); DPRINTF("backlight level: %d reg %08x\n", level, reg); } @@ -979,10 +978,6 @@ sc->sc_bl_on = on; reg = bus_space_read_4(sc->sc_memt, sc->sc_regh, R128_LVDS_GEN_CNTL); reg &= ~R128_LEVEL_MASK; - if (on) { - reg |= R128_LVDS_BLON; - } else - reg &= ~R128_LVDS_BLON; level = on ? 255 - sc->sc_bl_level : 255; reg |= level << R128_LEVEL_SHIFT; bus_space_write_4(sc->sc_memt, sc->sc_regh, R128_LVDS_GEN_CNTL, reg);