Skip to content

Commit e8cd714

Browse files
mmustaffrodrigovivi
authored andcommitted
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 <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 73c0fca) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 0c8efd6 commit e8cd714

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

drivers/gpu/drm/i915/intel_dp.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -620,19 +620,15 @@ static int
620620
bxt_power_sequencer_idx(struct intel_dp *intel_dp)
621621
{
622622
struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp));
623+
int backlight_controller = dev_priv->vbt.backlight.controller;
623624

624625
lockdep_assert_held(&dev_priv->pps_mutex);
625626

626627
/* We should never land here with regular DP ports */
627628
WARN_ON(!intel_dp_is_edp(intel_dp));
628629

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-
*/
634630
if (!intel_dp->pps_reset)
635-
return 0;
631+
return backlight_controller;
636632

637633
intel_dp->pps_reset = false;
638634

@@ -642,7 +638,7 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp)
642638
*/
643639
intel_dp_init_panel_power_sequencer_registers(intel_dp, false);
644640

645-
return 0;
641+
return backlight_controller;
646642
}
647643

648644
typedef bool (*vlv_pipe_check)(struct drm_i915_private *dev_priv,

0 commit comments

Comments
 (0)