All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: gma500: Replace 120ms mdelay calls in mdfld_dsi_pkg_sender.c
@ 2018-10-01 15:36 Phillip Potter
  2018-10-02  7:52 ` Patrik Jakobsson
  0 siblings, 1 reply; 4+ messages in thread
From: Phillip Potter @ 2018-10-01 15:36 UTC (permalink / raw)
  To: patrik.r.jakobsson; +Cc: dri-devel

Replace all 120ms mdelay macro calls with msleep function calls. As msleep is
not suitable for < 20ms sleeps, also remove comment from mdelay(5) call.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c b/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c
index c50534c923df..a9c4116aad8a 100644
--- a/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c
+++ b/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c
@@ -322,13 +322,11 @@ static int send_pkg_prepare(struct mdfld_dsi_pkg_sender *sender, u8 data_type,
 
 	/*wait for 120 milliseconds in case exit_sleep_mode just be sent*/
 	if (unlikely(cmd == MIPI_DCS_ENTER_SLEEP_MODE)) {
-		/*TODO: replace it with msleep later*/
-		mdelay(120);
+		msleep(120);
 	}
 
 	if (unlikely(cmd == MIPI_DCS_EXIT_SLEEP_MODE)) {
-		/*TODO: replace it with msleep later*/
-		mdelay(120);
+		msleep(120);
 	}
 	return 0;
 }
@@ -351,14 +349,11 @@ static int send_pkg_done(struct mdfld_dsi_pkg_sender *sender, u8 data_type,
 	/*update panel status*/
 	if (unlikely(cmd == MIPI_DCS_ENTER_SLEEP_MODE)) {
 		sender->panel_mode |= MDFLD_DSI_PANEL_MODE_SLEEP;
-		/*TODO: replace it with msleep later*/
-		mdelay(120);
+		msleep(120);
 	} else if (unlikely(cmd == MIPI_DCS_EXIT_SLEEP_MODE)) {
 		sender->panel_mode &= ~MDFLD_DSI_PANEL_MODE_SLEEP;
-		/*TODO: replace it with msleep later*/
-		mdelay(120);
+		msleep(120);
 	} else if (unlikely(cmd == MIPI_DCS_SOFT_RESET)) {
-		/*TODO: replace it with msleep later*/
 		mdelay(5);
 	}
 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2018-10-02 10:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-01 15:36 [PATCH] drm: gma500: Replace 120ms mdelay calls in mdfld_dsi_pkg_sender.c Phillip Potter
2018-10-02  7:52 ` Patrik Jakobsson
2018-10-02  8:23   ` Phillip Potter
2018-10-02 10:42     ` Patrik Jakobsson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.