[PATCH 1/1] initial panel_power_off_time should be 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Zhang Ning <ning.a.zhang@xxxxxxxxx>

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@xxxxxxxxx>
Reviewed-off-by: Zhang, Baoli <baoli.zhang@xxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux