archive mirror
 help / color / mirror / Atom feed
* [RFC] in_atomic() usage in amba-clcd.c / FB_ARMCLCD
@ 2021-01-27 17:44 Sebastian Andrzej Siewior
  0 siblings, 0 replies; only message in thread
From: Sebastian Andrzej Siewior @ 2021-01-27 17:44 UTC (permalink / raw)
  To: linux-fbdev, Peter Collingbourne; +Cc: Thomas Gleixner, dri-devel

The mba-clcd driver uses in_interrupt() in clcdfb_sleep():
| /*
|  * Unfortunately, the enable/disable functions may be called either from
|  * process or IRQ context, and we _need_ to delay.  This is _not_ good.
|  */
| static inline void clcdfb_sleep(unsigned int ms)
| {
|         if (in_atomic()) {
|                 mdelay(ms);
|         } else {
|                 msleep(ms);
|         }
| }

I traced it back to its initial merge:
    bfe694f833643 ("[ARM] Add ARM AMBA CLCD framebuffer driver.")

The driver has been removed and added back in the meantime. 
I've been looking for the IRQ context as described in the comment and
couldn't find it. The functions calling clcdfb_sleep() also call
conditionally backlight_update_status() which acquires a mutex.

Is this part really outdated and now msleep() could be used


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-27 17:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 17:44 [RFC] in_atomic() usage in amba-clcd.c / FB_ARMCLCD Sebastian Andrzej Siewior

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