[Intel-gfx] [PATCH] drm/i915: Only apply the adaptive backlight modulation when it is enabled.
james.ausmus at intel.com
james.ausmus at intel.com
Fri Aug 16 02:30:26 CEST 2013
From: Stéphane Marchesin <marcheu at chromium.org>
Otherwise things go very, very dark.
BUG=chromium-os:33854
TEST=by hand
Change-Id: I3122447a255652ba5c98863664c0f60e1859c490
Reviewed-on: https://gerrit.chromium.org/gerrit/31293
Tested-by: Stéphane Marchesin <marcheu at chromium.org>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu at chromium.org>
[marcheu: fixups for 3.8]
Signed-off-by: Stéphane Marchesin <marcheu at chromium.org>
---
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 cebabb0..92678f6 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -289,6 +289,9 @@ static void intel_panel_actually_set_backlight(struct drm_device *dev, u32 level
struct drm_i915_private *dev_priv = dev->dev_private;
u32 tmp;
+ if (dev_priv->adaptive_backlight_enabled)
+ level = level * dev_priv->backlight_correction_level >> 8;
+
DRM_DEBUG_DRIVER("set backlight PWM = %d\n", level);
level = intel_panel_compute_brightness(dev, level);
--
1.8.3.2
More information about the Intel-gfx
mailing list