* Re: [PATCH v4] drm/i915: edp resume/On time optimization.
2016-01-13 1:57 [PATCH v4] drm/i915: edp resume/On time optimization abhay.kumar
@ 2016-01-13 8:02 ` Kumar, Shobhit
2016-01-13 10:20 ` ✗ warning: Fi.CI.BAT Patchwork
` (5 subsequent siblings)
6 siblings, 0 replies; 18+ messages in thread
From: Kumar, Shobhit @ 2016-01-13 8:02 UTC (permalink / raw)
To: abhay.kumar, Intel-gfx, ville.syrjala
On 01/13/2016 07:27 AM, abhay.kumar@intel.com wrote:
> From: Abhay Kumar <abhay.kumar@intel.com>
>
> 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: Addressed below comments
> 1. Tracking time from where last powercycle is initiated.
> 2. Used ktime_get_bootime() wrapper for boottime clock.
> 3. Used ktime_ms_delta() to get time difference.
>
> v4: Updated v3 change log in detail.
Quick tip, you can use --in-reply-to while sending to maintain context,
unless there is major rewrite of patches.
Regards
Shobhit
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++-----
> drivers/gpu/drm/i915/intel_drv.h | 2 +-
> 2 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 796e3d3..0042693 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -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 *connect
>
> static 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;
> }
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index bdfe403..06b37b8 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -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;
>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* ✗ warning: Fi.CI.BAT
2016-01-13 1:57 [PATCH v4] drm/i915: edp resume/On time optimization abhay.kumar
2016-01-13 8:02 ` Kumar, Shobhit
@ 2016-01-13 10:20 ` Patchwork
2016-01-14 23:53 ` [PATCH v4] drm/i915: edp resume/On time optimization Kumar, Abhay
` (4 subsequent siblings)
6 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2016-01-13 10:20 UTC (permalink / raw)
To: abhay.kumar; +Cc: intel-gfx
== Summary ==
Built on dd4a7926b4118f72b7ae0f7b97e9644172df472c drm-intel-nightly: 2016y-01m-13d-09h-05m-34s UTC integration manifest
Test gem_storedw_loop:
Subgroup basic-render:
pass -> DMESG-WARN (skl-i5k-2) UNSTABLE
pass -> DMESG-WARN (bdw-ultra)
Test kms_pipe_crc_basic:
Subgroup read-crc-pipe-a:
pass -> DMESG-WARN (byt-nuc)
bdw-nuci7 total:138 pass:129 dwarn:0 dfail:0 fail:0 skip:9
bdw-ultra total:138 pass:131 dwarn:1 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:122 dwarn:4 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
hsw-xps12 total:138 pass:133 dwarn:1 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:131 dwarn:2 dfail:0 fail:0 skip:8
skl-i7k-2 total:141 pass:131 dwarn:2 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_1160/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v4] drm/i915: edp resume/On time optimization.
2016-01-13 1:57 [PATCH v4] drm/i915: edp resume/On time optimization abhay.kumar
2016-01-13 8:02 ` Kumar, Shobhit
2016-01-13 10:20 ` ✗ warning: Fi.CI.BAT Patchwork
@ 2016-01-14 23:53 ` Kumar, Abhay
2016-01-19 22:37 ` Kumar, Abhay
` (3 subsequent siblings)
6 siblings, 0 replies; 18+ messages in thread
From: Kumar, Abhay @ 2016-01-14 23:53 UTC (permalink / raw)
To: Intel-gfx, ville.syrjala
On 1/12/2016 5:57 PM, Kumar, Abhay wrote:
> From: Abhay Kumar <abhay.kumar@intel.com>
>
> 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: Addressed below comments
> 1. Tracking time from where last powercycle is initiated.
> 2. Used ktime_get_bootime() wrapper for boottime clock.
> 3. Used ktime_ms_delta() to get time difference.
>
> v4: Updated v3 change log in detail.
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++-----
> drivers/gpu/drm/i915/intel_drv.h | 2 +-
> 2 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 796e3d3..0042693 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -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 *connect
>
> static 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;
> }
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index bdfe403..06b37b8 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -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;
>
Hi Ville,
If we have everything addressed can we please get this pulled into
drm-nightly?
Regards,
Abhay Kumar
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v4] drm/i915: edp resume/On time optimization.
2016-01-13 1:57 [PATCH v4] drm/i915: edp resume/On time optimization abhay.kumar
` (2 preceding siblings ...)
2016-01-14 23:53 ` [PATCH v4] drm/i915: edp resume/On time optimization Kumar, Abhay
@ 2016-01-19 22:37 ` Kumar, Abhay
2016-01-20 9:00 ` Daniel Vetter
2016-01-23 1:39 ` [PATCH V5] " abhay.kumar
` (2 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Kumar, Abhay @ 2016-01-19 22:37 UTC (permalink / raw)
To: Intel-gfx, ville.syrjala, Daniel Vetter
[-- Attachment #1.1: Type: text/plain, Size: 3977 bytes --]
On 1/12/2016 5:57 PM, Kumar, Abhay wrote:
> From: Abhay Kumar <abhay.kumar@intel.com>
>
> 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: Addressed below comments
> 1. Tracking time from where last powercycle is initiated.
> 2. Used ktime_get_bootime() wrapper for boottime clock.
> 3. Used ktime_ms_delta() to get time difference.
>
> v4: Updated v3 change log in detail.
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++-----
> drivers/gpu/drm/i915/intel_drv.h | 2 +-
> 2 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 796e3d3..0042693 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -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 *connect
>
> static 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;
> }
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index bdfe403..06b37b8 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -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;
>
Since this is already reviewed. Can we please get this Queued for -next ?
Regards,
Abhay Kumar
[-- Attachment #1.2: Type: text/html, Size: 4999 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v4] drm/i915: edp resume/On time optimization.
2016-01-19 22:37 ` Kumar, Abhay
@ 2016-01-20 9:00 ` Daniel Vetter
2016-01-20 9:59 ` Kumar, Shobhit
0 siblings, 1 reply; 18+ messages in thread
From: Daniel Vetter @ 2016-01-20 9:00 UTC (permalink / raw)
To: Kumar, Abhay; +Cc: Intel-gfx
On Tue, Jan 19, 2016 at 02:37:55PM -0800, Kumar, Abhay wrote:
>
>
> On 1/12/2016 5:57 PM, Kumar, Abhay wrote:
> >From: Abhay Kumar <abhay.kumar@intel.com>
> >
> >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: Addressed below comments
> > 1. Tracking time from where last powercycle is initiated.
> > 2. Used ktime_get_bootime() wrapper for boottime clock.
> > 3. Used ktime_ms_delta() to get time difference.
> >
> >v4: Updated v3 change log in detail.
> >
> >Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
I can't see the r-b here nor anywhere else in this thread. That's why I
didn't pick it up. Where is it?
-Daniel
> >---
> > drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++-----
> > drivers/gpu/drm/i915/intel_drv.h | 2 +-
> > 2 files changed, 15 insertions(+), 6 deletions(-)
> >
> >diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> >index 796e3d3..0042693 100644
> >--- a/drivers/gpu/drm/i915/intel_dp.c
> >+++ b/drivers/gpu/drm/i915/intel_dp.c
> >@@ -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 *connect
> > static 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;
> > }
> >diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> >index bdfe403..06b37b8 100644
> >--- a/drivers/gpu/drm/i915/intel_drv.h
> >+++ b/drivers/gpu/drm/i915/intel_drv.h
> >@@ -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;
>
> Since this is already reviewed. Can we please get this Queued for -next ?
>
> Regards,
> Abhay Kumar
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v4] drm/i915: edp resume/On time optimization.
2016-01-20 9:00 ` Daniel Vetter
@ 2016-01-20 9:59 ` Kumar, Shobhit
2016-01-20 13:06 ` Ville Syrjälä
0 siblings, 1 reply; 18+ messages in thread
From: Kumar, Shobhit @ 2016-01-20 9:59 UTC (permalink / raw)
To: Daniel Vetter, Kumar, Abhay; +Cc: Intel-gfx
On 01/20/2016 02:30 PM, Daniel Vetter wrote:
> On Tue, Jan 19, 2016 at 02:37:55PM -0800, Kumar, Abhay wrote:
>>
>>
>> On 1/12/2016 5:57 PM, Kumar, Abhay wrote:
>>> From: Abhay Kumar <abhay.kumar@intel.com>
>>>
>>> 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: Addressed below comments
>>> 1. Tracking time from where last powercycle is initiated.
>>> 2. Used ktime_get_bootime() wrapper for boottime clock.
>>> 3. Used ktime_ms_delta() to get time difference.
>>>
>>> v4: Updated v3 change log in detail.
>>>
>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>> Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
>
> I can't see the r-b here nor anywhere else in this thread. That's why I
> didn't pick it up. Where is it?
I didn't see it either. Ville can you please have a look at the latest
changes.
Regards
Shobhit
> -Daniel
>
>>> ---
>>> drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++-----
>>> drivers/gpu/drm/i915/intel_drv.h | 2 +-
>>> 2 files changed, 15 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>>> index 796e3d3..0042693 100644
>>> --- a/drivers/gpu/drm/i915/intel_dp.c
>>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>>> @@ -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 *connect
>>> static 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;
>>> }
>>> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
>>> index bdfe403..06b37b8 100644
>>> --- a/drivers/gpu/drm/i915/intel_drv.h
>>> +++ b/drivers/gpu/drm/i915/intel_drv.h
>>> @@ -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;
>>
>> Since this is already reviewed. Can we please get this Queued for -next ?
>>
>> Regards,
>> Abhay Kumar
>>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v4] drm/i915: edp resume/On time optimization.
2016-01-20 9:59 ` Kumar, Shobhit
@ 2016-01-20 13:06 ` Ville Syrjälä
2016-01-21 12:17 ` Kumar, Abhay
0 siblings, 1 reply; 18+ messages in thread
From: Ville Syrjälä @ 2016-01-20 13:06 UTC (permalink / raw)
To: Kumar, Shobhit; +Cc: Intel-gfx
On Wed, Jan 20, 2016 at 03:29:00PM +0530, Kumar, Shobhit wrote:
> On 01/20/2016 02:30 PM, Daniel Vetter wrote:
> > On Tue, Jan 19, 2016 at 02:37:55PM -0800, Kumar, Abhay wrote:
> >>
> >>
> >> On 1/12/2016 5:57 PM, Kumar, Abhay wrote:
> >>> From: Abhay Kumar <abhay.kumar@intel.com>
> >>>
> >>> 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: Addressed below comments
> >>> 1. Tracking time from where last powercycle is initiated.
> >>> 2. Used ktime_get_bootime() wrapper for boottime clock.
> >>> 3. Used ktime_ms_delta() to get time difference.
> >>>
> >>> v4: Updated v3 change log in detail.
> >>>
> >>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >>> Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
> >
> > I can't see the r-b here nor anywhere else in this thread. That's why I
> > didn't pick it up. Where is it?
>
> I didn't see it either. Ville can you please have a look at the latest
> changes.
I don't think I'll bother since I'm pretty sure I already gave the r-b
during the last round. People really should learn to hang on to the r-bs
with some vigor.
>
> Regards
> Shobhit
>
> > -Daniel
> >
> >>> ---
> >>> drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++-----
> >>> drivers/gpu/drm/i915/intel_drv.h | 2 +-
> >>> 2 files changed, 15 insertions(+), 6 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> >>> index 796e3d3..0042693 100644
> >>> --- a/drivers/gpu/drm/i915/intel_dp.c
> >>> +++ b/drivers/gpu/drm/i915/intel_dp.c
> >>> @@ -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 *connect
> >>> static 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;
> >>> }
> >>> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> >>> index bdfe403..06b37b8 100644
> >>> --- a/drivers/gpu/drm/i915/intel_drv.h
> >>> +++ b/drivers/gpu/drm/i915/intel_drv.h
> >>> @@ -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;
> >>
> >> Since this is already reviewed. Can we please get this Queued for -next ?
> >>
> >> Regards,
> >> Abhay Kumar
> >>
> >
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v4] drm/i915: edp resume/On time optimization.
2016-01-20 13:06 ` Ville Syrjälä
@ 2016-01-21 12:17 ` Kumar, Abhay
2016-01-22 5:48 ` Kumar, Shobhit
0 siblings, 1 reply; 18+ messages in thread
From: Kumar, Abhay @ 2016-01-21 12:17 UTC (permalink / raw)
To: Ville Syrjälä, Kumar, Shobhit; +Cc: Intel-gfx
On 1/20/2016 5:06 AM, Ville Syrjälä wrote:
> On Wed, Jan 20, 2016 at 03:29:00PM +0530, Kumar, Shobhit wrote:
>> On 01/20/2016 02:30 PM, Daniel Vetter wrote:
>>> On Tue, Jan 19, 2016 at 02:37:55PM -0800, Kumar, Abhay wrote:
>>>>
>>>> On 1/12/2016 5:57 PM, Kumar, Abhay wrote:
>>>>> From: Abhay Kumar <abhay.kumar@intel.com>
>>>>>
>>>>> 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: Addressed below comments
>>>>> 1. Tracking time from where last powercycle is initiated.
>>>>> 2. Used ktime_get_bootime() wrapper for boottime clock.
>>>>> 3. Used ktime_ms_delta() to get time difference.
>>>>>
>>>>> v4: Updated v3 change log in detail.
>>>>>
>>>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>>> Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
>>> I can't see the r-b here nor anywhere else in this thread. That's why I
>>> didn't pick it up. Where is it?
V3 of this patch was r-b by Ville and had comment on the commit msg. I
updated commit msg and pushed V4.
So practically there is no code change and Ville r-b should hold good.
Sorry in case i missed to keep that r-b by Ville in V3 here.
>> I didn't see it either. Ville can you please have a look at the latest
>> changes.
> I don't think I'll bother since I'm pretty sure I already gave the r-b
> during the last round. People really should learn to hang on to the r-bs
> with some vigor.
>
>> Regards
>> Shobhit
>>
>>> -Daniel
>>>
>>>>> ---
>>>>> drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++-----
>>>>> drivers/gpu/drm/i915/intel_drv.h | 2 +-
>>>>> 2 files changed, 15 insertions(+), 6 deletions(-)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>>>>> index 796e3d3..0042693 100644
>>>>> --- a/drivers/gpu/drm/i915/intel_dp.c
>>>>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>>>>> @@ -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 *connect
>>>>> static 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;
>>>>> }
>>>>> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
>>>>> index bdfe403..06b37b8 100644
>>>>> --- a/drivers/gpu/drm/i915/intel_drv.h
>>>>> +++ b/drivers/gpu/drm/i915/intel_drv.h
>>>>> @@ -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;
>>>> Since this is already reviewed. Can we please get this Queued for -next ?
>>>>
>>>> Regards,
>>>> Abhay Kumar
>>>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v4] drm/i915: edp resume/On time optimization.
2016-01-21 12:17 ` Kumar, Abhay
@ 2016-01-22 5:48 ` Kumar, Shobhit
2016-01-31 7:20 ` Kumar, Abhay
0 siblings, 1 reply; 18+ messages in thread
From: Kumar, Shobhit @ 2016-01-22 5:48 UTC (permalink / raw)
To: Kumar, Abhay, Ville Syrjälä; +Cc: Intel-gfx
On 01/21/2016 05:47 PM, Kumar, Abhay wrote:
>
>
> On 1/20/2016 5:06 AM, Ville Syrjälä wrote:
>> On Wed, Jan 20, 2016 at 03:29:00PM +0530, Kumar, Shobhit wrote:
>>> On 01/20/2016 02:30 PM, Daniel Vetter wrote:
>>>> On Tue, Jan 19, 2016 at 02:37:55PM -0800, Kumar, Abhay wrote:
>>>>>
>>>>> On 1/12/2016 5:57 PM, Kumar, Abhay wrote:
>>>>>> From: Abhay Kumar <abhay.kumar@intel.com>
>>>>>>
>>>>>> 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: Addressed below comments
>>>>>> 1. Tracking time from where last powercycle is initiated.
>>>>>> 2. Used ktime_get_bootime() wrapper for boottime clock.
>>>>>> 3. Used ktime_ms_delta() to get time difference.
>>>>>>
>>>>>> v4: Updated v3 change log in detail.
>>>>>>
>>>>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>>>> Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
>>>> I can't see the r-b here nor anywhere else in this thread. That's why I
>>>> didn't pick it up. Where is it?
> V3 of this patch was r-b by Ville and had comment on the commit msg. I
> updated commit msg and pushed V4.
> So practically there is no code change and Ville r-b should hold good.
Daniel, please wait before merging as another update is on the way
because of some more review comments which also already has Ville's r-b
Regards
Shobhit
>
> Sorry in case i missed to keep that r-b by Ville in V3 here.
>
>>> I didn't see it either. Ville can you please have a look at the latest
>>> changes.
>> I don't think I'll bother since I'm pretty sure I already gave the r-b
>> during the last round. People really should learn to hang on to the r-bs
>> with some vigor.
>>
>>> Regards
>>> Shobhit
>>>
>>>> -Daniel
>>>>
>>>>>> ---
>>>>>> drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++-----
>>>>>> drivers/gpu/drm/i915/intel_drv.h | 2 +-
>>>>>> 2 files changed, 15 insertions(+), 6 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/gpu/drm/i915/intel_dp.c
>>>>>> b/drivers/gpu/drm/i915/intel_dp.c
>>>>>> index 796e3d3..0042693 100644
>>>>>> --- a/drivers/gpu/drm/i915/intel_dp.c
>>>>>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>>>>>> @@ -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 *connect
>>>>>> static 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;
>>>>>> }
>>>>>> diff --git a/drivers/gpu/drm/i915/intel_drv.h
>>>>>> b/drivers/gpu/drm/i915/intel_drv.h
>>>>>> index bdfe403..06b37b8 100644
>>>>>> --- a/drivers/gpu/drm/i915/intel_drv.h
>>>>>> +++ b/drivers/gpu/drm/i915/intel_drv.h
>>>>>> @@ -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;
>>>>> Since this is already reviewed. Can we please get this Queued for
>>>>> -next ?
>>>>>
>>>>> Regards,
>>>>> Abhay Kumar
>>>>>
>>> _______________________________________________
>>> Intel-gfx mailing list
>>> Intel-gfx@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v4] drm/i915: edp resume/On time optimization.
2016-01-22 5:48 ` Kumar, Shobhit
@ 2016-01-31 7:20 ` Kumar, Abhay
0 siblings, 0 replies; 18+ messages in thread
From: Kumar, Abhay @ 2016-01-31 7:20 UTC (permalink / raw)
To: Kumar, Shobhit, Ville Syrjälä; +Cc: Intel-gfx
On 1/21/2016 9:48 PM, Kumar, Shobhit wrote:
> On 01/21/2016 05:47 PM, Kumar, Abhay wrote:
>>
>> On 1/20/2016 5:06 AM, Ville Syrjälä wrote:
>>> On Wed, Jan 20, 2016 at 03:29:00PM +0530, Kumar, Shobhit wrote:
>>>> On 01/20/2016 02:30 PM, Daniel Vetter wrote:
>>>>> On Tue, Jan 19, 2016 at 02:37:55PM -0800, Kumar, Abhay wrote:
>>>>>> On 1/12/2016 5:57 PM, Kumar, Abhay wrote:
>>>>>>> From: Abhay Kumar <abhay.kumar@intel.com>
>>>>>>>
>>>>>>> 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: Addressed below comments
>>>>>>> 1. Tracking time from where last powercycle is initiated.
>>>>>>> 2. Used ktime_get_bootime() wrapper for boottime clock.
>>>>>>> 3. Used ktime_ms_delta() to get time difference.
>>>>>>>
>>>>>>> v4: Updated v3 change log in detail.
>>>>>>>
>>>>>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>>>>> Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
>>>>> I can't see the r-b here nor anywhere else in this thread. That's why I
>>>>> didn't pick it up. Where is it?
>> V3 of this patch was r-b by Ville and had comment on the commit msg. I
>> updated commit msg and pushed V4.
>> So practically there is no code change and Ville r-b should hold good.
> Daniel, please wait before merging as another update is on the way
> because of some more review comments which also already has Ville's r-b
>
> Regards
> Shobhit
Daniel, V5 of this patch is pushed,reviewed and looks good. Please
Queue it.
Regards,
Abhay kumar
>
>> Sorry in case i missed to keep that r-b by Ville in V3 here.
>>
>>>> I didn't see it either. Ville can you please have a look at the latest
>>>> changes.
>>> I don't think I'll bother since I'm pretty sure I already gave the r-b
>>> during the last round. People really should learn to hang on to the r-bs
>>> with some vigor.
>>>
>>>> Regards
>>>> Shobhit
>>>>
>>>>> -Daniel
>>>>>
>>>>>>> ---
>>>>>>> drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++-----
>>>>>>> drivers/gpu/drm/i915/intel_drv.h | 2 +-
>>>>>>> 2 files changed, 15 insertions(+), 6 deletions(-)
>>>>>>>
>>>>>>> diff --git a/drivers/gpu/drm/i915/intel_dp.c
>>>>>>> b/drivers/gpu/drm/i915/intel_dp.c
>>>>>>> index 796e3d3..0042693 100644
>>>>>>> --- a/drivers/gpu/drm/i915/intel_dp.c
>>>>>>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>>>>>>> @@ -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 *connect
>>>>>>> static 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;
>>>>>>> }
>>>>>>> diff --git a/drivers/gpu/drm/i915/intel_drv.h
>>>>>>> b/drivers/gpu/drm/i915/intel_drv.h
>>>>>>> index bdfe403..06b37b8 100644
>>>>>>> --- a/drivers/gpu/drm/i915/intel_drv.h
>>>>>>> +++ b/drivers/gpu/drm/i915/intel_drv.h
>>>>>>> @@ -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;
>>>>>> Since this is already reviewed. Can we please get this Queued for
>>>>>> -next ?
>>>>>>
>>>>>> Regards,
>>>>>> Abhay Kumar
>>>>>>
>>>> _______________________________________________
>>>> Intel-gfx mailing list
>>>> Intel-gfx@lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH V5] drm/i915: edp resume/On time optimization.
2016-01-13 1:57 [PATCH v4] drm/i915: edp resume/On time optimization abhay.kumar
` (3 preceding siblings ...)
2016-01-19 22:37 ` Kumar, Abhay
@ 2016-01-23 1:39 ` abhay.kumar
2016-02-12 1:58 ` Kumar, Abhay
2016-02-12 16:07 ` Daniel Vetter
2016-01-23 8:43 ` ✗ Fi.CI.BAT: failure for drm/i915: edp resume/On time optimization. (rev10) Patchwork
2016-01-28 12:32 ` ✗ Fi.CI.BAT: warning " Patchwork
6 siblings, 2 replies; 18+ messages in thread
From: abhay.kumar @ 2016-01-23 1:39 UTC (permalink / raw)
To: Intel-gfx, ville.syrjala
From: Abhay Kumar <abhay.kumar@intel.com>
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: Addressed below comments
1. Tracking time from where last powercycle is initiated.
2. Used ktime_get_bootime() wrapper for boottime clock.
3. Used ktime_ms_delta() to get time difference.
v4: Updated v3 change log in detail.
v5: Removed static from panel_power_on_time(Stéphane).
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++-----
drivers/gpu/drm/i915/intel_drv.h | 2 +-
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index e2bea710..29f21c1 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1811,12 +1811,21 @@ 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;
+ 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);
}
@@ -1968,7 +1977,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);
@@ -2117,7 +2126,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. */
@@ -5116,7 +5125,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->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;
}
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index bc97012..137e40d 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -770,9 +770,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
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH V5] drm/i915: edp resume/On time optimization.
2016-01-23 1:39 ` [PATCH V5] " abhay.kumar
@ 2016-02-12 1:58 ` Kumar, Abhay
2016-02-12 16:07 ` Daniel Vetter
1 sibling, 0 replies; 18+ messages in thread
From: Kumar, Abhay @ 2016-02-12 1:58 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel-gfx
On 1/22/2016 5:39 PM, Kumar, Abhay wrote:
> From: Abhay Kumar <abhay.kumar@intel.com>
>
> 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: Addressed below comments
> 1. Tracking time from where last powercycle is initiated.
> 2. Used ktime_get_bootime() wrapper for boottime clock.
> 3. Used ktime_ms_delta() to get time difference.
>
> v4: Updated v3 change log in detail.
>
> v5: Removed static from panel_power_on_time(Stéphane).
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++-----
> drivers/gpu/drm/i915/intel_drv.h | 2 +-
> 2 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index e2bea710..29f21c1 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1811,12 +1811,21 @@ 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;
> + 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);
> }
> @@ -1968,7 +1977,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);
> @@ -2117,7 +2126,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. */
> @@ -5116,7 +5125,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->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;
> }
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index bc97012..137e40d 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -770,9 +770,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;
>
Hi Daniel,
can we please get this patch Queued?
Thanks
Regards,
Abhay Kumar
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH V5] drm/i915: edp resume/On time optimization.
2016-01-23 1:39 ` [PATCH V5] " abhay.kumar
2016-02-12 1:58 ` Kumar, Abhay
@ 2016-02-12 16:07 ` Daniel Vetter
1 sibling, 0 replies; 18+ messages in thread
From: Daniel Vetter @ 2016-02-12 16:07 UTC (permalink / raw)
To: abhay.kumar; +Cc: Intel-gfx
On Fri, Jan 22, 2016 at 05:39:04PM -0800, abhay.kumar@intel.com wrote:
> From: Abhay Kumar <abhay.kumar@intel.com>
>
> 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: Addressed below comments
> 1. Tracking time from where last powercycle is initiated.
> 2. Used ktime_get_bootime() wrapper for boottime clock.
> 3. Used ktime_ms_delta() to get time difference.
>
> v4: Updated v3 change log in detail.
>
> v5: Removed static from panel_power_on_time(Stéphane).
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Queued for -next, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/intel_dp.c | 19 ++++++++++++++-----
> drivers/gpu/drm/i915/intel_drv.h | 2 +-
> 2 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index e2bea710..29f21c1 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1811,12 +1811,21 @@ 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;
> + 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);
> }
> @@ -1968,7 +1977,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);
> @@ -2117,7 +2126,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. */
> @@ -5116,7 +5125,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->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;
> }
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index bc97012..137e40d 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -770,9 +770,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
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915: edp resume/On time optimization. (rev10)
2016-01-13 1:57 [PATCH v4] drm/i915: edp resume/On time optimization abhay.kumar
` (4 preceding siblings ...)
2016-01-23 1:39 ` [PATCH V5] " abhay.kumar
@ 2016-01-23 8:43 ` Patchwork
2016-01-26 11:36 ` Ville Syrjälä
2016-01-28 12:32 ` ✗ Fi.CI.BAT: warning " Patchwork
6 siblings, 1 reply; 18+ messages in thread
From: Patchwork @ 2016-01-23 8:43 UTC (permalink / raw)
To: abhay.kumar; +Cc: intel-gfx
== Summary ==
Built on 8fe9e785ae04fa7c37f7935cff12d62e38054b60 drm-intel-nightly: 2016y-01m-21d-11h-02m-42s UTC integration manifest
Test gem_ctx_basic:
pass -> FAIL (bdw-ultra)
Test kms_flip:
Subgroup basic-flip-vs-dpms:
pass -> DMESG-WARN (ilk-hp8440p)
bdw-nuci7 total:140 pass:131 dwarn:0 dfail:0 fail:0 skip:9
bdw-ultra total:143 pass:136 dwarn:0 dfail:0 fail:1 skip:6
bsw-nuc-2 total:143 pass:119 dwarn:0 dfail:0 fail:0 skip:24
byt-nuc total:143 pass:128 dwarn:0 dfail:0 fail:0 skip:15
hsw-brixbox total:143 pass:136 dwarn:0 dfail:0 fail:0 skip:7
hsw-gt2 total:143 pass:139 dwarn:0 dfail:0 fail:0 skip:4
ilk-hp8440p total:143 pass:103 dwarn:2 dfail:0 fail:0 skip:38
ivb-t430s total:143 pass:137 dwarn:0 dfail:0 fail:0 skip:6
skl-i5k-2 total:143 pass:134 dwarn:1 dfail:0 fail:0 skip:8
snb-dellxps total:143 pass:129 dwarn:0 dfail:0 fail:0 skip:14
snb-x220t total:143 pass:129 dwarn:0 dfail:0 fail:1 skip:13
Results at /archive/results/CI_IGT_test/Patchwork_1256/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ✗ Fi.CI.BAT: failure for drm/i915: edp resume/On time optimization. (rev10)
2016-01-23 8:43 ` ✗ Fi.CI.BAT: failure for drm/i915: edp resume/On time optimization. (rev10) Patchwork
@ 2016-01-26 11:36 ` Ville Syrjälä
2016-01-27 0:21 ` Kumar, Abhay
0 siblings, 1 reply; 18+ messages in thread
From: Ville Syrjälä @ 2016-01-26 11:36 UTC (permalink / raw)
To: intel-gfx
On Sat, Jan 23, 2016 at 08:43:33AM -0000, Patchwork wrote:
> == Summary ==
>
> Built on 8fe9e785ae04fa7c37f7935cff12d62e38054b60 drm-intel-nightly: 2016y-01m-21d-11h-02m-42s UTC integration manifest
>
> Test gem_ctx_basic:
> pass -> FAIL (bdw-ultra)
This is another 'returncode -15'. I think that's just some piglit
fail or something. I think it would indicate someone sent a SIGTERM to
the test. Not sure why that would happen. Some timeout perhaps?
> Test kms_flip:
> Subgroup basic-flip-vs-dpms:
> pass -> DMESG-WARN (ilk-hp8440p)
And that's the ilk underrrun thing:
https://bugs.freedesktop.org/show_bug.cgi?id=93787
>
> bdw-nuci7 total:140 pass:131 dwarn:0 dfail:0 fail:0 skip:9
> bdw-ultra total:143 pass:136 dwarn:0 dfail:0 fail:1 skip:6
> bsw-nuc-2 total:143 pass:119 dwarn:0 dfail:0 fail:0 skip:24
> byt-nuc total:143 pass:128 dwarn:0 dfail:0 fail:0 skip:15
> hsw-brixbox total:143 pass:136 dwarn:0 dfail:0 fail:0 skip:7
> hsw-gt2 total:143 pass:139 dwarn:0 dfail:0 fail:0 skip:4
> ilk-hp8440p total:143 pass:103 dwarn:2 dfail:0 fail:0 skip:38
> ivb-t430s total:143 pass:137 dwarn:0 dfail:0 fail:0 skip:6
> skl-i5k-2 total:143 pass:134 dwarn:1 dfail:0 fail:0 skip:8
> snb-dellxps total:143 pass:129 dwarn:0 dfail:0 fail:0 skip:14
> snb-x220t total:143 pass:129 dwarn:0 dfail:0 fail:1 skip:13
>
> Results at /archive/results/CI_IGT_test/Patchwork_1256/
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ✗ Fi.CI.BAT: failure for drm/i915: edp resume/On time optimization. (rev10)
2016-01-26 11:36 ` Ville Syrjälä
@ 2016-01-27 0:21 ` Kumar, Abhay
0 siblings, 0 replies; 18+ messages in thread
From: Kumar, Abhay @ 2016-01-27 0:21 UTC (permalink / raw)
To: Ville Syrjälä, intel-gfx, Daniel Vetter
On 1/26/2016 3:36 AM, Ville Syrjälä wrote:
> On Sat, Jan 23, 2016 at 08:43:33AM -0000, Patchwork wrote:
>> == Summary ==
>>
>> Built on 8fe9e785ae04fa7c37f7935cff12d62e38054b60 drm-intel-nightly: 2016y-01m-21d-11h-02m-42s UTC integration manifest
>>
>> Test gem_ctx_basic:
>> pass -> FAIL (bdw-ultra)
> This is another 'returncode -15'. I think that's just some piglit
> fail or something. I think it would indicate someone sent a SIGTERM to
> the test. Not sure why that would happen. Some timeout perhaps?
This might be a false alarm as changes between v4 and v5 is just a
static keyword removal and that shouldn't cause timeout to happen.
V4 results seems to be fine. Shall we ignore this? Is there any way to
rerun the tests apart from pushing patch again or debug this in case?
>
>> Test kms_flip:
>> Subgroup basic-flip-vs-dpms:
>> pass -> DMESG-WARN (ilk-hp8440p)
> And that's the ilk underrrun thing:
> https://bugs.freedesktop.org/show_bug.cgi?id=93787
>
>> bdw-nuci7 total:140 pass:131 dwarn:0 dfail:0 fail:0 skip:9
>> bdw-ultra total:143 pass:136 dwarn:0 dfail:0 fail:1 skip:6
>> bsw-nuc-2 total:143 pass:119 dwarn:0 dfail:0 fail:0 skip:24
>> byt-nuc total:143 pass:128 dwarn:0 dfail:0 fail:0 skip:15
>> hsw-brixbox total:143 pass:136 dwarn:0 dfail:0 fail:0 skip:7
>> hsw-gt2 total:143 pass:139 dwarn:0 dfail:0 fail:0 skip:4
>> ilk-hp8440p total:143 pass:103 dwarn:2 dfail:0 fail:0 skip:38
>> ivb-t430s total:143 pass:137 dwarn:0 dfail:0 fail:0 skip:6
>> skl-i5k-2 total:143 pass:134 dwarn:1 dfail:0 fail:0 skip:8
>> snb-dellxps total:143 pass:129 dwarn:0 dfail:0 fail:0 skip:14
>> snb-x220t total:143 pass:129 dwarn:0 dfail:0 fail:1 skip:13
>>
>> Results at /archive/results/CI_IGT_test/Patchwork_1256/
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread
* ✗ Fi.CI.BAT: warning for drm/i915: edp resume/On time optimization. (rev10)
2016-01-13 1:57 [PATCH v4] drm/i915: edp resume/On time optimization abhay.kumar
` (5 preceding siblings ...)
2016-01-23 8:43 ` ✗ Fi.CI.BAT: failure for drm/i915: edp resume/On time optimization. (rev10) Patchwork
@ 2016-01-28 12:32 ` Patchwork
6 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2016-01-28 12:32 UTC (permalink / raw)
To: abhay.kumar; +Cc: intel-gfx
== Summary ==
Built on b3f8ad64bc71f6236f05c2e9f4ad49a61745869a drm-intel-nightly: 2016y-01m-28d-10h-26m-23s UTC integration manifest
Test kms_flip:
Subgroup basic-flip-vs-dpms:
pass -> DMESG-WARN (ilk-hp8440p) UNSTABLE
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> DMESG-WARN (hsw-brixbox)
bdw-nuci7 total:156 pass:147 dwarn:0 dfail:0 fail:0 skip:9
bdw-ultra total:159 pass:153 dwarn:0 dfail:0 fail:0 skip:6
bsw-nuc-2 total:159 pass:135 dwarn:0 dfail:0 fail:0 skip:24
byt-nuc total:159 pass:142 dwarn:0 dfail:0 fail:0 skip:17
hsw-brixbox total:159 pass:151 dwarn:1 dfail:0 fail:0 skip:7
hsw-gt2 total:159 pass:155 dwarn:0 dfail:0 fail:0 skip:4
ilk-hp8440p total:159 pass:113 dwarn:1 dfail:0 fail:1 skip:44
ivb-t430s total:159 pass:151 dwarn:0 dfail:0 fail:0 skip:8
skl-i5k-2 total:159 pass:150 dwarn:1 dfail:0 fail:0 skip:8
snb-dellxps total:159 pass:141 dwarn:0 dfail:0 fail:0 skip:18
snb-x220t total:159 pass:141 dwarn:0 dfail:0 fail:1 skip:17
Results at /archive/results/CI_IGT_test/Patchwork_1287/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 18+ messages in thread