[Intel-gfx] [PATCH] drm/i915: Allow minimum brightness upon backlight enable

Chris Wilson chris at chris-wilson.co.uk
Fri Oct 2 02:00:57 PDT 2015


On Fri, Oct 02, 2015 at 10:50:50AM +0300, Jani Nikula wrote:
> On Fri, 02 Oct 2015, clinton.a.taylor at intel.com wrote:
> > From: Clint Taylor <clinton.a.taylor at intel.com>
> >
> > backlight minimum is a valid value so you don't need to set maximum.
> >
> > Signed-off-by: Clint Taylor <clinton.a.taylor at intel.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 4d28c7b..d509904 100644
> > --- a/drivers/gpu/drm/i915/intel_panel.c
> > +++ b/drivers/gpu/drm/i915/intel_panel.c
> > @@ -1069,7 +1069,7 @@ void intel_panel_enable_backlight(struct intel_connector *connector)
> >  
> >  	WARN_ON(panel->backlight.max == 0);
> >  
> > -	if (panel->backlight.level <= panel->backlight.min) {
> > +	if (panel->backlight.level < panel->backlight.min) {
> >  		panel->backlight.level = panel->backlight.max;
> >  		if (panel->backlight.device)
> >  			panel->backlight.device->props.brightness =
> 
> This is policy in action in the kernel. We have this whole if block here
> because some, uh, misguided userspace sets brightness to minimum before
> switching the backlight off, and assumes enabling backlight cranks up
> the brightness as well. (*)

If you mean X, no. It has to set the backlight because on some intel
models the backlight is not routed through i915 and so it needs to
explicitly control it. On resume, it sets the previous value. This is
just a broken kernel.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list