[PATCH] xf86-video-nv: enable backlight toggling for GeForce2 Go

Aaron Plattner aplattner at nvidia.com
Tue Sep 25 18:32:17 PDT 2007


Unfortunately, this is one of those things that's likely to work fine on
your laptop and break horribly on everbody else's.  It *might* be okay if
you restrict it to the subsystem vendor and card ID for your laptop.

-- Aaron

On Wed, Sep 26, 2007 at 02:20:27AM +0200, Giuseppe Bilotta wrote:
> GeForce2 Go was explicitly excluded from the NVBacklightEnable() code
> (purposedly, as the code used for the other chipsets on x86 has no
> effect.) This caused the backlight to remain active on laptops
> equipped with such a card, even when DPMS modes were active.
> 
> Fix the issue by introducing the proper registry writes to toggle the
> backlight for these cards.
> 
> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
> ---
>  src/nv_driver.c |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/src/nv_driver.c b/src/nv_driver.c
> index 5141570..ca8a18b 100644
> --- a/src/nv_driver.c
> +++ b/src/nv_driver.c
> @@ -2176,8 +2176,15 @@ static void NVBacklightEnable(NVPtr pNv,  Bool on)
>  #endif
>      
>      if(pNv->LVDS) {
> -       if(pNv->twoHeads && ((pNv->Chipset & 0x0ff0) != 0x0110)) {
> -           pNv->PMC[0x130C/4] = on ? 3 : 7; 
> +       if(pNv->twoHeads) {
> +           if((pNv->Chipset & 0x0ff0) != 0x0110) {
> +               pNv->PMC[0x130C/4] = on ? 3 : 7; 
> +           } else {
> +               CARD32 tmp_pcrt;
> +               tmp_pcrt = pNv->PCRTC0[0x081C/4] & 0xFFFFFFFC;
> +               if(on) tmp_pcrt |= 0x1;
> +               pNv->PCRTC0[0x081C/4] = tmp_pcrt;
> +           }
>         }
>      } else {
>         CARD32 fpcontrol;
> -- 
> 1.5.3.2



More information about the xorg mailing list