dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel
@ 2021-03-25 11:48 Hans de Goede
  2021-03-25 11:48 ` [PATCH 2/2] drm/i915/display/vlv_dsi: Move panel_pwr_cycle_delay to next panel-on Hans de Goede
  2021-04-06 13:57 ` [PATCH 1/2] drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel Hans de Goede
  0 siblings, 2 replies; 7+ messages in thread
From: Hans de Goede @ 2021-03-25 11:48 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi
  Cc: Hans de Goede, intel-gfx, dri-devel

After the recently added commit fe0f1e3bfdfe ("drm/i915: Shut down
displays gracefully on reboot"), the DSI panel on a Cherry Trail based
Predia Basic tablet would no longer properly light up after reboot.

I've managed to reproduce this without rebooting by doing:
chvt 3; echo 1 > /sys/class/graphics/fb0/blank;\
echo 0 > /sys/class/graphics/fb0/blank

Which rapidly turns the panel off and back on again.

The vlv_dsi.c code uses an intel_dsi_msleep() helper for the various delays
used for panel on/off, since starting with MIPI-sequences version >= 3 the
delays are already included inside the MIPI-sequences.

The problems exposed by the "Shut down displays gracefully on reboot"
change, show that using this helper for the panel_pwr_cycle_delay is
not the right thing to do. This has not been noticed until now because
normally the panel never is cycled off and directly on again in quick
succession.

Change the msleep for the panel_pwr_cycle_delay to a normal msleep()
call to avoid the panel staying black after a quick off + on cycle.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Fixes: fe0f1e3bfdfe ("drm/i915: Shut down displays gracefully on reboot")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/gpu/drm/i915/display/vlv_dsi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
index d5a3f69c5df3..38d5a1f3ded5 100644
--- a/drivers/gpu/drm/i915/display/vlv_dsi.c
+++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
@@ -996,14 +996,14 @@ static void intel_dsi_post_disable(struct intel_atomic_state *state,
 	 * FIXME As we do with eDP, just make a note of the time here
 	 * and perform the wait before the next panel power on.
 	 */
-	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
+	msleep(intel_dsi->panel_pwr_cycle_delay);
 }
 
 static void intel_dsi_shutdown(struct intel_encoder *encoder)
 {
 	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
 
-	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
+	msleep(intel_dsi->panel_pwr_cycle_delay);
 }
 
 static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
-- 
2.30.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] drm/i915/display/vlv_dsi: Move panel_pwr_cycle_delay to next panel-on
  2021-03-25 11:48 [PATCH 1/2] drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel Hans de Goede
@ 2021-03-25 11:48 ` Hans de Goede
  2021-04-06 13:57 ` [PATCH 1/2] drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel Hans de Goede
  1 sibling, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2021-03-25 11:48 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi
  Cc: Hans de Goede, intel-gfx, dri-devel

Instead of sleeping panel_pwr_cycle_delay ms when turning the panel off,
record the time it is turned off and if necessary wait any (remaining)
time when the panel is turned on again.

Also sleep the remaining time on shutdown, because on reboot the
GOP will immediately turn on the panel again.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/gpu/drm/i915/display/intel_dsi.h |  1 +
 drivers/gpu/drm/i915/display/vlv_dsi.c   | 25 ++++++++++++++++++------
 2 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dsi.h b/drivers/gpu/drm/i915/display/intel_dsi.h
index 625f2f1ae061..50d6da0b2419 100644
--- a/drivers/gpu/drm/i915/display/intel_dsi.h
+++ b/drivers/gpu/drm/i915/display/intel_dsi.h
@@ -124,6 +124,7 @@ struct intel_dsi {
 	u16 panel_on_delay;
 	u16 panel_off_delay;
 	u16 panel_pwr_cycle_delay;
+	ktime_t panel_power_off_time;
 };
 
 struct intel_dsi_host {
diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
index 38d5a1f3ded5..3ede55cb3f43 100644
--- a/drivers/gpu/drm/i915/display/vlv_dsi.c
+++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
@@ -717,6 +717,19 @@ static void intel_dsi_port_disable(struct intel_encoder *encoder)
 	}
 }
 
+static void intel_dsi_wait_panel_power_cycle(struct intel_dsi *intel_dsi)
+{
+	ktime_t panel_power_on_time;
+	s64 panel_power_off_duration;
+
+	panel_power_on_time = ktime_get_boottime();
+	panel_power_off_duration = ktime_ms_delta(panel_power_on_time,
+						  intel_dsi->panel_power_off_time);
+
+	if (panel_power_off_duration < (s64)intel_dsi->panel_pwr_cycle_delay)
+		msleep(intel_dsi->panel_pwr_cycle_delay - panel_power_off_duration);
+}
+
 static void intel_dsi_prepare(struct intel_encoder *intel_encoder,
 			      const struct intel_crtc_state *pipe_config);
 static void intel_dsi_unprepare(struct intel_encoder *encoder);
@@ -778,6 +791,8 @@ static void intel_dsi_pre_enable(struct intel_atomic_state *state,
 
 	drm_dbg_kms(&dev_priv->drm, "\n");
 
+	intel_dsi_wait_panel_power_cycle(intel_dsi);
+
 	intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, true);
 
 	/*
@@ -992,18 +1007,14 @@ static void intel_dsi_post_disable(struct intel_atomic_state *state,
 	intel_dsi_msleep(intel_dsi, intel_dsi->panel_off_delay);
 	intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_POWER_OFF);
 
-	/*
-	 * FIXME As we do with eDP, just make a note of the time here
-	 * and perform the wait before the next panel power on.
-	 */
-	msleep(intel_dsi->panel_pwr_cycle_delay);
+	intel_dsi->panel_power_off_time = ktime_get_boottime();
 }
 
 static void intel_dsi_shutdown(struct intel_encoder *encoder)
 {
 	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
 
-	msleep(intel_dsi->panel_pwr_cycle_delay);
+	intel_dsi_wait_panel_power_cycle(intel_dsi);
 }
 
 static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
@@ -1884,6 +1895,8 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)
 	else
 		intel_encoder->pipe_mask = BIT(PIPE_B);
 
+	intel_dsi->panel_power_off_time = ktime_get_boottime();
+
 	if (dev_priv->vbt.dsi.config->dual_link)
 		intel_dsi->ports = BIT(PORT_A) | BIT(PORT_C);
 	else
-- 
2.30.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel
  2021-03-25 11:48 [PATCH 1/2] drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel Hans de Goede
  2021-03-25 11:48 ` [PATCH 2/2] drm/i915/display/vlv_dsi: Move panel_pwr_cycle_delay to next panel-on Hans de Goede
@ 2021-04-06 13:57 ` Hans de Goede
  2021-04-07 12:34   ` Ville Syrjälä
  1 sibling, 1 reply; 7+ messages in thread
From: Hans de Goede @ 2021-04-06 13:57 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi; +Cc: intel-gfx, dri-devel

Hi,

On 3/25/21 12:48 PM, Hans de Goede wrote:
> After the recently added commit fe0f1e3bfdfe ("drm/i915: Shut down
> displays gracefully on reboot"), the DSI panel on a Cherry Trail based
> Predia Basic tablet would no longer properly light up after reboot.
> 
> I've managed to reproduce this without rebooting by doing:
> chvt 3; echo 1 > /sys/class/graphics/fb0/blank;\
> echo 0 > /sys/class/graphics/fb0/blank
> 
> Which rapidly turns the panel off and back on again.
> 
> The vlv_dsi.c code uses an intel_dsi_msleep() helper for the various delays
> used for panel on/off, since starting with MIPI-sequences version >= 3 the
> delays are already included inside the MIPI-sequences.
> 
> The problems exposed by the "Shut down displays gracefully on reboot"
> change, show that using this helper for the panel_pwr_cycle_delay is
> not the right thing to do. This has not been noticed until now because
> normally the panel never is cycled off and directly on again in quick
> succession.
> 
> Change the msleep for the panel_pwr_cycle_delay to a normal msleep()
> call to avoid the panel staying black after a quick off + on cycle.
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Fixes: fe0f1e3bfdfe ("drm/i915: Shut down displays gracefully on reboot")
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Ping? Ville AFAICT this is ready for merging, can you review this please so that I can push it to drm-intel-next ?

Regards,

Hans


> ---
>  drivers/gpu/drm/i915/display/vlv_dsi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
> index d5a3f69c5df3..38d5a1f3ded5 100644
> --- a/drivers/gpu/drm/i915/display/vlv_dsi.c
> +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
> @@ -996,14 +996,14 @@ static void intel_dsi_post_disable(struct intel_atomic_state *state,
>  	 * FIXME As we do with eDP, just make a note of the time here
>  	 * and perform the wait before the next panel power on.
>  	 */
> -	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
> +	msleep(intel_dsi->panel_pwr_cycle_delay);
>  }
>  
>  static void intel_dsi_shutdown(struct intel_encoder *encoder)
>  {
>  	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
>  
> -	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
> +	msleep(intel_dsi->panel_pwr_cycle_delay);
>  }
>  
>  static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel
  2021-04-06 13:57 ` [PATCH 1/2] drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel Hans de Goede
@ 2021-04-07 12:34   ` Ville Syrjälä
  2021-04-07 13:50     ` Hans de Goede
  0 siblings, 1 reply; 7+ messages in thread
From: Ville Syrjälä @ 2021-04-07 12:34 UTC (permalink / raw)
  To: Hans de Goede; +Cc: intel-gfx, dri-devel, Rodrigo Vivi

On Tue, Apr 06, 2021 at 03:57:32PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 3/25/21 12:48 PM, Hans de Goede wrote:
> > After the recently added commit fe0f1e3bfdfe ("drm/i915: Shut down
> > displays gracefully on reboot"), the DSI panel on a Cherry Trail based
> > Predia Basic tablet would no longer properly light up after reboot.
> > 
> > I've managed to reproduce this without rebooting by doing:
> > chvt 3; echo 1 > /sys/class/graphics/fb0/blank;\
> > echo 0 > /sys/class/graphics/fb0/blank
> > 
> > Which rapidly turns the panel off and back on again.
> > 
> > The vlv_dsi.c code uses an intel_dsi_msleep() helper for the various delays
> > used for panel on/off, since starting with MIPI-sequences version >= 3 the
> > delays are already included inside the MIPI-sequences.
> > 
> > The problems exposed by the "Shut down displays gracefully on reboot"
> > change, show that using this helper for the panel_pwr_cycle_delay is
> > not the right thing to do. This has not been noticed until now because
> > normally the panel never is cycled off and directly on again in quick
> > succession.
> > 
> > Change the msleep for the panel_pwr_cycle_delay to a normal msleep()
> > call to avoid the panel staying black after a quick off + on cycle.
> > 
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Fixes: fe0f1e3bfdfe ("drm/i915: Shut down displays gracefully on reboot")
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> 
> Ping? Ville AFAICT this is ready for merging, can you review this please so that I can push it to drm-intel-next ?

Didn't get the original mail, but lgtm.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> 
> Regards,
> 
> Hans
> 
> 
> > ---
> >  drivers/gpu/drm/i915/display/vlv_dsi.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
> > index d5a3f69c5df3..38d5a1f3ded5 100644
> > --- a/drivers/gpu/drm/i915/display/vlv_dsi.c
> > +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
> > @@ -996,14 +996,14 @@ static void intel_dsi_post_disable(struct intel_atomic_state *state,
> >  	 * FIXME As we do with eDP, just make a note of the time here
> >  	 * and perform the wait before the next panel power on.
> >  	 */
> > -	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
> > +	msleep(intel_dsi->panel_pwr_cycle_delay);
> >  }
> >  
> >  static void intel_dsi_shutdown(struct intel_encoder *encoder)
> >  {
> >  	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
> >  
> > -	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
> > +	msleep(intel_dsi->panel_pwr_cycle_delay);
> >  }
> >  
> >  static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
> > 

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel
  2021-04-07 12:34   ` Ville Syrjälä
@ 2021-04-07 13:50     ` Hans de Goede
  2021-04-07 13:57       ` Ville Syrjälä
  0 siblings, 1 reply; 7+ messages in thread
From: Hans de Goede @ 2021-04-07 13:50 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, dri-devel, Rodrigo Vivi

Hi,

On 4/7/21 2:34 PM, Ville Syrjälä wrote:
> On Tue, Apr 06, 2021 at 03:57:32PM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 3/25/21 12:48 PM, Hans de Goede wrote:
>>> After the recently added commit fe0f1e3bfdfe ("drm/i915: Shut down
>>> displays gracefully on reboot"), the DSI panel on a Cherry Trail based
>>> Predia Basic tablet would no longer properly light up after reboot.
>>>
>>> I've managed to reproduce this without rebooting by doing:
>>> chvt 3; echo 1 > /sys/class/graphics/fb0/blank;\
>>> echo 0 > /sys/class/graphics/fb0/blank
>>>
>>> Which rapidly turns the panel off and back on again.
>>>
>>> The vlv_dsi.c code uses an intel_dsi_msleep() helper for the various delays
>>> used for panel on/off, since starting with MIPI-sequences version >= 3 the
>>> delays are already included inside the MIPI-sequences.
>>>
>>> The problems exposed by the "Shut down displays gracefully on reboot"
>>> change, show that using this helper for the panel_pwr_cycle_delay is
>>> not the right thing to do. This has not been noticed until now because
>>> normally the panel never is cycled off and directly on again in quick
>>> succession.
>>>
>>> Change the msleep for the panel_pwr_cycle_delay to a normal msleep()
>>> call to avoid the panel staying black after a quick off + on cycle.
>>>
>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>> Fixes: fe0f1e3bfdfe ("drm/i915: Shut down displays gracefully on reboot")
>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>
>> Ping? Ville AFAICT this is ready for merging, can you review this please so that I can push it to drm-intel-next ?
> 
> Didn't get the original mail, but lgtm.

Yeah, these bounced I mentioned that in a p.s. in one of the emails
in our private threads about the mail issues, with patchwork links,
but I guess the p.s. was hidden in all the other stuff in that thread.
Anyways this is solved now.

> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Thank you, note this is patch 1/2 does the Reviewed-by apply to
both?  Patch 2/2 is here:

https://patchwork.freedesktop.org/patch/425983/

Regards,

Hans




>>> ---
>>>  drivers/gpu/drm/i915/display/vlv_dsi.c | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
>>> index d5a3f69c5df3..38d5a1f3ded5 100644
>>> --- a/drivers/gpu/drm/i915/display/vlv_dsi.c
>>> +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
>>> @@ -996,14 +996,14 @@ static void intel_dsi_post_disable(struct intel_atomic_state *state,
>>>  	 * FIXME As we do with eDP, just make a note of the time here
>>>  	 * and perform the wait before the next panel power on.
>>>  	 */
>>> -	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
>>> +	msleep(intel_dsi->panel_pwr_cycle_delay);
>>>  }
>>>  
>>>  static void intel_dsi_shutdown(struct intel_encoder *encoder)
>>>  {
>>>  	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
>>>  
>>> -	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
>>> +	msleep(intel_dsi->panel_pwr_cycle_delay);
>>>  }
>>>  
>>>  static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
>>>
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel
  2021-04-07 13:50     ` Hans de Goede
@ 2021-04-07 13:57       ` Ville Syrjälä
  2021-04-12  9:35         ` Hans de Goede
  0 siblings, 1 reply; 7+ messages in thread
From: Ville Syrjälä @ 2021-04-07 13:57 UTC (permalink / raw)
  To: Hans de Goede; +Cc: intel-gfx, dri-devel, Rodrigo Vivi

On Wed, Apr 07, 2021 at 03:50:35PM +0200, Hans de Goede wrote:
> Hi,
> 
> On 4/7/21 2:34 PM, Ville Syrjälä wrote:
> > On Tue, Apr 06, 2021 at 03:57:32PM +0200, Hans de Goede wrote:
> >> Hi,
> >>
> >> On 3/25/21 12:48 PM, Hans de Goede wrote:
> >>> After the recently added commit fe0f1e3bfdfe ("drm/i915: Shut down
> >>> displays gracefully on reboot"), the DSI panel on a Cherry Trail based
> >>> Predia Basic tablet would no longer properly light up after reboot.
> >>>
> >>> I've managed to reproduce this without rebooting by doing:
> >>> chvt 3; echo 1 > /sys/class/graphics/fb0/blank;\
> >>> echo 0 > /sys/class/graphics/fb0/blank
> >>>
> >>> Which rapidly turns the panel off and back on again.
> >>>
> >>> The vlv_dsi.c code uses an intel_dsi_msleep() helper for the various delays
> >>> used for panel on/off, since starting with MIPI-sequences version >= 3 the
> >>> delays are already included inside the MIPI-sequences.
> >>>
> >>> The problems exposed by the "Shut down displays gracefully on reboot"
> >>> change, show that using this helper for the panel_pwr_cycle_delay is
> >>> not the right thing to do. This has not been noticed until now because
> >>> normally the panel never is cycled off and directly on again in quick
> >>> succession.
> >>>
> >>> Change the msleep for the panel_pwr_cycle_delay to a normal msleep()
> >>> call to avoid the panel staying black after a quick off + on cycle.
> >>>
> >>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >>> Fixes: fe0f1e3bfdfe ("drm/i915: Shut down displays gracefully on reboot")
> >>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> >>
> >> Ping? Ville AFAICT this is ready for merging, can you review this please so that I can push it to drm-intel-next ?
> > 
> > Didn't get the original mail, but lgtm.
> 
> Yeah, these bounced I mentioned that in a p.s. in one of the emails
> in our private threads about the mail issues, with patchwork links,
> but I guess the p.s. was hidden in all the other stuff in that thread.
> Anyways this is solved now.
> 
> > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Thank you, note this is patch 1/2 does the Reviewed-by apply to
> both?  Patch 2/2 is here:
> 
> https://patchwork.freedesktop.org/patch/425983/

That one looks good as well.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> 
> Regards,
> 
> Hans
> 
> 
> 
> 
> >>> ---
> >>>  drivers/gpu/drm/i915/display/vlv_dsi.c | 4 ++--
> >>>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
> >>> index d5a3f69c5df3..38d5a1f3ded5 100644
> >>> --- a/drivers/gpu/drm/i915/display/vlv_dsi.c
> >>> +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
> >>> @@ -996,14 +996,14 @@ static void intel_dsi_post_disable(struct intel_atomic_state *state,
> >>>  	 * FIXME As we do with eDP, just make a note of the time here
> >>>  	 * and perform the wait before the next panel power on.
> >>>  	 */
> >>> -	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
> >>> +	msleep(intel_dsi->panel_pwr_cycle_delay);
> >>>  }
> >>>  
> >>>  static void intel_dsi_shutdown(struct intel_encoder *encoder)
> >>>  {
> >>>  	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
> >>>  
> >>> -	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
> >>> +	msleep(intel_dsi->panel_pwr_cycle_delay);
> >>>  }
> >>>  
> >>>  static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
> >>>
> > 

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel
  2021-04-07 13:57       ` Ville Syrjälä
@ 2021-04-12  9:35         ` Hans de Goede
  0 siblings, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2021-04-12  9:35 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, dri-devel, Rodrigo Vivi

Hi,

On 4/7/21 3:57 PM, Ville Syrjälä wrote:
> On Wed, Apr 07, 2021 at 03:50:35PM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 4/7/21 2:34 PM, Ville Syrjälä wrote:
>>> On Tue, Apr 06, 2021 at 03:57:32PM +0200, Hans de Goede wrote:
>>>> Hi,
>>>>
>>>> On 3/25/21 12:48 PM, Hans de Goede wrote:
>>>>> After the recently added commit fe0f1e3bfdfe ("drm/i915: Shut down
>>>>> displays gracefully on reboot"), the DSI panel on a Cherry Trail based
>>>>> Predia Basic tablet would no longer properly light up after reboot.
>>>>>
>>>>> I've managed to reproduce this without rebooting by doing:
>>>>> chvt 3; echo 1 > /sys/class/graphics/fb0/blank;\
>>>>> echo 0 > /sys/class/graphics/fb0/blank
>>>>>
>>>>> Which rapidly turns the panel off and back on again.
>>>>>
>>>>> The vlv_dsi.c code uses an intel_dsi_msleep() helper for the various delays
>>>>> used for panel on/off, since starting with MIPI-sequences version >= 3 the
>>>>> delays are already included inside the MIPI-sequences.
>>>>>
>>>>> The problems exposed by the "Shut down displays gracefully on reboot"
>>>>> change, show that using this helper for the panel_pwr_cycle_delay is
>>>>> not the right thing to do. This has not been noticed until now because
>>>>> normally the panel never is cycled off and directly on again in quick
>>>>> succession.
>>>>>
>>>>> Change the msleep for the panel_pwr_cycle_delay to a normal msleep()
>>>>> call to avoid the panel staying black after a quick off + on cycle.
>>>>>
>>>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>>> Fixes: fe0f1e3bfdfe ("drm/i915: Shut down displays gracefully on reboot")
>>>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>>>
>>>> Ping? Ville AFAICT this is ready for merging, can you review this please so that I can push it to drm-intel-next ?
>>>
>>> Didn't get the original mail, but lgtm.
>>
>> Yeah, these bounced I mentioned that in a p.s. in one of the emails
>> in our private threads about the mail issues, with patchwork links,
>> but I guess the p.s. was hidden in all the other stuff in that thread.
>> Anyways this is solved now.
>>
>>> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>> Thank you, note this is patch 1/2 does the Reviewed-by apply to
>> both?  Patch 2/2 is here:
>>
>> https://patchwork.freedesktop.org/patch/425983/
> 
> That one looks good as well.
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Thank you.

I've pushed both to drm-intel-next now.

Regards,

Hans



>>>>> ---
>>>>>  drivers/gpu/drm/i915/display/vlv_dsi.c | 4 ++--
>>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
>>>>> index d5a3f69c5df3..38d5a1f3ded5 100644
>>>>> --- a/drivers/gpu/drm/i915/display/vlv_dsi.c
>>>>> +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
>>>>> @@ -996,14 +996,14 @@ static void intel_dsi_post_disable(struct intel_atomic_state *state,
>>>>>  	 * FIXME As we do with eDP, just make a note of the time here
>>>>>  	 * and perform the wait before the next panel power on.
>>>>>  	 */
>>>>> -	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
>>>>> +	msleep(intel_dsi->panel_pwr_cycle_delay);
>>>>>  }
>>>>>  
>>>>>  static void intel_dsi_shutdown(struct intel_encoder *encoder)
>>>>>  {
>>>>>  	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
>>>>>  
>>>>> -	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
>>>>> +	msleep(intel_dsi->panel_pwr_cycle_delay);
>>>>>  }
>>>>>  
>>>>>  static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
>>>>>
>>>
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-12  9:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-25 11:48 [PATCH 1/2] drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel Hans de Goede
2021-03-25 11:48 ` [PATCH 2/2] drm/i915/display/vlv_dsi: Move panel_pwr_cycle_delay to next panel-on Hans de Goede
2021-04-06 13:57 ` [PATCH 1/2] drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel Hans de Goede
2021-04-07 12:34   ` Ville Syrjälä
2021-04-07 13:50     ` Hans de Goede
2021-04-07 13:57       ` Ville Syrjälä
2021-04-12  9:35         ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).