]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/fbdev: Flush mode configuration before lastclose
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 21 Jun 2016 08:16:55 +0000 (09:16 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 21 Jun 2016 08:36:56 +0000 (09:36 +0100)
commit23644f1fac7751cca6f76387a4e5ad676348b5ed
tree84723f857c24923cddaa7a64db77168b7585c858
parentcb32eadf3ac2ac3e2b15880e17b8db3a5c419cb6
drm/i915/fbdev: Flush mode configuration before lastclose

During lastclose, we call intel_fbdev_restore_mode() to switch back to
the fbcon configuration on return to VT. However, if we have not yet
finished the asynchronous fbdev initialisation, the current mode will be
invalid and trigger WARNs upon application.

Serialise with the outstanding initialisation if the first application
exits quickly. Note that to hit this in practice requires using an
unregistered async_domain as otherwise modprobe will force a full
synchronisation prior to init() completing.

v2: Reuse comment explaining the +1 by refactoring the wait on fbdev
sync in the previous patch.

Reported-by: Gustav Fägerlind <gustav.fagerlind@gmail.com>
Reported-by: "Li, Weinan Z" <weinan.z.li@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93580
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1466497015-8509-3-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_fbdev.c