Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 76787a74 authored by Chia-I Wu's avatar Chia-I Wu Committed by Alistair Delva
Browse files

BACKPORT: drm/virtio: set seqno for dma-fence



This is motivated by having meaningful ftrace events, but it also
fixes use cases where dma_fence_is_later is called, such as in
sync_file_merge.

In other drivers, fence creation and cmdbuf submission normally
happen atomically,

  mutex_lock();
  fence = dma_fence_create(..., ++timeline->seqno);
  submit_cmdbuf();
  mutex_unlock();

and have no such issue.  But in our driver, because most ioctls
queue commands into ctrlq, we do not want to grab a lock.  Instead,
we set seqno to 0 when a fence is created, and update it when the
command is finally queued and the seqno is known.

Signed-off-by: default avatarChia-I Wu <olvaffe@gmail.com>
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190429220825.156644-1-olvaffe@gmail.com


Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit efe2bf965522bf0796d413b47a2abbf81d471d6f)
Signed-off-by: default avatarGreg Hartman <ghartman@google.com>
BUG: 139386237
Change-Id: I2d865c14fa06e3a6fc86a23600c1678a39583c61
parent 7a086e51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment