Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: ning.a.zhang@intel.com
To: chris@chris-wilson.co.uk, jani.nikula@linux.intel.com,
	joonas.lahtinen@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org, Zhang Ning <ning.a.zhang@intel.com>
Subject: [PATCH 1/1] initial panel_power_off_time should be 0
Date: Thu, 20 Sep 2018 16:49:05 +0800	[thread overview]
Message-ID: <20180920084905.27032-2-ning.a.zhang@intel.com> (raw)
In-Reply-To: <20180920084905.27032-1-ning.a.zhang@intel.com>

From: Zhang Ning <ning.a.zhang@intel.com>

power on an eDP panel requests eDP panal fully powered off.
need to wait t11_t12 after LCDVCC is off. usually t12 is 500ms.

code, intel_dp.c, func edp_panel_vdd_on, line 2010:

	if (!edp_have_panel_power(intel_dp))
		wait_panel_power_cycle(intel_dp);

translate to human readable:
        if panel is off; then wait.

the wait time is (t11_t12 - power_off_duration).

power_off_duration = (now_time - last_off_timestamp)

when (t10_t12 > power_off_duration), a wait is requested.
otherwise not needed.

for coldboot, panel is powered off, not powered on.
so last_off_timestamp for coldboot should be 0.

but in code, this value is set to i915 module initial timestamp,
by:

static void intel_dp_init_panel_power_timestamps(struct intel_dp
*intel_dp)
{
	intel_dp->panel_power_off_time = ktime_get_boottime();
	intel_dp->last_power_on = jiffies;
	intel_dp->last_backlight_off = jiffies;
}

this is not real last_off_timestamp, and make i915 driver wait unnecessarily.

to make i915 initial faster, set panel_power_off_time to (ktime_t){.tv64
= 0}

actully saves 200ms for coldboot.

Signed-off-by: Zhang Ning <ning.a.zhang@intel.com>
Reviewed-off-by: Zhang, Baoli <baoli.zhang@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 1193202766a2..9b985768ead6 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5373,7 +5373,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
 
 static void intel_dp_init_panel_power_timestamps(struct intel_dp *intel_dp)
 {
-	intel_dp->panel_power_off_time = ktime_get_boottime();
+	intel_dp->panel_power_off_time = ktime_set(0, 0);
 	intel_dp->last_power_on = jiffies;
 	intel_dp->last_backlight_off = jiffies;
 }
-- 
2.18.0

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

  reply	other threads:[~2018-09-20  8:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-20  8:49 [PATCH 0/1] idea for optimize i915 initial time with eDP ning.a.zhang
2018-09-20  8:49 ` ning.a.zhang [this message]
2018-09-25  9:55   ` [PATCH 1/1] initial panel_power_off_time should be 0 Jani Nikula
2018-09-25 14:53     ` Ville Syrjälä
2018-09-26  2:03       ` Zhang, Ning A
2018-09-20  9:35 ` ✗ Fi.CI.CHECKPATCH: warning for idea for optimize i915 initial time with eDP Patchwork
2018-09-20 10:00 ` ✗ Fi.CI.BAT: failure " 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=20180920084905.27032-2-ning.a.zhang@intel.com \
    --to=ning.a.zhang@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    /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