[PATCH 1/3] drm/virtio: set seqno for dma-fence

Emil Velikov emil.l.velikov at gmail.com
Fri May 3 15:20:33 UTC 2019


Hi Chia-I,

On Mon, 29 Apr 2019 at 23:08, Chia-I Wu <olvaffe at gmail.com> wrote:
>
> 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 at gmail.com>

The series looks great. For the lot:
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

-Emil


More information about the dri-devel mailing list