Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: Enable VBT based BL control for DP

Currently, BXT_PP is hardcoded with value '0'.
It practically disabled eDP backlight on MRB (BXT) platform.

This patch will tell which BXT_PP registers (there are two set of
PP_CONTROL in the spec) to be used as defined in VBT (Video Bios Timing
table) and this will enabled eDP backlight controller on MRB (BXT)
platform.

v2:
- Remove unnecessary information in commit message.
- Assign vbt.backlight.controller to a backlight_controller variable and
return the variable value.
v3:
- Rebased to latest code base.
- updated commit title.

Signed-off-by: Mustamin B Mustaffa <mustamin.b.mustaffa@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180227030734.37901-1-mustamin.b.mustaffa@intel.com
(cherry picked from commit 73c0fcac97bf7f4a6a61b825b205d1cf127cfca7)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

authored by

Mustamin B Mustaffa and committed by
Rodrigo Vivi
e8cd7143 0c8efd61

+3 -7
+3 -7
drivers/gpu/drm/i915/intel_dp.c
··· 620 620 bxt_power_sequencer_idx(struct intel_dp *intel_dp) 621 621 { 622 622 struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp)); 623 + int backlight_controller = dev_priv->vbt.backlight.controller; 623 624 624 625 lockdep_assert_held(&dev_priv->pps_mutex); 625 626 626 627 /* We should never land here with regular DP ports */ 627 628 WARN_ON(!intel_dp_is_edp(intel_dp)); 628 629 629 - /* 630 - * TODO: BXT has 2 PPS instances. The correct port->PPS instance 631 - * mapping needs to be retrieved from VBT, for now just hard-code to 632 - * use instance #0 always. 633 - */ 634 630 if (!intel_dp->pps_reset) 635 - return 0; 631 + return backlight_controller; 636 632 637 633 intel_dp->pps_reset = false; 638 634 ··· 638 642 */ 639 643 intel_dp_init_panel_power_sequencer_registers(intel_dp, false); 640 644 641 - return 0; 645 + return backlight_controller; 642 646 } 643 647 644 648 typedef bool (*vlv_pipe_check)(struct drm_i915_private *dev_priv,