diff options
author | Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> | 2023-02-02 10:21:14 +0100 |
---|---|---|
committer | Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> | 2023-02-06 09:29:03 +0100 |
commit | d20a8f409259f1782f080b434054854020878f23 (patch) | |
tree | 5040ae6d7e5454d9b00401a098e17445fe527f63 /drivers/accel/ivpu | |
parent | 62079b6f2cf1e6356c6241cbdc5defdb0d66b4fe (diff) | |
download | linux-stable-d20a8f409259f1782f080b434054854020878f23.tar.gz linux-stable-d20a8f409259f1782f080b434054854020878f23.tar.bz2 linux-stable-d20a8f409259f1782f080b434054854020878f23.zip |
accel/ivpu: Fix old dma_buf api usage
Update according to new dma-buf locking scheme.
Remove redundant WARN_ON()'s, dma_buf functions internally
have the same warnings already.
Fixes: 647371a6609d ("accel/ivpu: Add GEM buffer object management")
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230202092114.2637452-5-stanislaw.gruszka@linux.intel.com
(cherry picked from commit ec6ec9c6ca637f7678f1931cb835b2bb8ab6dfd2)
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Diffstat (limited to 'drivers/accel/ivpu')
-rw-r--r-- | drivers/accel/ivpu/ivpu_gem.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/accel/ivpu/ivpu_gem.c b/drivers/accel/ivpu/ivpu_gem.c index d1f923971b4c..01d47d3bad5b 100644 --- a/drivers/accel/ivpu/ivpu_gem.c +++ b/drivers/accel/ivpu/ivpu_gem.c @@ -42,9 +42,7 @@ static int prime_map_pages_locked(struct ivpu_bo *bo) struct ivpu_device *vdev = ivpu_bo_to_vdev(bo); struct sg_table *sgt; - WARN_ON(!bo->base.import_attach); - - sgt = dma_buf_map_attachment(bo->base.import_attach, DMA_BIDIRECTIONAL); + sgt = dma_buf_map_attachment_unlocked(bo->base.import_attach, DMA_BIDIRECTIONAL); if (IS_ERR(sgt)) { ivpu_err(vdev, "Failed to map attachment: %ld\n", PTR_ERR(sgt)); return PTR_ERR(sgt); @@ -56,9 +54,7 @@ static int prime_map_pages_locked(struct ivpu_bo *bo) static void prime_unmap_pages_locked(struct ivpu_bo *bo) { - WARN_ON(!bo->base.import_attach); - - dma_buf_unmap_attachment(bo->base.import_attach, bo->sgt, DMA_BIDIRECTIONAL); + dma_buf_unmap_attachment_unlocked(bo->base.import_attach, bo->sgt, DMA_BIDIRECTIONAL); bo->sgt = NULL; } |