idea for optimize i915 initial time with eDP
Subsystems (2)
cover idea for optimize i915 initial time with eDP
From: Zhang Ning <[email protected]>
I find it on Broxton Gorden Peak, its BIOS doesn't have GOP driver. displays are powered on by Linux kernel (i915 driver). not BIOS.
For eDP panel, power on it requires to fully powered off, that means wait enough time.
when i915 tries to power on eDP panel, it set last_off_timestamp to driver init time, this assumes eDP is already powered on.
this is not right on no GOP system, eDP is never powered on.
Then set it to kernel time 0, I know this not right, in two way:
1, this is not *real* last_off_timestamp, can't set an negtive timestamp. 2, no check system with GOP or without GOP, or check whether eDP is powered on.
due to I don't have system with GOP and eDP, can't fully verify my idea.
Zhang Ning (1):
initial panel_power_off_time should be 0
drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 6 lines
2.18.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 initial panel_power_off_time should be 0
From: Zhang Ning <[email protected]>
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.
--- drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +1 -1
@@ -5373,7 +5373,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connectstatic 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; }
Signature · 6 lines
2.18.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [PATCH 1/1] initial panel_power_off_time should be 0
Quoted 36 lines · On Thu, 20 Sep 2018, [email protected] wrote:
From: Zhang Ning <[email protected]>
power on an eDP panel requests eDP panal fully powered off. need to wait
t11_t12after LCDVCC is off. usually t12 is 500ms.code,
intel_dp.c, funcedp_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_timestampfor 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.
Quoted 7 lines
to make i915 initial faster, set
panel_power_off_timeto (ktime_t){.tv64 = 0}actully saves 200ms for coldboot.
Signed-off-by Zhang Ning <[email protected]>Reviewed-off-by Zhang, Baoli <[email protected]>
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.
2) i915 module unload and reload. Also unlikely in an end user case, but potentially relevant for development and CI.
Otherwise, your patch does seem like a good idea. I'm not sure what, if anything, we should do about the above scenarios. The current approach does seem fairly conservative. It's a possibility "get boottime" was misunderstood for time of boot rather than time *since* boot.
I'll let Ville chime in as well.
BR,
Jani.
Quoted 17 lines
--- drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_dp.c +1
-1@@ -5373,7 +5373,7 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connectstatic 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; }
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/1] initial panel_power_off_time should be 0
Quoted 42 lines · Jani Nikula
Quoted 41 lines · On Thu, 20 Sep 2018, [email protected] wrote:
From: Zhang Ning <[email protected]>
power on an eDP panel requests eDP panal fully powered off. need to wait
t11_t12after LCDVCC is off. usually t12 is 500ms.code,
intel_dp.c, funcedp_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_timestampfor 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_timeto (ktime_t){.tv64 = 0}actully saves 200ms for coldboot.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Zhang Ning <[email protected]>Reviewed-off-by Zhang, Baoli <[email protected]>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.
Quoted 3 lines
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.
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/1] initial panel_power_off_time should be 0
Thank you very much for getting involved.
在 2018-09-25二的 17:53 +0300,Ville Syrjälä写道:
On Tue, Sep 25, 2018 at 12:55:04PM +0300, Jani Nikula wrote:
On Thu, 20 Sep 2018, [email protected]<mailto:[email protected]> wrote:
From: Zhang Ning <[email protected]<mailto:[email protected]>>
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.
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.
enable GOP is not possible for Golden peak, due the size of SPI NOR flash.
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.
I much care about i915 module first load, or built-in, if i915 unnecessarily wait on eDP panel, that means longer boot time.
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.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for idea for optimize i915 initial time with eDP
In reply to [email protected]== Series Details ==
== Series Details ==
Series: idea for optimize i915 initial time with eDP
URL : https://patchwork.freedesktop.org/series/49952/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 32ea43a57a0b initial panel_power_off_time should be 0 -:38: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #38: this is not real last_off_timestamp, and make i915 driver wait unnecessarily.
-:46: WARNING:BAD_SIGN_OFF: Non-standard signature: Reviewed-off-by:
#46:
total: 0 errors, 2 warnings, 0 checks, 8 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for idea for optimize i915 initial time with eDP
In reply to [email protected]== Series Details ==
== Series Details ==
Series: idea for optimize i915 initial time with eDP
URL : https://patchwork.freedesktop.org/series/49952/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_4848 -> Patchwork_10235 =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_10235 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_10235, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/49952/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10235:
=== IGT changes ===
==== Possible regressions ====
igt@drm_mm@insert:
{fi-skl-caroline}: NOTRUN -> INCOMPLETE
igt@drv_selftest@live_contexts:
fi-bsw-n3050: PASS -> DMESG-WARN== Known issues ==
Here are the changes found in Patchwork_10235 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_evict:
fi-bsw-kefka: PASS -> DMESG-WARN (fdo#107709)
igt@gem_exec_suspend@basic-s4-devices:
fi-blb-e6850: PASS -> INCOMPLETE (fdo#107718)
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: PASS -> DMESG-WARN (fdo#102614)
fi-byt-clapper: PASS -> FAIL (fdo#103167)
igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
fi-byt-clapper: PASS -> FAIL (fdo#107362, fdo#103191)
==== Possible fixes ====
igt@gem_exec_suspend@basic-s3:
{fi-skl-caroline}: INCOMPLETE (fdo#107556, fdo#104108) -> PASS {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
fdo#107709 https://bugs.freedesktop.org/show_bug.cgi?id=107709
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
== Participating hosts (53 -> 48) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4848 -> Patchwork_10235
CI_DRM_4848: 1c7ddc4315a85de031b58d1dfcfd4b144f942da5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4647: ae8187922d8de2bc739519da3bd40cf5f03f5e4f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10235: 32ea43a57a0bf9f24e75cbd43b3e4d62dabd0c99 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
32ea43a57a0b initial panel_power_off_time should be 0
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10235/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx