On Mon, 24 Oct 2022, Lee Shawn C <shawn.c.lee@xxxxxxxxx> wrote: > A panel power off cycle delay always append before turn eDP on. > Driver should check last_power_on and last_backlight_off before > insert this delay. If these values are the same, it means eDP > was off until now and driver can bypass power off cycle delay > to save some times to speed up eDP power on sequence. > > v2: fix commit messages There are more changes here than what the changelog says, but the previous review comments were not answered [1]. BR, Jani. [1] https://lore.kernel.org/r/Y1afUdAwfVTACJoK@xxxxxxxxx > > Cc: Shankar Uma <uma.shankar@xxxxxxxxx> > Cc: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> > Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > Signed-off-by: Lee Shawn C <shawn.c.lee@xxxxxxxxx> > --- > drivers/gpu/drm/i915/display/intel_pps.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_pps.c b/drivers/gpu/drm/i915/display/intel_pps.c > index 21944f5bf3a8..290473ec70d5 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 > @@ -1100,7 +1107,7 @@ static void pps_init_timestamps(struct intel_dp *intel_dp) > { > 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_backlight_off = intel_dp->pps.last_power_on; > } > > static void -- Jani Nikula, Intel Open Source Graphics Center