public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Shobhit Kumar <shobhit.kumar@intel.com>
To: Intel-gfx@lists.freedesktop.org
Cc: Shobhit Kumar <shobhit.kumar@intel.com>
Subject: [PATCH] drm/i915: Wait for PP cycle delay only if panel is in power off sequence
Date: Wed,  9 Dec 2015 18:51:48 +0530	[thread overview]
Message-ID: <1449667308-24296-1-git-send-email-shobhit.kumar@intel.com> (raw)
In-Reply-To: <56682130.7070300@linux.intel.com>

During resume, while turning the EDP panel power on, we need not wait
blindly for panel_power_cycle_delay. Check if panel power down sequence
in progress and then only wait. This improves our resume time significantly.

Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index f335c92..10ec669 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -617,6 +617,20 @@ static bool edp_have_panel_power(struct intel_dp *intel_dp)
 	return (I915_READ(_pp_stat_reg(intel_dp)) & PP_ON) != 0;
 }
 
+static bool edp_panel_off_seq(struct intel_dp *intel_dp)
+{
+	struct drm_device *dev = intel_dp_to_dev(intel_dp);
+	struct drm_i915_private *dev_priv = dev->dev_private;
+
+	lockdep_assert_held(&dev_priv->pps_mutex);
+
+	if (IS_VALLEYVIEW(dev) &&
+	    intel_dp->pps_pipe == INVALID_PIPE)
+		return false;
+
+	return (I915_READ(_pp_stat_reg(intel_dp)) & PP_SEQUENCE_POWER_DOWN) != 0;
+}
+
 static bool edp_have_panel_vdd(struct intel_dp *intel_dp)
 {
 	struct drm_device *dev = intel_dp_to_dev(intel_dp);
@@ -2025,7 +2039,8 @@ static void edp_panel_on(struct intel_dp *intel_dp)
 		 port_name(dp_to_dig_port(intel_dp)->port)))
 		return;
 
-	wait_panel_power_cycle(intel_dp);
+	if (edp_panel_off_seq(intel_dp))
+		wait_panel_power_cycle(intel_dp);
 
 	pp_ctrl_reg = _pp_ctrl_reg(intel_dp);
 	pp = ironlake_get_pp_control(intel_dp);
-- 
2.4.3

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

  reply	other threads:[~2015-12-09 13:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-07 20:28 [PATCH] drm/i915: Suspend resume timing optimization abhay.kumar
2015-12-07 20:52 ` Paulo Zanoni
2015-12-07 22:19   ` Kumar, Abhay
2015-12-09 10:55   ` Kumar, Shobhit
2015-12-09 12:12     ` Ville Syrjälä
2015-12-09 12:40       ` Kumar, Shobhit
2015-12-09 13:21         ` Shobhit Kumar [this message]
2015-12-09 13:29           ` [PATCH] drm/i915: Wait for PP cycle delay only if panel is in power off sequence Kumar, Shobhit
2015-12-09 13:57           ` Ville Syrjälä
2015-12-09 14:37             ` Shobhit Kumar
2015-12-09 15:04               ` Chris Wilson
2015-12-09 15:29                 ` Shobhit Kumar
2015-12-09 16:05                   ` Ville Syrjälä
2015-12-10  9:31                     ` Kumar, Shobhit
2015-12-10  9:50                       ` Daniel Vetter
2015-12-10 10:18                         ` Kumar, Shobhit
2015-12-10 10:58                         ` Thulasimani, Sivakumar
2015-12-10 13:15                       ` Ville Syrjälä
2015-12-10 13:38                         ` Ville Syrjälä
2015-12-10 14:39                           ` Thulasimani, Sivakumar
2015-12-10 15:02                             ` Ville Syrjälä
2015-12-11 11:25                               ` Thulasimani, Sivakumar
2015-12-11 11:41                                 ` Kumar, Shobhit
2015-12-11 17:00                                   ` Daniel Vetter
2015-12-14  3:59                                     ` Kumar, Shobhit
2015-12-11  6:34                         ` Kumar, Shobhit

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=1449667308-24296-1-git-send-email-shobhit.kumar@intel.com \
    --to=shobhit.kumar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox