[PATCH 1/2] accel/ivpu: Add dma fence to command buffers only

Jeffrey Hugo quic_jhugo at quicinc.com
Tue Apr 4 16:26:21 UTC 2023


On 3/31/2023 5:36 AM, Stanislaw Gruszka wrote:
> From: Karol Wachowski <karol.wachowski at linux.intel.com>
> 
> Currently job->done_fence is added to every BO handle within a job. If job
> handle (command buffer) is shared between multiple submits, KMD will add
> the fence in each of them. Then bo_wait_ioctl() executed on command buffer
> will exit only when all jobs containing that handle are done.
> 
> This creates deadlock scenario for user mode driver in case when job handle
> is added as dependency of another job, because bo_wait_ioctl() of first job
> will wait until second job finishes, and second job can not finish before
> first one.
> 
> Having fences added only to job buffer handle allows user space to execute
> bo_wait_ioctl() on the job even if it's handle is submitted with other job.
> 
> Fixes: cd7272215c44 ("accel/ivpu: Add command buffer submission logic")
> Signed-off-by: Karol Wachowski <karol.wachowski at linux.intel.com>
> Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka at linux.intel.com>

Reviewed-by: Jeffrey Hugo <quic_jhugo at quicinc.com>


More information about the dri-devel mailing list