]> git.baikalelectronics.ru Git - kernel.git/commit
drm/syncobj: Add a callback mechanism for replace_fence (v3)
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 28 Aug 2017 14:39:25 +0000 (07:39 -0700)
committerDave Airlie <airlied@redhat.com>
Mon, 28 Aug 2017 20:26:42 +0000 (06:26 +1000)
commit1bd21b0c5761827e02350050d745e31a9bf331cf
tree16d582e263ef5ac45a1b8987e63e4c0a47799021
parent09d3615d307a44789ead2d831651ead10b1950a0
drm/syncobj: Add a callback mechanism for replace_fence (v3)

It is useful in certain circumstances to know when the fence is replaced
in a syncobj.  Specifically, it may be useful to know when the fence
goes from NULL to something valid.  This does make syncobj_replace_fence
a little more expensive because it has to take a lock but, in the common
case where there is no callback list, it spends a very short amount of
time inside the lock.

v2:
 - Don't lock in drm_syncobj_fence_get.  We only really need to lock
   around fence_replace to make the callback work.
v3:
 - Fix the cb_list comment to make kbuild happy

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_syncobj.c
include/drm/drm_syncobj.h