drm: gma500: Replace 120ms mdelay calls in mdfld_dsi_pkg_sender.c
Subsystems (3)
PATCH 1/1 drm: gma500: Replace 120ms mdelay calls in mdfld_dsi_pkg_sender.c
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.
---
drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c +4 -9
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patrik Jakobsson
maintainerQuoted 11 lines · Phillip Potter
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 <[email protected]>---
drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c +0
-0
drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c static int send_pkg_prepare(struct mdfld_dsi_pkg_sender *sender, u8 data_type, · line 325
Quoted 6 lines
drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c +1
-2@@ -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 );
Hi Phillip,
This is executed while holding a spinlock so we cannot sleep here. This is true for send_pkg_done() as well.
- Patrik
Quoted 16 lines
drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c +2
-4}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 );
drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c static int send_pkg_done(struct mdfld_dsi_pkg_sender *sender, u8 data_type, · line 359
Quoted 10 lines
drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c +1
-3}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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Patrik Jakobsson
Hi Phillip,
This is executed while holding a spinlock so we cannot sleep here. This is true forsend_pkg_done()as well.- Patrik
Dear Patrik,
Oops, sorry. I'll try and be more observant in future. Just picked up on these whilst grepping the source :-)
Regards,
Phil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patrik Jakobsson
maintainerQuoted 11 lines · Phillip Potter
Quoted 5 lines · Patrik Jakobsson
Hi Phillip,
This is executed while holding a spinlock so we cannot sleep here. This is true forsend_pkg_done()as well.- Patrik
Dear Patrik,
Oops, sorry. I'll try and be more observant in future. Just picked up on these whilst grepping the source :-)
No worries, the comments are a bit misleading.
-Patrik
Quoted 3 lines
Regards,
Phil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel