All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/pps: improve eDP power on flow.
@ 2022-10-24  6:40 Lee Shawn C
  2022-10-24  7:39 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Lee Shawn C @ 2022-10-24  6:40 UTC (permalink / raw)
  To: intel-gfx

Driver always apply panel power off cycle delay before eDP enable.
If eDP display was enabled at pre-os stage, driver would always
trigger modeset to optimize cdclk setting after boot into kernel.
So last_power_on and last_backlight_off value will be updated.

We can check last_power_on and last_backlight_off before insert
panel power cycle delay. If these values are the same, it means eDP
was off until now and driver should bypass this delay to save
some times to speed up eDP power on sequence.

Cc: Shankar Uma <uma.shankar@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
---
 drivers/gpu/drm/i915/display/intel_pps.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_pps.c b/drivers/gpu/drm/i915/display/intel_pps.c
index 21944f5bf3a8..f3485a4fbfd0 100644
--- a/drivers/gpu/drm/i915/display/intel_pps.c
+++ b/drivers/gpu/drm/i915/display/intel_pps.c
@@ -509,6 +509,13 @@ static void wait_panel_power_cycle(struct intel_dp *intel_dp)
 	ktime_t panel_power_on_time;
 	s64 panel_power_off_duration;
 
+	/* When last_power_on equal to last_backlight_off, it means driver did not
+	 * turn on or off eDP panel so far. So we can bypass power cycle delay to
+	 * save some times here.
+	 */
+	if (intel_dp->pps.last_power_on == intel_dp->pps.last_backlight_off)
+		return;
+
 	drm_dbg_kms(&i915->drm, "Wait for panel power cycle\n");
 
 	/* take the difference of current time and panel power off time
@@ -1098,9 +1105,11 @@ bool intel_pps_have_panel_power_or_vdd(struct intel_dp *intel_dp)
 
 static void pps_init_timestamps(struct intel_dp *intel_dp)
 {
+	unsigned long tmp_jiffies = jiffies;
+
 	intel_dp->pps.panel_power_off_time = ktime_get_boottime();
-	intel_dp->pps.last_power_on = jiffies;
-	intel_dp->pps.last_backlight_off = jiffies;
+	intel_dp->pps.last_power_on = tmp_jiffies;
+	intel_dp->pps.last_backlight_off = tmp_jiffies;
 }
 
 static void
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2022-11-16 15:57 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24  6:40 [Intel-gfx] [PATCH] drm/i915/pps: improve eDP power on flow Lee Shawn C
2022-10-24  7:39 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2022-10-24 13:16 ` [Intel-gfx] [PATCH] " Ville Syrjälä
2022-10-24 13:47   ` Lee, Shawn C
2022-10-24 14:21     ` Ville Syrjälä
2022-10-24 14:06 ` [Intel-gfx] [v2] " Lee Shawn C
2022-11-01  9:53   ` Jani Nikula
2022-11-01 10:50     ` Lee, Shawn C
2022-11-01 13:43       ` Jani Nikula
2022-11-01 14:40       ` Lee, Shawn C
2022-11-01 14:42         ` Lee, Shawn C
2022-11-02 10:19         ` Jani Nikula
2022-11-02 14:50           ` Lee, Shawn C
2022-10-24 17:33 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/pps: improve eDP power on flow. (rev2) Patchwork
2022-11-03  0:40 ` [Intel-gfx] [v3] drm/i915/pps: improve eDP power on flow Lee Shawn C
2022-11-03 11:00   ` Jani Nikula
2022-11-03 11:23     ` Lee, Shawn C
2022-11-03  1:32 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/pps: improve eDP power on flow. (rev3) Patchwork
2022-11-03 14:04 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-11-14  6:21 ` [Intel-gfx] [v4] drm/i915/pps: improve eDP power on flow Lee Shawn C
2022-11-16 15:44   ` Jani Nikula
2022-11-16 15:57     ` Lee, Shawn C
2022-11-14 11:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/pps: improve eDP power on flow. (rev4) Patchwork
2022-11-14 17:22 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

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.