All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: ning.a.zhang@intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/1] initial panel_power_off_time should be 0
Date: Tue, 25 Sep 2018 17:53:22 +0300	[thread overview]
Message-ID: <20180925145322.GI9144@intel.com> (raw)
In-Reply-To: <87wor9vr47.fsf@intel.com>

On Tue, Sep 25, 2018 at 12:55:04PM +0300, Jani Nikula wrote:
> On Thu, 20 Sep 2018, ning.a.zhang@intel.com wrote:
> > 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>
> 
> I can think of two scenarios where the proposed change could lead to too
> short a wait:
> 
> 1) GOP enables *and* disables eDP. Seems very unlikely to me.

It sure likes enabling the vdd. But I guess it usually leaves it on even
if it decided to light up an external display instead. Not 100% sure
though.

> 
> 2) i915 module unload and reload. Also unlikely in an end user case, but
> potentially relevant for development and CI.

I think currently we may even just leave the panel on when unloading.

However...

3) S3. I don't think we wait for the power cycle delay when suspending
   so if resume happens fast enough we'll violate the power cycle delay.
   Seems more likely than the other cases.

Probably the best solution for all the self inflicted cases would be
to wait for the power cycle delay before
suspending/unloading/rebooting/whatever. We only do the reboot thing
in vlv/chv for some random reason. I tried to add a global reboot
notifier here: https://patchwork.freedesktop.org/patch/102739/
but I never managed to finish that work. IIRC it was suggested that
we'd probably want a full blown suspend on reboot anwyay.

For the GOP turned the vdd on and off again case we have no solution
other than to a) trust the GOP not to do that, b) keep doing the
pessimistic thing we do now.

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

  reply	other threads:[~2018-09-25 14:53 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 ` [PATCH 1/1] initial panel_power_off_time should be 0 ning.a.zhang
2018-09-25  9:55   ` Jani Nikula
2018-09-25 14:53     ` Ville Syrjälä [this message]
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=20180925145322.GI9144@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=ning.a.zhang@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 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.