]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Finish any pending operations on the framebuffer before disabling
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 3 Apr 2012 16:58:35 +0000 (17:58 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 9 Apr 2012 19:53:30 +0000 (21:53 +0200)
commit21e4765632838aecb14a3478d2dee1eac68bb9b3
tree2a26ed34eb36153d485d7f385be64aa365dc5cc8
parentdc5316191c09cf478737b2ce4fba556e5e473173
drm/i915: Finish any pending operations on the framebuffer before disabling

Similar to the case where we are changing from one framebuffer to
another, we need to be sure that there are no pending WAIT_FOR_EVENTs on
the pipe for the current framebuffer before switching. If we disable the
pipe, and then try to execute a WAIT_FOR_EVENT it will block
indefinitely and cause a GPU hang.

We attempted to fix this in commit dd8b98a9a64ac86a9600f244aa3c4b886cba02b6
(drm/i915: Retire any pending operations on the old scanout when switching)
for the case of mode switching, but this leaves the condition where we
are switching off the pipe vulnerable.

There still remains the race condition were a display may be unplugged,
switched off by the core, a uevent sent to notify the DDX and the DDX
may issue a WAIT_FOR_EVENT before it processes the uevent. This window
does not exist if the pipe is only switched off in response to the
uevent. Time to make sure that is so...

Reported-by: Francis Leblanc <Francis.Leblanc-Lebeau@verint.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36515
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45413
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
[danvet: fixup spelling in comment, noticed by Eugeni.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c