drm/udl: make usage as a console safer
authorDave Airlie <airlied@redhat.com>
Thu, 7 Feb 2013 01:19:15 +0000 (11:19 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Feb 2013 13:38:34 +0000 (05:38 -0800)
commite6f2a8be594c1329e71f339d232e1df43e29482b
treed77b1d334ce7714d75bb37613b938e7f618731ff
parentd5e188ed89cc21ca2aa5245f096f08cc2770c5ad
drm/udl: make usage as a console safer

commit bcb39af4486be07e896fc374a2336bad3104ae0a upstream.

Okay you don't really want to use udl devices as your console, but if
you are unlucky enough to do so, you run into a lot of schedule while atomic
due to printk being called from all sorts of funky places. So check if we
are in an atomic context, and queue the damage for later, the next printk
should cause it to appear. This isn't ideal, but it is simple, and seems to
work okay in my testing here.

(dirty area idea came from xenfb)

fixes a bunch of sleeping while atomic issues running fbcon on udl devices.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/udl/udl_drv.h
drivers/gpu/drm/udl/udl_fb.c