Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPSTREAM: 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: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190429220825.156644-1-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit efe2bf9) Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org> BUG=chromium:924405 TEST=glxgears in Crostini Change-Id: If4e3a085ba9569814fc3c398b1d308a56a5dcaa9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1684746 Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Dominik Behr <dbehr@chromium.org> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
- Loading branch information