]> git.baikalelectronics.ru Git - kernel.git/commit
drm/fb_helper: check whether fbcon is bound
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 17 Dec 2012 11:13:23 +0000 (12:13 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 20 Jan 2013 21:17:17 +0000 (22:17 +0100)
commite03441bc4eb2df525f9af6f5cffef51b84043b4e
tree96993a1477448059651019185c34460d6ea7a245
parent1b736171ff1ad5f749b8f365d18dd2b023bf195b
drm/fb_helper: check whether fbcon is bound

We need to make sure that the fbcon is still bound when touching the
hw, since otherwise we might corrupt the modeset state of kms clients.
X mostly works around that with VT switching and setting the VT into
raw mode, which disables most fbcon events.

Raw kms test programs though don't do that dance, and in the future
we might want to aim to abolish CONFIG_VT anyway. So improve preventive
measures a bit. To do so, extract the existing logic for handling hotplug
events (which X can't block with the current set of tricks) and reuse
it for the fbdev blanking helper.

Long-term we really need to either scrap this all and only have a OOPS
console, or come up with a saner model for device ownership sharing
between fbdev/fbcon and kms userspace.

Reviewed-by: Rob Clark <rob@ti.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_fb_helper.c