Skip to contentSkip to conversation

drm/panel: truly: Add additional delay after pulling down reset gpio

PATCH In review Vivek Gautam 3 participants 5 messages May 27, 2019 – Jun 6, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/panel: truly: Add additional delay after pulling down reset gpio

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

---
 drivers/gpu/drm/panel/panel-truly-nt35597.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-truly-nt35597.c +1 -0
index fc2a66c53db4..aa7153fd3be4 100644
@@ -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;
 }
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#1 lore raw
Quoted 14 lines · 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.

---
 drivers/gpu/drm/panel/panel-truly-nt35597.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-truly-nt35597.c +0 -0
index fc2a66c53db4..aa7153fd3be4 100644

drivers/gpu/drm/panel/panel-truly-nt35597.c static int truly_35597_power_on(struct truly_nt35597 *ctx) · line 283

Quoted 4 lines
drivers/gpu/drm/panel/panel-truly-nt35597.c +1 -0
@@ -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.

#2 lore raw
Quoted 22 lines · Marc Gonzalez
Quoted 14 lines · 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.

---
  drivers/gpu/drm/panel/panel-truly-nt35597.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-truly-nt35597.c +0 -0
index fc2a66c53db4..aa7153fd3be4 100644

drivers/gpu/drm/panel/panel-truly-nt35597.c static int truly_35597_power_on(struct truly_nt35597 *ctx) · line 283

Quoted 4 lines
drivers/gpu/drm/panel/panel-truly-nt35597.c +1 -0
@@ -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.

Quoted 7 lines

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

Quoted 2 lines

Regards.

#3 lore raw
In reply to Vivek Gautam

Hi Vivek,

Quoted 5 lines · 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.

added to drm-misc-next

Sam

Quoted 24 lines
---
 drivers/gpu/drm/panel/panel-truly-nt35597.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-truly-nt35597.c +1 -0
index fc2a66c53db4..aa7153fd3be4 100644
@@ -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;
 }
Signature · 7 lines
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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw
Quoted 11 lines · Sam Ravnborg

Hi Vivek,

Quoted 5 lines · 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.

added to drm-misc-next

Thanks a lot.

Best regards
Vivek

Quoted 27 lines

Sam

Quoted 24 lines
---
 drivers/gpu/drm/panel/panel-truly-nt35597.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/panel/panel-truly-nt35597.c +1 -1
index fc2a66c53db4..aa7153fd3be4 100644
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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