drm: exynos: mixer: fix using usleep() in atomic context

Tobias Jakobi tjakobi at math.uni-bielefeld.de
Wed Jan 21 14:46:39 PST 2015


Hello!


Inki Dae wrote:
> The use of spin lock, reg_slock, has been used for a long time and we
> hadn't some cleanups to spin lock codes so far. The spin lock is also
> used in here and there of mixer driver. And at least, it seems that
> the use of spin lock isn't required in mixer_win_reset. I don't see
> any atomic contexts in mixer module except interrupt handler.
> 
> To Seung-Woo,
> I know that you referred to mixer codes of v4l2 based mixer driver. So
> was the spin lock used in origin v4l2 driver? or Is there any reason
> that you used the spin lock?
> 
> Anyway, we will have some testing to check hdmi and mixer drivers
> without spin lock. So we will remove or replace it with mutex if
> needed.
> 
> Thanks,
> Inki Dae

So it's some weeks later and as far as I can see there has been no
changes to the spinlock usage. Wouldn't it be better to apply this patch
_now_ (since the use of 'usleep_range' is just plain wrong while under
spinlock). When the spinlock setup gets cleaned up later, then we can
always change back to 'usleep_range' again.

Any thoughts?

With best wishes,
Tobias



More information about the dri-devel mailing list