[RFC 2/4] accel/ivpu: Fix locking in ivpu_bo_remove_all_bos_from_context()

Jeffrey Hugo quic_jhugo at quicinc.com
Mon Sep 11 15:21:03 UTC 2023


On 9/1/2023 10:48 AM, Stanislaw Gruszka wrote:
> From: Jacek Lawrynowicz <jacek.lawrynowicz at linux.intel.com>
> 
> ivpu_bo_remove_all_bos_from_context() could race with ivpu_bo_free()
> when prime buffer was closed after vpu device was closed.
> 
> Move the bo_list from context to vdev and use a dedicated lock to
> sync it. This list is not modified when BO is added/removed from
> a context.
> 
> Also rename ivpu_bo_free_vpu_addr() to ivpu_bo_unbind() because this
> function does more then just free vpu_addr.
> 
> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz 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