drm/i915: edp resume/On time optimization.
Subsystems (2)
PATCH 1/1 drm/i915: edp resume/On time optimization.
From: Abhay Kumar <[email protected]>
Make resume/on codepath not to wait for panel_power_cycle_delay(t11_t12) if this time is already spent in suspend/poweron time.
v2: Use CLOCK_BOOTTIME and remove jiffies for panel power cycle
delay calculation(Ville).
v3: Addressing Ville review comment.
--- drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++----- drivers/gpu/drm/i915/intel_drv.h | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +14 -5
@@ -1812,12 +1812,21 @@ static void wait_panel_off(struct intel_dp *intel_dp)static void wait_panel_power_cycle (struct intel_dp *intel_dp) { +static ktime_t panel_power_on_time; +s64 panel_power_off_duration; +DRM_DEBUG_KMS ("Wait for panel power cycle\n" ); +/* take the difference of currrent time and panel power off time +* and then make panel wait for t11_t12 if needed. */ + panel_power_on_time =ktime_get_boottime (); + panel_power_off_duration =ktime_ms_delta (panel_power_on_time, intel_dp->panel_power_off_time); +/* When we disable the VDD override bit last we have to do the manual * wait. */ -wait_remaining_ms_from_jiffies (intel_dp->last_power_cycle, - intel_dp->panel_power_cycle_delay); +if (panel_power_off_duration < ((s64 ) intel_dp->panel_power_cycle_delay)) +wait_remaining_ms_from_jiffies (jiffies, + (intel_dp->panel_power_cycle_delay - panel_power_off_duration));wait_panel_status (intel_dp,IDLE_CYCLE_MASK ,IDLE_CYCLE_VALUE ); }
@@ -1969,7 +1978,7 @@ static void edp_panel_vdd_off_sync(struct intel_dp *intel_dp) I915_READ(pp_stat_reg), I915_READ(pp_ctrl_reg));if ((pp &POWER_TARGET_ON ) ==0 ) - intel_dp->last_power_cycle = jiffies; + intel_dp->panel_power_off_time =ktime_get_boottime (); power_domain =intel_display_port_aux_power_domain (intel_encoder);intel_display_power_put (dev_priv, power_domain);
@@ -2118,7 +2127,7 @@ static void edp_panel_off(struct intel_dp *intel_dp)I915_WRITE (pp_ctrl_reg, pp);POSTING_READ (pp_ctrl_reg); - intel_dp->last_power_cycle = jiffies; + intel_dp->panel_power_off_time =ktime_get_boottime ();wait_panel_off (intel_dp);/* We got a reference when we enabled the VDD. */
@@ -5122,7 +5131,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->last_power_cycle = jiffies; + intel_dp->panel_power_off_time =ktime_get_boottime (); intel_dp->last_power_on = jiffies; intel_dp->last_backlight_off = jiffies; }
drivers/gpu/drm/i915/intel_drv.h +1 -1
@@ -793,9 +793,9 @@ struct intel_dp {int backlight_off_delay;struct delayed_work panel_vdd_work;bool want_panel_vdd; -unsigned long last_power_cycle;unsigned long last_power_on;unsigned long last_backlight_off; +ktime_t panel_power_off_time;struct notifier_block edp_notifier;
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ warning: Fi.CI.BAT
== Summary ==
== Summary ==
Built on a90796840c30dac6d9907439bf98d1d08046c49d drm-intel-nightly: 2016y-01m-11d-17h-22m-54s UTC integration manifest
Test kms_pipe_crc_basic:
Subgroup read-crc-pipe-b-frame-sequence:
pass -> DMESG-WARN (byt-nuc)
Test pm_rpm:
Subgroup basic-rte:
dmesg-warn -> PASS (byt-nuc) UNSTABLEbdw-nuci7 total:138 pass:129 dwarn:0 dfail:0 fail:0 skip:9 bdw-ultra total:138 pass:132 dwarn:0 dfail:0 fail:0 skip:6 bsw-nuc-2 total:141 pass:115 dwarn:2 dfail:0 fail:0 skip:24 byt-nuc total:141 pass:123 dwarn:3 dfail:0 fail:0 skip:15 hsw-brixbox total:141 pass:134 dwarn:0 dfail:0 fail:0 skip:7 hsw-gt2 total:141 pass:137 dwarn:0 dfail:0 fail:0 skip:4 ilk-hp8440p total:141 pass:101 dwarn:3 dfail:0 fail:0 skip:37 ivb-t430s total:135 pass:122 dwarn:3 dfail:4 fail:0 skip:6 skl-i5k-2 total:141 pass:132 dwarn:1 dfail:0 fail:0 skip:8 skl-i7k-2 total:141 pass:132 dwarn:1 dfail:0 fail:0 skip:8 snb-dellxps total:141 pass:122 dwarn:5 dfail:0 fail:0 skip:14 snb-x220t total:141 pass:122 dwarn:5 dfail:0 fail:1 skip:13
Results at /archive/results/CI_IGT_test/Patchwork_1141/
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · On Mon, Jan 11, 2016 at 02:55:37PM -0800, [email protected] wrote:
From: Abhay Kumar <[email protected]>
Make resume/on codepath not to wait for
panel_power_cycle_delay(t11_t12)if this time is already spent in suspend/poweron time.v2: Use
CLOCK_BOOTTIMEand remove jiffies for panel power cycle
delay calculation(Ville).v3: Addressing Ville review comment.
That's not a very good changelog.
Quoted 21 lines
Cc Ville Syrjälä <[email protected]>Signed-off-by Abhay Kumar <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++----- drivers/gpu/drm/i915/intel_drv.h | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/intel_dp.c +3
-0@@ -1812,12 +1812,21 @@ static void wait_panel_off(struct intel_dp *intel_dp)static void wait_panel_power_cycle (struct intel_dp *intel_dp) { +static ktime_t panel_power_on_time; +s64 panel_power_off_duration; +DRM_DEBUG_KMS ("Wait for panel power cycle\n" );
drivers/gpu/drm/i915/intel_dp.c static void wait_panel_off(struct intel_dp *intel_dp) · line 1827
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +6
-2+/* take the difference of currrent time and panel power off time +* and then make panel wait for t11_t12 if needed. */ + panel_power_on_time =ktime_get_boottime (); + panel_power_off_duration =ktime_ms_delta (panel_power_on_time, intel_dp->panel_power_off_time); +/* When we disable the VDD override bit last we have to do the manual * wait. */ -wait_remaining_ms_from_jiffies (intel_dp->last_power_cycle, - intel_dp->panel_power_cycle_delay); +if (panel_power_off_duration < ((s64 ) intel_dp->panel_power_cycle_delay))
Some usless parens here.
drivers/gpu/drm/i915/intel_dp.c static void wait_panel_off(struct intel_dp *intel_dp) · line 1829
Quoted 2 lines
drivers/gpu/drm/i915/intel_dp.c +2
-0+wait_remaining_ms_from_jiffies (jiffies, + (intel_dp->panel_power_cycle_delay - panel_power_off_duration));
ditto
Otherwise it looks like it should do what we want, so with the minor bikesheds sorted this is
Quoted 47 lines
drivers/gpu/drm/i915/intel_dp.c +3
-3wait_panel_status (intel_dp,IDLE_CYCLE_MASK ,IDLE_CYCLE_VALUE ); }@@ -1969,7 +1978,7 @@ static void edp_panel_vdd_off_sync(struct intel_dp *intel_dp) I915_READ(pp_stat_reg), I915_READ(pp_ctrl_reg));if ((pp &POWER_TARGET_ON ) ==0 ) - intel_dp->last_power_cycle = jiffies; + intel_dp->panel_power_off_time =ktime_get_boottime (); power_domain =intel_display_port_aux_power_domain (intel_encoder);intel_display_power_put (dev_priv, power_domain);@@ -2118,7 +2127,7 @@ static void edp_panel_off(struct intel_dp *intel_dp)I915_WRITE (pp_ctrl_reg, pp);POSTING_READ (pp_ctrl_reg); - intel_dp->last_power_cycle = jiffies; + intel_dp->panel_power_off_time =ktime_get_boottime ();wait_panel_off (intel_dp);/* We got a reference when we enabled the VDD. */ @@ -5122,7 +5131,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->last_power_cycle = jiffies; + intel_dp->panel_power_off_time =ktime_get_boottime (); intel_dp->last_power_on = jiffies; intel_dp->last_backlight_off = jiffies; }drivers/gpu/drm/i915/intel_drv.h +1
-1@@ -793,9 +793,9 @@ struct intel_dp {int backlight_off_delay;struct delayed_work panel_vdd_work;bool want_panel_vdd; -unsigned long last_power_cycle;unsigned long last_power_on;unsigned long last_backlight_off; +ktime_t panel_power_off_time;struct notifier_block edp_notifier;Signature · 1 line
1.9.1
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx