[Intel-gfx] [PATCH] drm/i915: A better maximum brightness for users.
Shih-Yuan Lee (FourDollars)
sylee at canonical.com
Mon Nov 9 02:30:37 PST 2015
On Mon, Nov 9, 2015 at 6:17 PM, Jani Nikula <jani.nikula at linux.intel.com>
wrote:
> On Mon, 09 Nov 2015, "Shih-Yuan Lee (FourDollars)" <sylee at canonical.com>
> wrote:
> > The PWM brightness level of Dell XPS 13 (2015) is from 10 to 937 however
> > the sysfs brightness level always starts from 0 so it is better to use
> > 927 as the sysfs maximum brightness level and it becomes easier to map
> > from the PWM brightness level to the sysfs brightness level.
>
> We've been thinking we should provide a fixed range to userspace
> instead. Say, 0-100.
>
> BR,
> Jani.
>
>
>
> That might not be a good idea for the backward compatibility.
However I saw some message as the following.
[ 3.402233] [drm:parse_lfp_backlight] VBT backlight PWM modulation
frequency 200 Hz, active high, min brightness 10, level 255
Does it mean the brightness range is also defined in the BIOS?
Regards,
$4
>
> >
> > Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee at canonical.com>
> > ---
> > drivers/gpu/drm/i915/intel_panel.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_panel.c
> b/drivers/gpu/drm/i915/intel_panel.c
> > index a24df35..697fd4d 100644
> > --- a/drivers/gpu/drm/i915/intel_panel.c
> > +++ b/drivers/gpu/drm/i915/intel_panel.c
> > @@ -1211,7 +1211,7 @@ static int intel_backlight_device_register(struct
> intel_connector *connector)
> > * Note: Everything should work even if the backlight device max
> > * presented to the userspace is arbitrarily chosen.
> > */
> > - props.max_brightness = panel->backlight.max;
> > + props.max_brightness = panel->backlight.max - panel->backlight.min;
> > props.brightness = scale_hw_to_user(connector,
> > panel->backlight.level,
> > props.max_brightness);
>
> --
> Jani Nikula, Intel Open Source Technology Center
>
--
Shih-Yuan Lee (FourDollars) | Software Engineer | Commercial Engineering -
PC & Core Taipei | Ubuntu Engineering and Services | Canonical
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20151109/5c7916ca/attachment-0001.html>
More information about the Intel-gfx
mailing list