drm/i915: Add heuristic to determine better way to adjust brightness
authorPuthikorn Voravootivat <puthik@chromium.org>
Thu, 22 Jun 2017 19:03:38 +0000 (12:03 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 23 Jun 2017 10:24:49 +0000 (12:24 +0200)
commit560a758d39c616f83ac25ff6e0816a49ebe6401c
treee6e503ddc42793fb8d6c36c4ac964b44e4b7a582
parentc03e53b030025e9243b6e5cb717ad143f3a442ce
drm/i915: Add heuristic to determine better way to adjust brightness

Add heuristic to decide that AUX or PWM pin should use for
backlight brightness adjustment and modify i915 param description
to have auto, force disable, and force enable.

The heuristic to determine that using AUX pin is better than using
PWM pin is that the panel support any of the feature list here.
- Regional backlight brightness adjustment
- Backlight PWM frequency set
- More than 8 bits resolution of brightness level
- Backlight enablement via AUX and not by BL_ENABLE pin

Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170622190339.142671-3-puthik@chromium.org
drivers/gpu/drm/i915/i915_params.c
drivers/gpu/drm/i915/i915_params.h
drivers/gpu/drm/i915/intel_dp_aux_backlight.c