Commit 8c7a7588 authored by Lee, Shawn C's avatar Lee, Shawn C Committed by Rodrigo Vivi

drm/i915/cnp: set min brightness from VBT

Min brightness value from vbt was missing for CNP platform.
This setting have to refer backlight ic spec to restrict
min backlight output. Without this restriction, driver would
allow to configure lower brightness value and violate
backlight ic requirement.

Fixes: 4c9f7086 ("drm/i915/cnp: Backlight support for CNP.")
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarShawn Lee <shawn.c.lee@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1505279961-16140-1-git-send-email-shawn.c.lee@intel.com
(cherry picked from commit f44e354f)
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent abeae421
...@@ -1737,6 +1737,8 @@ cnp_setup_backlight(struct intel_connector *connector, enum pipe unused) ...@@ -1737,6 +1737,8 @@ cnp_setup_backlight(struct intel_connector *connector, enum pipe unused)
if (!panel->backlight.max) if (!panel->backlight.max)
return -ENODEV; return -ENODEV;
panel->backlight.min = get_backlight_min_vbt(connector);
val = bxt_get_backlight(connector); val = bxt_get_backlight(connector);
val = intel_panel_compute_brightness(connector, val); val = intel_panel_compute_brightness(connector, val);
panel->backlight.level = clamp(val, panel->backlight.min, panel->backlight.level = clamp(val, panel->backlight.min,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment