linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/panel: truly: Add additional delay after pulling down reset gpio
@ 2019-05-27 10:26 Vivek Gautam
  2019-05-28  8:43 ` Marc Gonzalez
  2019-06-05  8:22 ` Sam Ravnborg
  0 siblings, 2 replies; 5+ messages in thread
From: Vivek Gautam @ 2019-05-27 10:26 UTC (permalink / raw)
  To: airlied, thierry.reding, daniel, dri-devel
  Cc: linux-kernel, robdclark, linux-arm-msm, bjorn.andersson, Vivek Gautam

MTP SDM845 panel seems to need additional delay to bring panel
to a workable state. Running modetest without this change displays
blurry artifacts.

Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
---
 drivers/gpu/drm/panel/panel-truly-nt35597.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/panel/panel-truly-nt35597.c b/drivers/gpu/drm/panel/panel-truly-nt35597.c
index fc2a66c53db4..aa7153fd3be4 100644
--- a/drivers/gpu/drm/panel/panel-truly-nt35597.c
+++ b/drivers/gpu/drm/panel/panel-truly-nt35597.c
@@ -280,6 +280,7 @@ static int truly_35597_power_on(struct truly_nt35597 *ctx)
 	gpiod_set_value(ctx->reset_gpio, 1);
 	usleep_range(10000, 20000);
 	gpiod_set_value(ctx->reset_gpio, 0);
+	usleep_range(10000, 20000);
 
 	return 0;
 }
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation


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

* Re: [PATCH 1/1] drm/panel: truly: Add additional delay after pulling down reset gpio
  2019-05-27 10:26 [PATCH 1/1] drm/panel: truly: Add additional delay after pulling down reset gpio Vivek Gautam
@ 2019-05-28  8:43 ` Marc Gonzalez
  2019-05-29  5:57   ` Vivek Gautam
  2019-06-05  8:22 ` Sam Ravnborg
  1 sibling, 1 reply; 5+ messages in thread
From: Marc Gonzalez @ 2019-05-28  8:43 UTC (permalink / raw)
  To: Vivek Gautam, airlied, thierry.reding, daniel
  Cc: Rob Clark, Bjorn Andersson, MSM, LKML

On 27/05/2019 12:26, Vivek Gautam wrote:

> MTP SDM845 panel seems to need additional delay to bring panel
> to a workable state. Running modetest without this change displays
> blurry artifacts.
> 
> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
> ---
>  drivers/gpu/drm/panel/panel-truly-nt35597.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-truly-nt35597.c b/drivers/gpu/drm/panel/panel-truly-nt35597.c
> index fc2a66c53db4..aa7153fd3be4 100644
> --- a/drivers/gpu/drm/panel/panel-truly-nt35597.c
> +++ b/drivers/gpu/drm/panel/panel-truly-nt35597.c
> @@ -280,6 +280,7 @@ static int truly_35597_power_on(struct truly_nt35597 *ctx)
>  	gpiod_set_value(ctx->reset_gpio, 1);
>  	usleep_range(10000, 20000);
>  	gpiod_set_value(ctx->reset_gpio, 0);
> +	usleep_range(10000, 20000);

I'm not sure usleep_range() makes sense with these values.

AFAIU, usleep_range() is typically used for sub-jiffy sleeps, and is based
on HRT to generate an interrupt.

Once we get into jiffy granularity, it seems to me msleep() is good enough.
IIUC, it would piggy-back on the jiffy timer interrupt.

In short, why not just use msleep(10); ?

Regards.

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

* Re: [PATCH 1/1] drm/panel: truly: Add additional delay after pulling down reset gpio
  2019-05-28  8:43 ` Marc Gonzalez
@ 2019-05-29  5:57   ` Vivek Gautam
  0 siblings, 0 replies; 5+ messages in thread
From: Vivek Gautam @ 2019-05-29  5:57 UTC (permalink / raw)
  To: Marc Gonzalez, airlied, thierry.reding, daniel
  Cc: Rob Clark, Bjorn Andersson, MSM, LKML



On 5/28/2019 2:13 PM, Marc Gonzalez wrote:
> On 27/05/2019 12:26, Vivek Gautam wrote:
>
>> MTP SDM845 panel seems to need additional delay to bring panel
>> to a workable state. Running modetest without this change displays
>> blurry artifacts.
>>
>> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
>> ---
>>   drivers/gpu/drm/panel/panel-truly-nt35597.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/panel/panel-truly-nt35597.c b/drivers/gpu/drm/panel/panel-truly-nt35597.c
>> index fc2a66c53db4..aa7153fd3be4 100644
>> --- a/drivers/gpu/drm/panel/panel-truly-nt35597.c
>> +++ b/drivers/gpu/drm/panel/panel-truly-nt35597.c
>> @@ -280,6 +280,7 @@ static int truly_35597_power_on(struct truly_nt35597 *ctx)
>>   	gpiod_set_value(ctx->reset_gpio, 1);
>>   	usleep_range(10000, 20000);
>>   	gpiod_set_value(ctx->reset_gpio, 0);
>> +	usleep_range(10000, 20000);
> I'm not sure usleep_range() makes sense with these values.
>
> AFAIU, usleep_range() is typically used for sub-jiffy sleeps, and is based
> on HRT to generate an interrupt.
>
> Once we get into jiffy granularity, it seems to me msleep() is good enough.
> IIUC, it would piggy-back on the jiffy timer interrupt.
>
> In short, why not just use msleep(10); ?

I am just maintaining the symmetry across older code.

Thanks
Vivek
>
> Regards.


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

* Re: [PATCH 1/1] drm/panel: truly: Add additional delay after pulling down reset gpio
  2019-05-27 10:26 [PATCH 1/1] drm/panel: truly: Add additional delay after pulling down reset gpio Vivek Gautam
  2019-05-28  8:43 ` Marc Gonzalez
@ 2019-06-05  8:22 ` Sam Ravnborg
  2019-06-06 11:18   ` Vivek Gautam
  1 sibling, 1 reply; 5+ messages in thread
From: Sam Ravnborg @ 2019-06-05  8:22 UTC (permalink / raw)
  To: Vivek Gautam
  Cc: airlied, thierry.reding, daniel, dri-devel, linux-arm-msm,
	linux-kernel, bjorn.andersson

Hi Vivek,

On Mon, May 27, 2019 at 03:56:16PM +0530, Vivek Gautam wrote:
> MTP SDM845 panel seems to need additional delay to bring panel
> to a workable state. Running modetest without this change displays
> blurry artifacts.
> 
> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>

added to drm-misc-next

	Sam

> ---
>  drivers/gpu/drm/panel/panel-truly-nt35597.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-truly-nt35597.c b/drivers/gpu/drm/panel/panel-truly-nt35597.c
> index fc2a66c53db4..aa7153fd3be4 100644
> --- a/drivers/gpu/drm/panel/panel-truly-nt35597.c
> +++ b/drivers/gpu/drm/panel/panel-truly-nt35597.c
> @@ -280,6 +280,7 @@ static int truly_35597_power_on(struct truly_nt35597 *ctx)
>  	gpiod_set_value(ctx->reset_gpio, 1);
>  	usleep_range(10000, 20000);
>  	gpiod_set_value(ctx->reset_gpio, 0);
> +	usleep_range(10000, 20000);
>  
>  	return 0;
>  }
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/1] drm/panel: truly: Add additional delay after pulling down reset gpio
  2019-06-05  8:22 ` Sam Ravnborg
@ 2019-06-06 11:18   ` Vivek Gautam
  0 siblings, 0 replies; 5+ messages in thread
From: Vivek Gautam @ 2019-06-06 11:18 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: David Airlie, thierry.reding, Daniel Vetter, dri-devel,
	linux-arm-msm, open list, Bjorn Andersson

On Wed, Jun 5, 2019 at 1:54 PM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> Hi Vivek,
>
> On Mon, May 27, 2019 at 03:56:16PM +0530, Vivek Gautam wrote:
> > MTP SDM845 panel seems to need additional delay to bring panel
> > to a workable state. Running modetest without this change displays
> > blurry artifacts.
> >
> > Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
>
> added to drm-misc-next

Thanks a lot.

Best regards
Vivek

>
>         Sam
>
> > ---
> >  drivers/gpu/drm/panel/panel-truly-nt35597.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-truly-nt35597.c b/drivers/gpu/drm/panel/panel-truly-nt35597.c
> > index fc2a66c53db4..aa7153fd3be4 100644
> > --- a/drivers/gpu/drm/panel/panel-truly-nt35597.c
> > +++ b/drivers/gpu/drm/panel/panel-truly-nt35597.c
> > @@ -280,6 +280,7 @@ static int truly_35597_power_on(struct truly_nt35597 *ctx)
> >       gpiod_set_value(ctx->reset_gpio, 1);
> >       usleep_range(10000, 20000);
> >       gpiod_set_value(ctx->reset_gpio, 0);
> > +     usleep_range(10000, 20000);
> >
> >       return 0;
> >  }
> > --
> > QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> > of Code Aurora Forum, hosted by The Linux Foundation
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel



-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

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

end of thread, other threads:[~2019-06-06 11:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 10:26 [PATCH 1/1] drm/panel: truly: Add additional delay after pulling down reset gpio Vivek Gautam
2019-05-28  8:43 ` Marc Gonzalez
2019-05-29  5:57   ` Vivek Gautam
2019-06-05  8:22 ` Sam Ravnborg
2019-06-06 11:18   ` Vivek Gautam

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).