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.
--- drivers/gpu/drm/i915/intel_ddi.c | 3 +++ drivers/gpu/drm/i915/intel_dp.c | 22 ++++++++++++++-------- drivers/gpu/drm/i915/intel_drv.h | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +3 -0
@@ -2347,6 +2347,9 @@ static void intel_ddi_post_disable(struct intel_encoder *intel_encoder)intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF );intel_edp_panel_vdd_on (intel_dp);intel_edp_panel_off (intel_dp); + +/* storing panel power off time */ + intel_dp->panel_power_off_time =ktime_get_with_offset (TK_OFFS_BOOT ); }if (IS_SKYLAKE (dev))
drivers/gpu/drm/i915/intel_dp.c +14 -8
@@ -38,7 +38,6 @@#include "intel_drv.h" #include <drm/i915_drm.h> #include "i915_drv.h" -#define DP_LINK_CHECK_TIMEOUT (10 * 1000)/* Compliance test status bits */
@@ -1654,13 +1653,22 @@ static void wait_panel_off(struct intel_dp *intel_dp)static void wait_panel_power_cycle (struct intel_dp *intel_dp) { +ktime_t panel_power_on_time; +u32 panel_power_off_duration; +DRM_DEBUG_KMS ("Wait for panel power cycle\n" ); -/* 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); +/* take the diffrence of currrent time and panel power off time +and then make panel wait for t11_t12 if needed */ + panel_power_on_time =ktime_get_with_offset (TK_OFFS_BOOT ); + panel_power_off_duration = (panel_power_on_time.tv64 - intel_dp->panel_power_off_time.tv64); + panel_power_off_duration = panel_power_off_duration /1000000 ; +/* When we disable the VDD override bit last we have to do the manual +* wait */ +if (panel_power_off_duration < 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 ); }
@@ -1811,7 +1819,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_with_offset (TK_OFFS_BOOT ); power_domain =intel_display_port_power_domain (intel_encoder);intel_display_power_put (dev_priv, power_domain);
@@ -1960,7 +1968,6 @@ 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;wait_panel_off (intel_dp);/* We got a reference when we enabled the VDD. */
@@ -5196,7 +5203,6 @@ 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->last_power_on = jiffies; intel_dp->last_backlight_off = jiffies; }
drivers/gpu/drm/i915/intel_drv.h +1 -1
@@ -722,9 +722,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✗ failure: Fi.CI.BAT
== Summary ==
== Summary ==
HEAD is now at 7cdc548 drm-intel-nightly: 2015y-12m-18d-19h-26m-21s UTC integration manifest
Applying: drm/i915: edp resume/On time optimization.
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 drm/i915: edp resume/On time optimization.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Changed the implementation using boottime and removed jiffies. Please review and let us know if this is close.
-----Original Message-----
From: Kumar, Abhay
Sent: Friday, December 18, 2015 11:55 AM
To: [email protected]
Cc: Kumar, Abhay
Subject: [PATCH] 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.
--- drivers/gpu/drm/i915/intel_ddi.c | 3 +++ drivers/gpu/drm/i915/intel_dp.c | 22 ++++++++++++++-------- drivers/gpu/drm/i915/intel_drv.h | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +3 -0
@@ -2347,6 +2347,9 @@ static void intel_ddi_post_disable(struct intel_encoder *intel_encoder)intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF );intel_edp_panel_vdd_on (intel_dp);intel_edp_panel_off (intel_dp); + +/* storing panel power off time */ + intel_dp->panel_power_off_time =ktime_get_with_offset (TK_OFFS_BOOT ); }if (IS_SKYLAKE (dev))
drivers/gpu/drm/i915/intel_dp.c +15 -6
@@ -38,7 +38,6 @@#include "intel_drv.h" #include <drm/i915_drm.h> #include "i915_drv.h" -#define DP_LINK_CHECK_TIMEOUT (10 * 1000)/* Compliance test status bits */
@@ -1654,13 +1653,22 @@ static void wait_panel_off(struct intel_dp *intel_dp)static void wait_panel_power_cycle (struct intel_dp *intel_dp) { +ktime_t panel_power_on_time; +u32 panel_power_off_duration; +DRM_DEBUG_KMS ("Wait for panel power cycle\n" ); -/* 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); +/* take the diffrence of currrent time and panel power off time +and then make panel wait for t11_t12 if needed */ + panel_power_on_time =ktime_get_with_offset (TK_OFFS_BOOT ); + panel_power_off_duration = (panel_power_on_time.tv64 - intel_dp->panel_power_off_time.tv64); + panel_power_off_duration = panel_power_off_duration /1000000 ; +/* When we disable the VDD override bit last we have to do the manual +* wait */ +if (panel_power_off_duration < 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 ); }
@@ -1811,7 +1819,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_with_offset (TK_OFFS_BOOT ); power_domain =intel_display_port_power_domain (intel_encoder); intel_display_power_put(dev_priv, power_domain); @@ -1960,7 +1968,6 @@ 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;
wait_panel_off(intel_dp);
/* We got a reference when we enabled the VDD. */ @@ -5196,7 +5203,6 @@ 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->last_power_cycle = jiffies;
intel_dp->last_power_on = jiffies;
intel_dp->last_backlight_off = jiffies; } diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index d44f2f5..ef82e8f 100644
drivers/gpu/drm/i915/intel_drv.h +1 -1
@@ -722,9 +722,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;
--
1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 1 line · Abhay
Changed the implementation using boottime and removed jiffies. Please review and let us know if this is close.
Comments like these should be part of the patch submission itself, including a note about which reviewer made the suggestion and adding everyone who commented to the cc list. So something like this at the bottom:
v2:
- Change .... (Ville).
- Use boootime instead of jiffies (Ville).
Cc: Ville .... (full mail address here).
Singed-off-by: ...
Without either the in-patch changelog or the cc it's much harder for reviewers to follow along, especially when they're commenting on 10+ patch series at the same time.
Please resubmit with that added.
Thanks, Daniel
Quoted 111 lines
-----Original Message-----
From: Kumar, Abhay
Sent: Friday, December 18, 2015 11:55 AM
To: [email protected]
Cc: Kumar, Abhay
Subject: [PATCH] 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.Change-Id Ied0f10f82776af8e6e8ff561bb4e5c0ce1dad4b3Signed-off-by Abhay Kumar <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 3 +++ drivers/gpu/drm/i915/intel_dp.c | 22 ++++++++++++++-------- drivers/gpu/drm/i915/intel_drv.h | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +3
-0@@ -2347,6 +2347,9 @@ static void intel_ddi_post_disable(struct intel_encoder *intel_encoder)intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF );intel_edp_panel_vdd_on (intel_dp);intel_edp_panel_off (intel_dp); + +/* storing panel power off time */ + intel_dp->panel_power_off_time =ktime_get_with_offset (TK_OFFS_BOOT ); }if (IS_SKYLAKE (dev))drivers/gpu/drm/i915/intel_dp.c +15
-6@@ -38,7 +38,6 @@#include "intel_drv.h" #include <drm/i915_drm.h> #include "i915_drv.h" -#define DP_LINK_CHECK_TIMEOUT (10 * 1000)/* Compliance test status bits */ @@ -1654,13 +1653,22 @@ static void wait_panel_off(struct intel_dp *intel_dp)static void wait_panel_power_cycle (struct intel_dp *intel_dp) { +ktime_t panel_power_on_time; +u32 panel_power_off_duration; +DRM_DEBUG_KMS ("Wait for panel power cycle\n" ); -/* 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); +/* take the diffrence of currrent time and panel power off time +and then make panel wait for t11_t12 if needed */ + panel_power_on_time =ktime_get_with_offset (TK_OFFS_BOOT ); + panel_power_off_duration = (panel_power_on_time.tv64 - intel_dp->panel_power_off_time.tv64); + panel_power_off_duration = panel_power_off_duration /1000000 ; +/* When we disable the VDD override bit last we have to do the manual +* wait */ +if (panel_power_off_duration < 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 ); }@@ -1811,7 +1819,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_with_offset (TK_OFFS_BOOT ); power_domain =intel_display_port_power_domain (intel_encoder); intel_display_power_put(dev_priv, power_domain); @@ -1960,7 +1968,6 @@ static void edp_panel_off(struct intel_dp *intel_dp)drivers/gpu/drm/i915/intel_dp.c +0
-2I915_WRITE (pp_ctrl_reg, pp);POSTING_READ (pp_ctrl_reg); - intel_dp->last_power_cycle = jiffies;wait_panel_off (intel_dp); /* We got a reference when we enabled the VDD. */ @@ -5196,7 +5203,6 @@ 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->last_power_on = jiffies; intel_dp->last_backlight_off = jiffies; } diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.hindex d44f2f5..ef82e8f 100644
drivers/gpu/drm/i915/intel_drv.h +1
-2@@ -722,9 +722,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; --1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Thanks Daniel. Will push today with proper comment.
-----Original Message-----
From: Daniel Vetter [mailto:[email protected]] On Behalf Of Daniel Vetter
Sent: Monday, December 21, 2015 7:58 AM
To: Kumar, Abhay
Cc: [email protected]; Syrjala, Ville; Paulo Zanoni
Subject: Re: [Intel-gfx] [PATCH] drm/i915: edp resume/On time optimization.
Quoted 1 line · Abhay
Changed the implementation using boottime and removed jiffies. Please review and let us know if this is close.
Comments like these should be part of the patch submission itself, including a note about which reviewer made the suggestion and adding everyone who commented to the cc list. So something like this at the bottom:
v2:
- Change .... (Ville).
- Use boootime instead of jiffies (Ville).
Cc: Ville .... (full mail address here).
Singed-off-by: ...
Without either the in-patch changelog or the cc it's much harder for reviewers to follow along, especially when they're commenting on 10+ patch series at the same time.
Please resubmit with that added.
Thanks, Daniel
Quoted 117 lines
-----Original Message-----
From: Kumar, Abhay
Sent: Friday, December 18, 2015 11:55 AM
To: [email protected]
Cc: Kumar, Abhay
Subject: [PATCH] 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.Change-Id Ied0f10f82776af8e6e8ff561bb4e5c0ce1dad4b3Signed-off-by Abhay Kumar <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 3 +++ drivers/gpu/drm/i915/intel_dp.c | 22 ++++++++++++++-------- drivers/gpu/drm/i915/intel_drv.h | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +4
-0@@ -2347,6 +2347,9 @@ static void intel_ddi_post_disable(struct intel_encoder *intel_encoder)intel_dp_sink_dpms (intel_dp,DRM_MODE_DPMS_OFF );intel_edp_panel_vdd_on (intel_dp);intel_edp_panel_off (intel_dp); + +/* storing panel power off time */ + intel_dp->panel_power_off_time = +ktime_get_with_offset (TK_OFFS_BOOT ); }if (IS_SKYLAKE (dev))(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_dp.cindex acda70e..845944d 100644drivers/gpu/drm/i915/intel_dp.c +16
-7@@ -38,7 +38,6 @@#include "intel_drv.h" #include <drm/i915_drm.h> #include "i915_drv.h" -#define DP_LINK_CHECK_TIMEOUT (10 * 1000)/* Compliance test status bits */ @@ -1654,13 +1653,22 @@ static void wait_panel_off(struct intel_dp *intel_dp)static void wait_panel_power_cycle (struct intel_dp *intel_dp) { +ktime_t panel_power_on_time; +u32 panel_power_off_duration; +DRM_DEBUG_KMS ("Wait for panel power cycle\n" ); -/* 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); +/* take the diffrence of currrent time and panel power off time +and then make panel wait for t11_t12 if needed */ + panel_power_on_time =ktime_get_with_offset (TK_OFFS_BOOT ); + panel_power_off_duration = (panel_power_on_time.tv64 - intel_dp->panel_power_off_time.tv64); + panel_power_off_duration = panel_power_off_duration /1000000 ; +/* When we disable the VDD override bit last we have to do the manual +* wait */ +if (panel_power_off_duration < 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 ); }@@ -1811,7 +1819,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_with_offset (TK_OFFS_BOOT ); power_domain =intel_display_port_power_domain (intel_encoder); intel_display_power_put(dev_priv, power_domain); @@ -1960,7 +1968,6 @@ 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;wait_panel_off (intel_dp); /* We got a reference when we enabled the VDD. */ @@ -5196,7 +5203,6@@ intel_dp_add_properties(struct
intel_dp*intel_dp, structdrm_connector*connectstatic void
intel_dp_init_panel_power_timestamps(struct intel_dp *intel_dp){drivers/gpu/drm/i915/intel_dp.c +0
-1- intel_dp->last_power_cycle = jiffies; intel_dp->last_power_on = jiffies; intel_dp->last_backlight_off = jiffies; } diff --git
a/drivers/gpu/drm/i915/intel_drv.hb/drivers/gpu/drm/i915/intel_drv.hindex d44f2f5..ef82e8f 100644drivers/gpu/drm/i915/intel_drv.h +1
-2@@ -722,9 +722,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; --1.9.1
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx