]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Skip .get_backlight() when backlight isn't enabled
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 7 Nov 2014 13:18:45 +0000 (15:18 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 14 Nov 2014 09:29:19 +0000 (10:29 +0100)
commit843d1343ec9dd5db375e20cce753117d092af15c
tree60b58af15ee2d193825f59262a2a367287191b94
parent4f3b1e33ef2f822a8475328a940f385837c2f334
drm/i915: Skip .get_backlight() when backlight isn't enabled

On VLV/CHV 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.
Currently we end up reading a bigus register due to passing
INVALID_PIPE to VLV_BLC_PWM_CTL().

Skip the entire .get_backlight() call if the backlight isn't enabled
according to backlight.enabled.

This problem can be reproduced simply by reading the backlight device
actual_brightness file while the display is off.

Cc: Jani Nikula <jani.nikula@intel.com>
Suggested-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_panel.c