Files
linux-stable-mirror/include/linux
Christian KönigandGreg Kroah-Hartman d67b5a2b97 dma-buf: add dma_fence_timestamp helper
commit b83ce9cb4a upstream.

When a fence signals there is a very small race window where the timestamp
isn't updated yet. sync_file solves this by busy waiting for the
timestamp to appear, but on other ocassions didn't handled this
correctly.

Provide a dma_fence_timestamp() helper function for this and use it in
all appropriate cases.

Another alternative would be to grab the spinlock when that happens.

v2 by teddy: add a wait parameter to wait for the timestamp to show up, in case
   the accurate timestamp is needed and/or the timestamp is not based on
   ktime (e.g. hw timestamp)
v3 chk: drop the parameter again for unified handling

Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 1774baa64f ("drm/scheduler: Change scheduled fence track v2")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
CC: stable@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20230929104725.2358-1-christian.koenig@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:08:57 +02:00
..
2023-07-19 16:21:11 +02:00
2023-06-21 16:01:00 +02:00
2023-10-10 22:00:40 +02:00
2023-08-30 16:11:10 +02:00
2023-10-10 22:00:35 +02:00
2023-05-30 14:03:22 +01:00
2023-08-03 10:23:48 +02:00
2023-10-19 23:08:50 +02:00
2023-10-19 23:08:50 +02:00
2023-07-19 16:21:54 +02:00
2023-09-19 12:27:58 +02:00
2023-08-16 18:27:20 +02:00
2022-11-10 12:03:36 -07:00