Merge tag 'drm-intel-gt-next-2022-11-03' of git://anongit.freedesktop.org/drm/drm...
[linux-2.6-microblaze.git] / drivers / gpu / drm / i915 / gem / selftests / i915_gem_dmabuf.c
index aaa3d61..e57f939 100644 (file)
@@ -290,7 +290,7 @@ static int igt_dmabuf_import_same_driver(struct drm_i915_private *i915,
                goto out_import;
        }
 
-       st = dma_buf_map_attachment(import_attach, DMA_BIDIRECTIONAL);
+       st = dma_buf_map_attachment_unlocked(import_attach, DMA_BIDIRECTIONAL);
        if (IS_ERR(st)) {
                err = PTR_ERR(st);
                goto out_detach;
@@ -303,7 +303,7 @@ static int igt_dmabuf_import_same_driver(struct drm_i915_private *i915,
                timeout = -ETIME;
        }
        err = timeout > 0 ? 0 : timeout;
-       dma_buf_unmap_attachment(import_attach, st, DMA_BIDIRECTIONAL);
+       dma_buf_unmap_attachment_unlocked(import_attach, st, DMA_BIDIRECTIONAL);
 out_detach:
        dma_buf_detach(dmabuf, import_attach);
 out_import:
@@ -373,7 +373,7 @@ static int igt_dmabuf_import(void *arg)
                goto out_obj;
        }
 
-       err = dma_buf_vmap(dmabuf, &map);
+       err = dma_buf_vmap_unlocked(dmabuf, &map);
        dma_map = err ? NULL : map.vaddr;
        if (!dma_map) {
                pr_err("dma_buf_vmap failed\n");
@@ -414,7 +414,7 @@ static int igt_dmabuf_import(void *arg)
 
        err = 0;
 out_dma_map:
-       dma_buf_vunmap(dmabuf, &map);
+       dma_buf_vunmap_unlocked(dmabuf, &map);
 out_obj:
        i915_gem_object_put(obj);
 out_dmabuf:
@@ -435,7 +435,7 @@ static int igt_dmabuf_import_ownership(void *arg)
        if (IS_ERR(dmabuf))
                return PTR_ERR(dmabuf);
 
-       err = dma_buf_vmap(dmabuf, &map);
+       err = dma_buf_vmap_unlocked(dmabuf, &map);
        ptr = err ? NULL : map.vaddr;
        if (!ptr) {
                pr_err("dma_buf_vmap failed\n");
@@ -444,7 +444,7 @@ static int igt_dmabuf_import_ownership(void *arg)
        }
 
        memset(ptr, 0xc5, PAGE_SIZE);
-       dma_buf_vunmap(dmabuf, &map);
+       dma_buf_vunmap_unlocked(dmabuf, &map);
 
        obj = to_intel_bo(i915_gem_prime_import(&i915->drm, dmabuf));
        if (IS_ERR(obj)) {
@@ -495,7 +495,7 @@ static int igt_dmabuf_export_vmap(void *arg)
        }
        i915_gem_object_put(obj);
 
-       err = dma_buf_vmap(dmabuf, &map);
+       err = dma_buf_vmap_unlocked(dmabuf, &map);
        ptr = err ? NULL : map.vaddr;
        if (!ptr) {
                pr_err("dma_buf_vmap failed\n");
@@ -512,7 +512,7 @@ static int igt_dmabuf_export_vmap(void *arg)
        memset(ptr, 0xc5, dmabuf->size);
 
        err = 0;
-       dma_buf_vunmap(dmabuf, &map);
+       dma_buf_vunmap_unlocked(dmabuf, &map);
 out:
        dma_buf_put(dmabuf);
        return err;