Skip to content

Commit ac530e0

Browse files
committed
drm/prime: Prepare to dynamic dma-buf locking specification
Prepare DRM prime core to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Reviewed-by: Christian König <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 79e2cf2 commit ac530e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/drm_prime.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ struct drm_gem_object *drm_gem_prime_import_dev(struct drm_device *dev,
936936

937937
get_dma_buf(dma_buf);
938938

939-
sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL);
939+
sgt = dma_buf_map_attachment_unlocked(attach, DMA_BIDIRECTIONAL);
940940
if (IS_ERR(sgt)) {
941941
ret = PTR_ERR(sgt);
942942
goto fail_detach;
@@ -954,7 +954,7 @@ struct drm_gem_object *drm_gem_prime_import_dev(struct drm_device *dev,
954954
return obj;
955955

956956
fail_unmap:
957-
dma_buf_unmap_attachment(attach, sgt, DMA_BIDIRECTIONAL);
957+
dma_buf_unmap_attachment_unlocked(attach, sgt, DMA_BIDIRECTIONAL);
958958
fail_detach:
959959
dma_buf_detach(dma_buf, attach);
960960
dma_buf_put(dma_buf);
@@ -1052,7 +1052,7 @@ void drm_prime_gem_destroy(struct drm_gem_object *obj, struct sg_table *sg)
10521052

10531053
attach = obj->import_attach;
10541054
if (sg)
1055-
dma_buf_unmap_attachment(attach, sg, DMA_BIDIRECTIONAL);
1055+
dma_buf_unmap_attachment_unlocked(attach, sg, DMA_BIDIRECTIONAL);
10561056
dma_buf = attach->dmabuf;
10571057
dma_buf_detach(attach->dmabuf, attach);
10581058
/* remove the reference */

0 commit comments

Comments
 (0)