[Intel-gfx] [PATCH 1/1] initial panel_power_off_time should be 0
Ville Syrjälä
ville.syrjala at linux.intel.com
Tue Sep 25 14:53:22 UTC 2018
On Tue, Sep 25, 2018 at 12:55:04PM +0300, Jani Nikula wrote:
> On Thu, 20 Sep 2018, ning.a.zhang at intel.com wrote:
> > From: Zhang Ning <ning.a.zhang at 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 at intel.com>
> > Reviewed-off-by: Zhang, Baoli <baoli.zhang at 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
More information about the Intel-gfx
mailing list