drm/i915: Eliminate lots of WARNs when there's no backlight present
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 16 Jan 2014 16:27:15 +0000 (18:27 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 22 Jan 2014 09:34:38 +0000 (10:34 +0100)
commitdc5a43636c2fd50c694f16d042e0639fff5044fd
treee655f321705a9a84680268557264430feb1fc441
parentbfbdb420f51457935784759ae5ef36b2257666a1
drm/i915: Eliminate lots of WARNs when there's no backlight present

My 855gm doesn't register the intel backlight but it still ends up
calling the backlight code to enable/disable the backlight via the
LVDS code. This leads to some WARNs due to backlight.max being 0.

Let's have intel_panel_enable_backlight() and intel_panel_disable_backlight()
check whether there's a backlight present or not.

Also move the backlight.present check from asle_set_backlight() into
intel_panel_set_backlight() for some extra symmetry.

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_opregion.c
drivers/gpu/drm/i915/intel_panel.c