]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
dma-buf/sw_sync: Add fence deadline support
authorRob Clark <robdclark@chromium.org>
Wed, 23 Aug 2023 21:54:56 +0000 (14:54 -0700)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 1 Dec 2023 23:18:46 +0000 (01:18 +0200)
commit70e67aaec2f4706df0006423eebca813b00f5840
tree76acee6cb47f7812cc3f38b4c2a1a8664e0dc4c7
parent63ee44540205d993854f143a5ab1d7d9e63ffcf1
dma-buf/sw_sync: Add fence deadline support

This consists of simply storing the most recent deadline, and adding an
ioctl to retrieve the deadline.  This can be used in conjunction with
the SET_DEADLINE ioctl on a fence fd for testing.  Ie. create various
sw_sync fences, merge them into a fence-array, set deadline on the
fence-array and confirm that it is propagated properly to each fence.

v2: Switch UABI to express deadline as u64
v3: More verbose UAPI docs, show how to convert from timespec
v4: Better comments, track the soonest deadline, as a normal fence
    implementation would, return an error if no deadline set.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230823215458.203366-4-robdclark@gmail.com
drivers/dma-buf/sw_sync.c
drivers/dma-buf/sync_debug.h