mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-23 08:55:56 -04:00
dma-buf/dma-fence: remove unnecessary callbacks
The fence_value_str and timeline_value_str callbacks were just an unnecessary abstraction in the SW sync implementation. The only caller of those callbacks already knew that the fence in questions is a timeline_fence. So print the values directly instead of using a redirection. Additional to that remove the implementations from virtgpu and vgem. As far as I can see those were never used in the first place. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20250211163109.12200-3-christian.koenig@amd.com
This commit is contained in:
@@ -49,26 +49,10 @@ static bool virtio_gpu_fence_signaled(struct dma_fence *f)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void virtio_gpu_fence_value_str(struct dma_fence *f, char *str, int size)
|
||||
{
|
||||
snprintf(str, size, "[%llu, %llu]", f->context, f->seqno);
|
||||
}
|
||||
|
||||
static void virtio_gpu_timeline_value_str(struct dma_fence *f, char *str,
|
||||
int size)
|
||||
{
|
||||
struct virtio_gpu_fence *fence = to_virtio_gpu_fence(f);
|
||||
|
||||
snprintf(str, size, "%llu",
|
||||
(u64)atomic64_read(&fence->drv->last_fence_id));
|
||||
}
|
||||
|
||||
static const struct dma_fence_ops virtio_gpu_fence_ops = {
|
||||
.get_driver_name = virtio_gpu_get_driver_name,
|
||||
.get_timeline_name = virtio_gpu_get_timeline_name,
|
||||
.signaled = virtio_gpu_fence_signaled,
|
||||
.fence_value_str = virtio_gpu_fence_value_str,
|
||||
.timeline_value_str = virtio_gpu_timeline_value_str,
|
||||
};
|
||||
|
||||
struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device *vgdev,
|
||||
|
||||
Reference in New Issue
Block a user