lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 22 Jan 2012 10:46:54 +0000
From:	Chris Diamand <chris.diamand@...il.com>
To:	Keith Packard <keithp@...thp.com>
CC:	linux-kernel@...r.kernel.org, tiwai@...e.de,
	melchior.franz@...il.com
Subject: Re: i915/kms/backlight-combo mode problem


> Here's a patch which just flips the interpretation of that value over;
> does this work?
>
> diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
> index 04d79fd..43faa9d 100644
> --- a/drivers/gpu/drm/i915/intel_panel.c
> +++ b/drivers/gpu/drm/i915/intel_panel.c
> @@ -207,6 +207,7 @@ u32 intel_panel_get_backlight(struct drm_device *dev)
>                          u8 lbpc;
>
>                          pci_read_config_byte(dev->pdev, PCI_LBPC,&lbpc);
> +                       lbpc = 0xff - lbpc;
>                          val *= lbpc;
>                  }
>          }
> @@ -238,7 +239,7 @@ static void intel_panel_actually_set_backlight(struct drm_device *dev, u32 level
>
>                  lbpc = level * 0xfe / max + 1;
>                  level /= lbpc;
> -               pci_write_config_byte(dev->pdev, PCI_LBPC, lbpc);
> +               pci_write_config_byte(dev->pdev, PCI_LBPC, 0xff - lbpc);
>          }
>
>          tmp = I915_READ(BLC_PWM_CTL);
This works - the backlight stays on, and can be switched off with Fn-F6.
Interestingly the values for setpci -s are still *exactly the same*, as 
in 0x00 is fully on, 0xFF is off (with graduation in between), despite 
the values being reversed.

Chris.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ