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 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 | 18 ++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 2 ++ 3 files changed, 23 insertions(+)
drivers/gpu/drm/i915/intel_ddi.c +3 -0
@@ -2395,6 +2395,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 */ +do_gettimeofday (&intel_dp->panel_power_off_timestamp); }if (IS_SKYLAKE (dev) ||IS_KABYLAKE (dev))
drivers/gpu/drm/i915/intel_dp.c +18 -0
@@ -2032,6 +2032,9 @@ static void edp_panel_on(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv = dev->dev_private;u32 pp;i915_reg_t pp_ctrl_reg; +u32 panel_power_off_duration; +u32 temp_power_cycle_delay; +lockdep_assert_held (&dev_priv->pps_mutex);
@@ -2045,8 +2048,22 @@ static void edp_panel_on(struct intel_dp *intel_dp)"eDP port %c panel power already on\n" , port_name(dp_to_dig_port(intel_dp)->port))) return; +/* taking the diffrence of currrent time and panel power off time +and then make panel to wait for T12 if needed */ +do_gettimeofday (&intel_dp->panel_power_on_timestamp); + + panel_power_off_duration = (intel_dp->panel_power_on_timestamp.tv_sec-intel_dp->panel_power_off_timestamp.tv_sec) *1000000 + intel_dp->panel_power_on_timestamp.tv_usec-intel_dp->panel_power_off_timestamp.tv_usec; + panel_power_off_duration = panel_power_off_duration /1000 ; + temp_power_cycle_delay = intel_dp->panel_power_cycle_delay; + +if (panel_power_off_duration >= intel_dp->panel_power_cycle_delay) { + intel_dp->panel_power_cycle_delay =0 ; + }else { + intel_dp->panel_power_cycle_delay = intel_dp->panel_power_cycle_delay - panel_power_off_duration; + }wait_panel_power_cycle (intel_dp); + intel_dp->panel_power_cycle_delay = temp_power_cycle_delay; pp_ctrl_reg =_pp_ctrl_reg (intel_dp); pp =ironlake_get_pp_control (intel_dp);
@@ -5127,6 +5144,7 @@ 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; +do_gettimeofday (&intel_dp->panel_power_off_timestamp); } static void
drivers/gpu/drm/i915/intel_drv.h +2 -0
@@ -769,6 +769,8 @@ struct intel_dp {unsigned long last_power_cycle;unsigned long last_power_on;unsigned long last_backlight_off; +struct timeval panel_power_off_timestamp; +struct timeval panel_power_on_timestamp;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
Is this something close to what we wanted to optimize for edp resume time and using wall clock.
-----Original Message-----
From: Kumar, Abhay
Sent: Tuesday, December 15, 2015 2:17 PM
To: [email protected]
Cc: Kumar, Abhay
Subject: [PATCH] drm/i915: edp resume/On time optimization.
From: Abhay Kumar <[email protected]>
Make resume 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 | 18 ++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 2 ++ 3 files changed, 23 insertions(+)
drivers/gpu/drm/i915/intel_ddi.c +3 -0
@@ -2395,6 +2395,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 */ +do_gettimeofday (&intel_dp->panel_power_off_timestamp); } if (IS_SKYLAKE(dev) || IS_KABYLAKE(dev)) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 0f1eb96..1ca01b1 100644
drivers/gpu/drm/i915/intel_dp.c +18 -0
@@ -2032,6 +2032,9 @@ static void edp_panel_on(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv = dev->dev_private;u32 pp;i915_reg_t pp_ctrl_reg; +u32 panel_power_off_duration; +u32 temp_power_cycle_delay; +lockdep_assert_held (&dev_priv->pps_mutex);
@@ -2045,8 +2048,22 @@ static void edp_panel_on(struct intel_dp *intel_dp)"eDP port %c panel power already on\n" , port_name(dp_to_dig_port(intel_dp)->port))) return; +/* taking the diffrence of currrent time and panel power off time +and then make panel to wait for T12 if needed */ +do_gettimeofday (&intel_dp->panel_power_on_timestamp); + + panel_power_off_duration = (intel_dp->panel_power_on_timestamp.tv_sec-intel_dp->panel_power_off_timestamp.tv_sec) *1000000 + intel_dp->panel_power_on_timestamp.tv_usec-intel_dp->panel_power_off_timestamp.tv_usec; + panel_power_off_duration = panel_power_off_duration /1000 ; + temp_power_cycle_delay = intel_dp->panel_power_cycle_delay; + +if (panel_power_off_duration >= intel_dp->panel_power_cycle_delay) { + intel_dp->panel_power_cycle_delay =0 ; + }else { + intel_dp->panel_power_cycle_delay = intel_dp->panel_power_cycle_delay - panel_power_off_duration; + }wait_panel_power_cycle (intel_dp); + intel_dp->panel_power_cycle_delay = temp_power_cycle_delay; pp_ctrl_reg =_pp_ctrl_reg (intel_dp); pp =ironlake_get_pp_control (intel_dp);
@@ -5127,6 +5144,7 @@ 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; +do_gettimeofday (&intel_dp->panel_power_off_timestamp); } static void
drivers/gpu/drm/i915/intel_drv.h +2 -0
@@ -769,6 +769,8 @@ struct intel_dp {unsigned long last_power_cycle;unsigned long last_power_on;unsigned long last_backlight_off; +struct timeval panel_power_off_timestamp; +struct timeval panel_power_on_timestamp;struct notifier_block edp_notifier;
--
1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 17 lines · On 12/16/2015 03:46 AM, [email protected] wrote:
From: Abhay Kumar <[email protected]>
Make resume codepath not to wait for
panel_power_cycle_delay(t11_t12)if this time is already spent in suspend/poweron time.Signed-off-by Abhay Kumar <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 3 +++ drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 2 ++ 3 files changed, 23 insertions(+)drivers/gpu/drm/i915/intel_ddi.c +0
-0
drivers/gpu/drm/i915/intel_ddi.c static void intel_ddi_post_disable(struct intel_encoder *intel_encoder) · line 2400
Quoted 6 lines
drivers/gpu/drm/i915/intel_ddi.c +3
-0@@ -2395,6 +2395,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 */ +do_gettimeofday (&intel_dp->panel_power_off_timestamp);
Store this in edp_panel_off where "last_power_cycle" is initialized. This would be generic optimization and not specific only to ddi.
Quoted 25 lines
drivers/gpu/drm/i915/intel_ddi.c +0
-0}if (IS_SKYLAKE (dev) ||IS_KABYLAKE (dev))drivers/gpu/drm/i915/intel_dp.c +7
-0@@ -2032,6 +2032,9 @@ static void edp_panel_on(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv = dev->dev_private;u32 pp;i915_reg_t pp_ctrl_reg; +u32 panel_power_off_duration; +u32 temp_power_cycle_delay; +lockdep_assert_held (&dev_priv->pps_mutex);@@ -2045,8 +2048,22 @@ static void edp_panel_on(struct intel_dp *intel_dp)"eDP port %c panel power already on\n" , port_name(dp_to_dig_port(intel_dp)->port))) return; +/* taking the diffrence of currrent time and panel power off time +and then make panel to wait for T12 if needed */ +do_gettimeofday (&intel_dp->panel_power_on_timestamp); +
drivers/gpu/drm/i915/intel_dp.c static void edp_panel_on(struct intel_dp *intel_dp) · line 2064
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +9
-0+ panel_power_off_duration = (intel_dp->panel_power_on_timestamp.tv_sec-intel_dp->panel_power_off_timestamp.tv_sec) *1000000 + intel_dp->panel_power_on_timestamp.tv_usec-intel_dp->panel_power_off_timestamp.tv_usec; + panel_power_off_duration = panel_power_off_duration /1000 ; + temp_power_cycle_delay = intel_dp->panel_power_cycle_delay; + +if (panel_power_off_duration >= intel_dp->panel_power_cycle_delay) { + intel_dp->panel_power_cycle_delay =0 ; + }else { + intel_dp->panel_power_cycle_delay = intel_dp->panel_power_cycle_delay - panel_power_off_duration; + }
Moving all adjustment inside wait_panel_power_cycle looks better to me. Also checkout timeval_to_jiffies to simplify the code.
Quoted 18 lines
drivers/gpu/drm/i915/intel_dp.c +2
-0wait_panel_power_cycle (intel_dp); + intel_dp->panel_power_cycle_delay = temp_power_cycle_delay; pp_ctrl_reg =_pp_ctrl_reg (intel_dp); pp =ironlake_get_pp_control (intel_dp);@@ -5127,6 +5144,7 @@ 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; +do_gettimeofday (&intel_dp->panel_power_off_timestamp); } static voiddrivers/gpu/drm/i915/intel_drv.h +0
-0
drivers/gpu/drm/i915/intel_drv.h struct intel_dp { · line 773
Quoted 5 lines
drivers/gpu/drm/i915/intel_drv.h +2
-0@@ -769,6 +769,8 @@ struct intel_dp {unsigned long last_power_cycle;unsigned long last_power_on;unsigned long last_backlight_off; +struct timeval panel_power_off_timestamp; +struct timeval panel_power_on_timestamp;
panel_power_on_timestamp is not needed to be stored in the structure. What we need is current time which can be locally obtained and consumed in wait_panel_power_cycle
Regards
Shobhit
drivers/gpu/drm/i915/intel_drv.h struct intel_dp {
Quoted 4 lines
drivers/gpu/drm/i915/intel_drv.h +0
-0struct notifier_block edp_notifier;
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 17 lines · On Tue, Dec 15, 2015 at 02:16:38PM -0800, [email protected] wrote:
From: Abhay Kumar <[email protected]>
Make resume codepath not to wait for
panel_power_cycle_delay(t11_t12)if this time is already spent in suspend/poweron time.Signed-off-by Abhay Kumar <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 3 +++ drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 2 ++ 3 files changed, 23 insertions(+)drivers/gpu/drm/i915/intel_ddi.c +0
-0
drivers/gpu/drm/i915/intel_ddi.c static void intel_ddi_post_disable(struct intel_encoder *intel_encoder) · line 2400
Quoted 6 lines
drivers/gpu/drm/i915/intel_ddi.c +3
-0@@ -2395,6 +2395,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 */ +do_gettimeofday (&intel_dp->panel_power_off_timestamp);
I think what we want to use is CLOCK_BOOTTIME. It's like MONOTONIC, except it counts the suspend time too.
Initially I figured we'd use REALTIME, and only do the adjustment around suspend/resume. But actually BOOTTIME should be perfectly safe to use all the time (changing the system time doesn't affect it). So maybe we just want to convert the power cycle delay handling entirely over to using the BOOTTIME clock instead of jiffies?
Quoted 68 lines
drivers/gpu/drm/i915/intel_ddi.c +0
-0}if (IS_SKYLAKE (dev) ||IS_KABYLAKE (dev))drivers/gpu/drm/i915/intel_dp.c +18
-0@@ -2032,6 +2032,9 @@ static void edp_panel_on(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv = dev->dev_private;u32 pp;i915_reg_t pp_ctrl_reg; +u32 panel_power_off_duration; +u32 temp_power_cycle_delay; +lockdep_assert_held (&dev_priv->pps_mutex);@@ -2045,8 +2048,22 @@ static void edp_panel_on(struct intel_dp *intel_dp)"eDP port %c panel power already on\n" , port_name(dp_to_dig_port(intel_dp)->port))) return; +/* taking the diffrence of currrent time and panel power off time +and then make panel to wait for T12 if needed */ +do_gettimeofday (&intel_dp->panel_power_on_timestamp); + + panel_power_off_duration = (intel_dp->panel_power_on_timestamp.tv_sec-intel_dp->panel_power_off_timestamp.tv_sec) *1000000 + intel_dp->panel_power_on_timestamp.tv_usec-intel_dp->panel_power_off_timestamp.tv_usec; + panel_power_off_duration = panel_power_off_duration /1000 ; + temp_power_cycle_delay = intel_dp->panel_power_cycle_delay; + +if (panel_power_off_duration >= intel_dp->panel_power_cycle_delay) { + intel_dp->panel_power_cycle_delay =0 ; + }else { + intel_dp->panel_power_cycle_delay = intel_dp->panel_power_cycle_delay - panel_power_off_duration; + }wait_panel_power_cycle (intel_dp); + intel_dp->panel_power_cycle_delay = temp_power_cycle_delay; pp_ctrl_reg =_pp_ctrl_reg (intel_dp); pp =ironlake_get_pp_control (intel_dp);@@ -5127,6 +5144,7 @@ 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; +do_gettimeofday (&intel_dp->panel_power_off_timestamp); } static voiddrivers/gpu/drm/i915/intel_drv.h +2
-0@@ -769,6 +769,8 @@ struct intel_dp {unsigned long last_power_cycle;unsigned long last_power_on;unsigned long last_backlight_off; +struct timeval panel_power_off_timestamp; +struct timeval panel_power_on_timestamp;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
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Sure. In next patch set will get rid of jiffies altogether and will use getboottime() instead of do_gettimeofday() for panel_power_cycle_delay.
Does this make sense?
-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Wednesday, December 16, 2015 2:56 AM
To: Kumar, Abhay
Cc: [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: edp resume/On time optimization.
Quoted 18 lines · On Tue, Dec 15, 2015 at 02:16:38PM -0800, [email protected] wrote:
From: Abhay Kumar <[email protected]>
Make resume codepath not to wait for
panel_power_cycle_delay(t11_t12)if this time is already spent in suspend/poweron time.Signed-off-by Abhay Kumar <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 3 +++ drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 2 ++ 3 files changed, 23 insertions(+)drivers/gpu/drm/i915/intel_ddi.c +0
-0
drivers/gpu/drm/i915/intel_ddi.c static void intel_ddi_post_disable(struct intel_encoder *intel_encoder) · line 2400
Quoted 6 lines
drivers/gpu/drm/i915/intel_ddi.c +3
-0@@ -2395,6 +2395,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 */ +do_gettimeofday (&intel_dp->panel_power_off_timestamp);
I think what we want to use is CLOCK_BOOTTIME. It's like MONOTONIC, except it counts the suspend time too.
Initially I figured we'd use REALTIME, and only do the adjustment around suspend/resume. But actually BOOTTIME should be perfectly safe to use all the time (changing the system time doesn't affect it). So maybe we just want to convert the power cycle delay handling entirely over to using the BOOTTIME clock instead of jiffies?
Quoted 65 lines
drivers/gpu/drm/i915/intel_ddi.c +0
-0} if (IS_SKYLAKE(dev) || IS_KABYLAKE(dev)) diff --git
a/drivers/gpu/drm/i915/intel_dp.cb/drivers/gpu/drm/i915/intel_dp.cindex 0f1eb96..1ca01b1 100644drivers/gpu/drm/i915/intel_dp.c +18
-0@@ -2032,6 +2032,9 @@ static void edp_panel_on(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv = dev->dev_private;u32 pp;i915_reg_t pp_ctrl_reg; +u32 panel_power_off_duration; +u32 temp_power_cycle_delay; +lockdep_assert_held (&dev_priv->pps_mutex);@@ -2045,8 +2048,22 @@ static void edp_panel_on(struct intel_dp *intel_dp)"eDP port %c panel power already on\n" , port_name(dp_to_dig_port(intel_dp)->port))) return; +/* taking the diffrence of currrent time and panel power off time +and then make panel to wait for T12 if needed */ +do_gettimeofday (&intel_dp->panel_power_on_timestamp); + + panel_power_off_duration = (intel_dp->panel_power_on_timestamp.tv_sec-intel_dp->panel_power_off_timestamp.tv_sec) *1000000 + intel_dp->panel_power_on_timestamp.tv_usec-intel_dp->panel_power_off_timestamp.tv_usec; + panel_power_off_duration = panel_power_off_duration /1000 ; + temp_power_cycle_delay = intel_dp->panel_power_cycle_delay; + +if (panel_power_off_duration >= intel_dp->panel_power_cycle_delay) { + intel_dp->panel_power_cycle_delay =0 ; + }else { + intel_dp->panel_power_cycle_delay = intel_dp->panel_power_cycle_delay - panel_power_off_duration; + }wait_panel_power_cycle (intel_dp); + intel_dp->panel_power_cycle_delay = temp_power_cycle_delay; pp_ctrl_reg =_pp_ctrl_reg (intel_dp); pp =ironlake_get_pp_control (intel_dp);@@ -5127,6 +5144,7 @@ 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; +do_gettimeofday (&intel_dp->panel_power_off_timestamp); } static voiddrivers/gpu/drm/i915/intel_drv.h +2
-1@@ -769,6 +769,8 @@ struct intel_dp {unsigned long last_power_cycle;unsigned long last_power_on;unsigned long last_backlight_off; +struct timeval panel_power_off_timestamp; +struct timeval panel_power_on_timestamp;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
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 3 lines · Abhay
Sure. In next patch set will get rid of jiffies altogether and will use
getboottime()instead ofdo_gettimeofday()forpanel_power_cycle_delay.Does this make sense?
I can't say for sure until I see a patch, but that's my current thinking yes.
Quoted 112 lines
-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Wednesday, December 16, 2015 2:56 AM
To: Kumar, Abhay
Cc: [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: edp resume/On time optimization.Quoted 18 lines · On Tue, Dec 15, 2015 at 02:16:38PM -0800, [email protected] wrote:
From: Abhay Kumar <[email protected]>
Make resume codepath not to wait for
panel_power_cycle_delay(t11_t12)if this time is already spent in suspend/poweron time.Signed-off-by Abhay Kumar <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 3 +++ drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 2 ++ 3 files changed, 23 insertions(+)drivers/gpu/drm/i915/intel_ddi.c +0
-0drivers/gpu/drm/i915/intel_ddi.c static void intel_ddi_post_disable(struct intel_encoder *intel_encoder) · line 2400
Quoted 6 lines
drivers/gpu/drm/i915/intel_ddi.c +3
-0@@ -2395,6 +2395,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 */ +do_gettimeofday (&intel_dp->panel_power_off_timestamp);I think what we want to use is
CLOCK_BOOTTIME. It's like MONOTONIC, except it counts the suspend time too.Initially I figured we'd use REALTIME, and only do the adjustment around suspend/resume. But actually BOOTTIME should be perfectly safe to use all the time (changing the system time doesn't affect it). So maybe we just want to convert the power cycle delay handling entirely over to using the BOOTTIME clock instead of jiffies?
Quoted 65 lines
drivers/gpu/drm/i915/intel_ddi.c +0
-0} if (IS_SKYLAKE(dev) || IS_KABYLAKE(dev)) diff --git
a/drivers/gpu/drm/i915/intel_dp.cb/drivers/gpu/drm/i915/intel_dp.cindex 0f1eb96..1ca01b1 100644drivers/gpu/drm/i915/intel_dp.c +18
-0@@ -2032,6 +2032,9 @@ static void edp_panel_on(struct intel_dp *intel_dp)struct drm_i915_private *dev_priv = dev->dev_private;u32 pp;i915_reg_t pp_ctrl_reg; +u32 panel_power_off_duration; +u32 temp_power_cycle_delay; +lockdep_assert_held (&dev_priv->pps_mutex);@@ -2045,8 +2048,22 @@ static void edp_panel_on(struct intel_dp *intel_dp)"eDP port %c panel power already on\n" , port_name(dp_to_dig_port(intel_dp)->port))) return; +/* taking the diffrence of currrent time and panel power off time +and then make panel to wait for T12 if needed */ +do_gettimeofday (&intel_dp->panel_power_on_timestamp); + + panel_power_off_duration = (intel_dp->panel_power_on_timestamp.tv_sec-intel_dp->panel_power_off_timestamp.tv_sec) *1000000 + intel_dp->panel_power_on_timestamp.tv_usec-intel_dp->panel_power_off_timestamp.tv_usec; + panel_power_off_duration = panel_power_off_duration /1000 ; + temp_power_cycle_delay = intel_dp->panel_power_cycle_delay; + +if (panel_power_off_duration >= intel_dp->panel_power_cycle_delay) { + intel_dp->panel_power_cycle_delay =0 ; + }else { + intel_dp->panel_power_cycle_delay = intel_dp->panel_power_cycle_delay - panel_power_off_duration; + }wait_panel_power_cycle (intel_dp); + intel_dp->panel_power_cycle_delay = temp_power_cycle_delay; pp_ctrl_reg =_pp_ctrl_reg (intel_dp); pp =ironlake_get_pp_control (intel_dp);@@ -5127,6 +5144,7 @@ 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; +do_gettimeofday (&intel_dp->panel_power_off_timestamp); } static voiddrivers/gpu/drm/i915/intel_drv.h +2
-1@@ -769,6 +769,8 @@ struct intel_dp {unsigned long last_power_cycle;unsigned long last_power_on;unsigned long last_backlight_off; +struct timeval panel_power_off_timestamp; +struct timeval panel_power_on_timestamp;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--
Ville Syrjälä
Intel OTC
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ failure: UK.CI.checkpatch.pl
In reply to [email protected]== Summary ==
== Summary ==
• Testing drm/i915: edp resume/On time optimization.
WARNING: Duplicate signature
#17:
WARNING: line over 100 characters
#60: FILE: drivers/gpu/drm/i915/intel_dp.c:2055:
+ panel_power_off_duration = (intel_dp->panel_power_on_timestamp.tv_sec-intel_dp->panel_power_off_timestamp.tv_sec) * 1000000 + intel_dp->panel_power_on_timestamp.tv_usec-intel_dp->panel_power_off_timestamp.tv_usec;
WARNING: space prohibited before semicolon
#61: FILE: drivers/gpu/drm/i915/intel_dp.c:2056:
+ panel_power_off_duration = panel_power_off_duration / 1000 ;
ERROR: space required before the open parenthesis '(' #64: FILE: drivers/gpu/drm/i915/intel_dp.c:2059:
+ if(panel_power_off_duration >= intel_dp->panel_power_cycle_delay) {
WARNING: braces {} are not necessary for any arm of this statement #64: FILE: drivers/gpu/drm/i915/intel_dp.c:2059:
+ if(panel_power_off_duration >= intel_dp->panel_power_cycle_delay) {
[...]
+ } else {
[...]
WARNING: line over 100 characters
#67: FILE: drivers/gpu/drm/i915/intel_dp.c:2062:
+ intel_dp->panel_power_cycle_delay = intel_dp->panel_power_cycle_delay - panel_power_off_duration;
Your patch has style problems, please review.
NOTE: Ignored message types: BLOCK_COMMENT_STYLE COMMIT_LOG_LONG_LINE COMPLEX_MACRO FILE_PATH_CHANGES GIT_COMMIT_ID SPLIT_STRING
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx