<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 9, 2015 at 6:17 PM, Jani Nikula <span dir="ltr"><<a href="mailto:jani.nikula@linux.intel.com" target="_blank">jani.nikula@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On Mon, 09 Nov 2015, "Shih-Yuan Lee (FourDollars)" <<a href="mailto:sylee@canonical.com">sylee@canonical.com</a>> wrote:<br>
> The PWM brightness level of Dell XPS 13 (2015) is from 10 to 937 however<br>
> the sysfs brightness level always starts from 0 so it is better to use<br>
> 927 as the sysfs maximum brightness level and it becomes easier to map<br>
> from the PWM brightness level to the sysfs brightness level.<br>
<br>
We've been thinking we should provide a fixed range to userspace<br>
instead. Say, 0-100.<br>
<br>
BR,<br>
Jani.<br>
<br>
<br>
<br></blockquote>That might not be a good idea for the backward compatibility.<div>However I saw some message as the following.</div><div>[    3.402233] [drm:parse_lfp_backlight] VBT backlight PWM modulation frequency 200 Hz, active high, min brightness 10, level 255                                                                                                       </div><div>Does it mean the brightness <span style="font-size:12.8px">range</span> is also defined in the BIOS?</div><div><br></div><div>Regards,</div><div>$4 </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
><br>
> Signed-off-by: Shih-Yuan Lee (FourDollars) <<a href="mailto:sylee@canonical.com">sylee@canonical.com</a>><br>
> ---<br>
>  drivers/gpu/drm/i915/intel_panel.c | 2 +-<br>
>  1 file changed, 1 insertion(+), 1 deletion(-)<br>
><br>
> diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c<br>
> index a24df35..697fd4d 100644<br>
> --- a/drivers/gpu/drm/i915/intel_panel.c<br>
> +++ b/drivers/gpu/drm/i915/intel_panel.c<br>
> @@ -1211,7 +1211,7 @@ static int intel_backlight_device_register(struct intel_connector *connector)<br>
>        * Note: Everything should work even if the backlight device max<br>
>        * presented to the userspace is arbitrarily chosen.<br>
>        */<br>
> -     props.max_brightness = panel->backlight.max;<br>
> +     props.max_brightness = panel->backlight.max - panel->backlight.min;<br>
>       props.brightness = scale_hw_to_user(connector,<br>
>                                           panel->backlight.level,<br>
>                                           props.max_brightness);<br>
<span class=""><font color="#888888"><br>
--<br>
Jani Nikula, Intel Open Source Technology Center<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Shih-Yuan Lee (FourDollars) | Software Engineer | Commercial Engineering - PC & Core Taipei | Ubuntu Engineering and Services | Canonical</div>
</div></div>