]> git.baikalelectronics.ru Git - kernel.git/commit
drm/atomic: Integrate fence support
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 29 Oct 2014 10:34:56 +0000 (11:34 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 6 Nov 2014 20:02:22 +0000 (21:02 +0100)
commit3e688bcf5d21a87c51b466297a8b3b4b6d6a18d0
treea4397df4818daa8a5ebdf68e3b0ac88422e8b6db
parent01f6745c6ee432a44698e13bb4e9d02289cc0b7b
drm/atomic: Integrate fence support

This patch is for enabling async commits. It replaces an earlier
approach which added an async boolean paramter to the ->prepare_fb
callbacks. The idea is that prepare_fb picks up the right fence to
synchronize against, which is then used by the synchronous commit
helper. For async commits drivers can either register a callback to
the fence or simply do the synchronous wait in their async work queue.

v2: Remove unused variable.

v3: Only wait for fences after the point of no return in the part
of the commit function which can be run asynchronously. This is after
the atomic state has been swapped in, hence now check
plane->state->fence.

Also add a WARN_ON to make sure we don't try to wait on a fence when
there's no fb, just as a sanity check.

Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/drm_atomic_helper.c
include/drm/drm_crtc.h