On Fri, 07 Nov 2014, ville.syrj...@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrj...@linux.intel.com>
>
> When the display is off, we can't read out the current backlight level
> from the hardware since we have no pipe to do so. Catch the INVALID_PIPE
> in vlv_get_backlight() rather than pass it to VLV_BLC_PWM_CTL() which
> would obviously end accessing some bogus register.
>
> This problem can be reproduced simply by reading the backlight device
> actual_brightness file while the display is off.

I think we should check for panel->backlight.enabled in
intel_panel_get_backlight instead. I think it would be the right thing
to do independent of the issue you found, but I think it also fixes your
issue.

BR,
Jani.


>
> Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_panel.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_panel.c 
> b/drivers/gpu/drm/i915/intel_panel.c
> index ef646b1..847d00f9 100644
> --- a/drivers/gpu/drm/i915/intel_panel.c
> +++ b/drivers/gpu/drm/i915/intel_panel.c
> @@ -532,6 +532,9 @@ static u32 vlv_get_backlight(struct intel_connector 
> *connector)
>       struct drm_device *dev = connector->base.dev;
>       enum pipe pipe = intel_get_pipe_from_connector(connector);
>  
> +     if (pipe == INVALID_PIPE)
> +             return 0;
> +
>       return _vlv_get_backlight(dev, pipe);
>  }
>  
> -- 
> 2.0.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to