diff mbox series

drm/panel: otm8009a: add delay at the end of initialization

Message ID 1553155445-13407-1-git-send-email-yannick.fertre@st.com (mailing list archive)
State New, archived
Headers show
Series drm/panel: otm8009a: add delay at the end of initialization | expand

Commit Message

Yannick FERTRE March 21, 2019, 8:04 a.m. UTC
At the end of initialization, a delay is required by the panel.
Without this delay, the panel could received a frame early &
generate a crash of panel (black screen).

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
---
 drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Philippe CORNU March 26, 2019, 12:48 p.m. UTC | #1
Dear Yannick,
Many thanks for your patch.

Reviewed-by: Philippe Cornu <philippe.cornu@st.com>
Tested-by: Philippe Cornu <philippe.cornu@st.com>

Best regards,
Philippe

On 3/21/19 9:04 AM, Yannick Fertré wrote:
> At the end of initialization, a delay is required by the panel.
> Without this delay, the panel could received a frame early &
> generate a crash of panel (black screen).
> 
> Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
> ---
>   drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> index 87fa316..58ccf64 100644
> --- a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> +++ b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> @@ -248,6 +248,9 @@ static int otm8009a_init_sequence(struct otm8009a *ctx)
>   	/* Send Command GRAM memory write (no parameters) */
>   	dcs_write_seq(ctx, MIPI_DCS_WRITE_MEMORY_START);
>   
> +	/* Wait a short while to let the panel be ready before the 1st frame */
> +	mdelay(10);
> +
>   	return 0;
>   }
>   
>
Thierry Reding April 3, 2019, 4:22 p.m. UTC | #2
On Thu, Mar 21, 2019 at 09:04:05AM +0100, Yannick Fertré wrote:
> At the end of initialization, a delay is required by the panel.
> Without this delay, the panel could received a frame early &
> generate a crash of panel (black screen).
> 
> Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
> ---
>  drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 3 +++
>  1 file changed, 3 insertions(+)

Applied. You might want to go over this panel and replace some of the
mdelay() calls with msleep(). There are some that busy loop for 120 ms,
which is somewhat rude. Even the mdelay(10) in this driver should be
safe to convert to msleep().

Thierry
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
index 87fa316..58ccf64 100644
--- a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
+++ b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
@@ -248,6 +248,9 @@  static int otm8009a_init_sequence(struct otm8009a *ctx)
 	/* Send Command GRAM memory write (no parameters) */
 	dcs_write_seq(ctx, MIPI_DCS_WRITE_MEMORY_START);
 
+	/* Wait a short while to let the panel be ready before the 1st frame */
+	mdelay(10);
+
 	return 0;
 }