All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mustamin B Mustaffa <mustamin.b.mustaffa@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Mustamin B Mustaffa <mustamin.b.mustaffa@intel.com>
Subject: [PATCH] [V3] drm/i915: Enable VBT based BL control for DP
Date: Tue, 27 Feb 2018 11:07:34 +0800	[thread overview]
Message-ID: <20180227030734.37901-1-mustamin.b.mustaffa@intel.com> (raw)
In-Reply-To: <20180227024702.5985-1-mustamin.b.mustaffa@intel.com>

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>
---
 drivers/gpu/drm/i915/intel_dp.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 475a19d76a49..20e3fcd2bf7e 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -655,18 +655,15 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp)
 {
 	struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp));
 
+	int backlight_controller = dev_priv->vbt.backlight.controller;
+
 	lockdep_assert_held(&dev_priv->pps_mutex);
 
 	/* We should never land here with regular DP ports */
 	WARN_ON(!intel_dp_is_edp(intel_dp));
 
-	/*
-	 * TODO: BXT has 2 PPS instances. The correct port->PPS instance
-	 * mapping needs to be retrieved from VBT, for now just hard-code to
-	 * use instance #0 always.
-	 */
 	if (!intel_dp->pps_reset)
-		return 0;
+		return backlight_controller;
 
 	intel_dp->pps_reset = false;
 
@@ -676,7 +673,7 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp)
 	 */
 	intel_dp_init_panel_power_sequencer_registers(intel_dp, false);
 
-	return 0;
+	return backlight_controller;
 }
 
 typedef bool (*vlv_pipe_check)(struct drm_i915_private *dev_priv,
-- 
2.16.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-02-27  3:06 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20  2:46 [PATCH] drm/i915: Enable VBT based BL control for DP (v3) Mustamin B Mustaffa
2018-02-20  5:54 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-02-20  6:09 ` ✓ Fi.CI.BAT: success " Patchwork
2018-02-20  6:18 ` [V3] drm/i915: Enable VBT based BL control for DP Mustamin B Mustaffa
2018-02-20  6:52   ` Mustamin B Mustaffa
2018-02-20  8:39     ` Chris Wilson
2018-02-20  8:44       ` Mustaffa, Mustamin B
2018-02-20  9:29         ` Chris Wilson
2018-02-20  9:43           ` Jani Nikula
2018-02-20 19:46             ` Rodrigo Vivi
2018-02-20  9:42     ` [V4] " Mustamin B Mustaffa
2018-02-20 14:26       ` Ville Syrjälä
2018-02-21  0:04         ` Mustaffa, Mustamin B
2018-02-21  0:22           ` Rodrigo Vivi
2018-02-21 13:19           ` Ville Syrjälä
2018-02-22  1:36             ` Mustaffa, Mustamin B
2018-02-21  6:43       ` [PATCH] " Mustamin B Mustaffa
2018-02-21  7:38         ` Jani Nikula
2018-02-27  2:47         ` [PATCH] [V3] " Mustamin B Mustaffa
2018-02-27  3:07           ` Mustamin B Mustaffa [this message]
2018-02-28  9:42             ` Jani Nikula
2018-02-28 10:40               ` Mustaffa, Mustamin B
2018-02-20  6:39 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Enable VBT based BL control for DP (v3) (rev2) Patchwork
2018-02-20  6:53 ` ✓ Fi.CI.IGT: success for drm/i915: Enable VBT based BL control for DP (v3) Patchwork
2018-02-20  6:55 ` ✓ Fi.CI.BAT: success for drm/i915: Enable VBT based BL control for DP (v3) (rev2) Patchwork
2018-02-20  7:31 ` ✓ Fi.CI.BAT: success for drm/i915: Enable VBT based BL control for DP (v3) (rev3) Patchwork
2018-02-20  8:35 ` ✓ Fi.CI.IGT: " Patchwork
2018-02-20 10:43 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Enable VBT based BL control for DP (v3) (rev4) Patchwork
2018-02-20 10:58 ` ✓ Fi.CI.BAT: success " Patchwork
2018-02-20 14:06 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-02-20 19:44 ` [PATCH] drm/i915: Enable VBT based BL control for DP (v3) Rodrigo Vivi
2018-02-21  7:14 ` ✓ Fi.CI.BAT: success for drm/i915: Enable VBT based BL control for DP (v3) (rev5) Patchwork
2018-02-21  8:56 ` ✓ Fi.CI.IGT: " Patchwork
2018-02-27  2:54 ` ✗ Fi.CI.BAT: failure for drm/i915: Enable VBT based BL control for DP (v3) (rev7) Patchwork
2018-02-27  3:37 ` ✓ Fi.CI.BAT: success for drm/i915: Enable VBT based BL control for DP (v3) (rev8) Patchwork
2018-02-27  4:22 ` ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180227030734.37901-1-mustamin.b.mustaffa@intel.com \
    --to=mustamin.b.mustaffa@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.