diff options
author | Christian König <christian.koenig@amd.com> | 2018-05-28 07:34:01 -0400 |
---|---|---|
committer | Christian König <easy2remember.chk@googlemail.com> | 2018-06-20 09:59:34 -0400 |
commit | f664a52695429b68afb4e130a0f69cd5fd1fec86 (patch) | |
tree | 3d16603cc6349636f191c027a517a7539adc8545 | |
parent | a19741e5e5a9f1f02f8e3c037bde7d73d4bfae9c (diff) |
dma-buf: remove kmap_atomic interface
Neither used nor correctly implemented anywhere. Just completely remove
the interface.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/226645/
-rw-r--r-- | drivers/dma-buf/dma-buf.c | 54 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/armada/armada_gem.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_prime.c | 31 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_dmabuf.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/selftests/mock_dmabuf.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/tegra/gem.c | 14 | ||||
-rw-r--r-- | drivers/gpu/drm/udl/udl_dmabuf.c | 17 | ||||
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_prime.c | 13 | ||||
-rw-r--r-- | drivers/media/common/videobuf2/videobuf2-dma-contig.c | 1 | ||||
-rw-r--r-- | drivers/media/common/videobuf2/videobuf2-dma-sg.c | 1 | ||||
-rw-r--r-- | drivers/media/common/videobuf2/videobuf2-vmalloc.c | 1 | ||||
-rw-r--r-- | drivers/staging/android/ion/ion.c | 2 | ||||
-rw-r--r-- | drivers/tee/tee_shm.c | 6 | ||||
-rw-r--r-- | include/drm/drm_prime.h | 4 | ||||
-rw-r--r-- | include/linux/dma-buf.h | 4 |
17 files changed, 2 insertions, 165 deletions
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 50771063c617..13884474d158 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c | |||
@@ -405,7 +405,6 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info) | |||
405 | || !exp_info->ops->map_dma_buf | 405 | || !exp_info->ops->map_dma_buf |
406 | || !exp_info->ops->unmap_dma_buf | 406 | || !exp_info->ops->unmap_dma_buf |
407 | || !exp_info->ops->release | 407 | || !exp_info->ops->release |
408 | || !exp_info->ops->map_atomic | ||
409 | || !exp_info->ops->map | 408 | || !exp_info->ops->map |
410 | || !exp_info->ops->mmap)) { | 409 | || !exp_info->ops->mmap)) { |
411 | return ERR_PTR(-EINVAL); | 410 | return ERR_PTR(-EINVAL); |
@@ -687,26 +686,14 @@ EXPORT_SYMBOL_GPL(dma_buf_unmap_attachment); | |||
687 | * void \*dma_buf_kmap(struct dma_buf \*, unsigned long); | 686 | * void \*dma_buf_kmap(struct dma_buf \*, unsigned long); |
688 | * void dma_buf_kunmap(struct dma_buf \*, unsigned long, void \*); | 687 | * void dma_buf_kunmap(struct dma_buf \*, unsigned long, void \*); |
689 | * | 688 | * |
690 | * There are also atomic variants of these interfaces. Like for kmap they | 689 | * Implementing the functions is optional for exporters and for importers all |
691 | * facilitate non-blocking fast-paths. Neither the importer nor the exporter | 690 | * the restrictions of using kmap apply. |
692 | * (in the callback) is allowed to block when using these. | ||
693 | * | ||
694 | * Interfaces:: | ||
695 | * void \*dma_buf_kmap_atomic(struct dma_buf \*, unsigned long); | ||
696 | * void dma_buf_kunmap_atomic(struct dma_buf \*, unsigned long, void \*); | ||
697 | * | ||
698 | * For importers all the restrictions of using kmap apply, like the limited | ||
699 | * supply of kmap_atomic slots. Hence an importer shall only hold onto at | ||
700 | * max 2 atomic dma_buf kmaps at the same time (in any given process context). | ||
701 | * | 691 | * |
702 | * dma_buf kmap calls outside of the range specified in begin_cpu_access are | 692 | * dma_buf kmap calls outside of the range specified in begin_cpu_access are |
703 | * undefined. If the range is not PAGE_SIZE aligned, kmap needs to succeed on | 693 | * undefined. If the range is not PAGE_SIZE aligned, kmap needs to succeed on |
704 | * the partial chunks at the beginning and end but may return stale or bogus | 694 | * the partial chunks at the beginning and end but may return stale or bogus |
705 | * data outside of the range (in these partial chunks). | 695 | * data outside of the range (in these partial chunks). |
706 | * | 696 | * |
707 | * Note that these calls need to always succeed. The exporter needs to | ||
708 | * complete any preparations that might fail in begin_cpu_access. | ||
709 | * | ||
710 | * For some cases the overhead of kmap can be too high, a vmap interface | 697 | * For some cases the overhead of kmap can be too high, a vmap interface |
711 | * is introduced. This interface should be used very carefully, as vmalloc | 698 | * is introduced. This interface should be used very carefully, as vmalloc |
712 | * space is a limited resources on many architectures. | 699 | * space is a limited resources on many architectures. |
@@ -860,43 +847,6 @@ int dma_buf_end_cpu_access(struct dma_buf *dmabuf, | |||
860 | EXPORT_SYMBOL_GPL(dma_buf_end_cpu_access); | 847 | EXPORT_SYMBOL_GPL(dma_buf_end_cpu_access); |
861 | 848 | ||
862 | /** | 849 | /** |
863 | * dma_buf_kmap_atomic - Map a page of the buffer object into kernel address | ||
864 | * space. The same restrictions as for kmap_atomic and friends apply. | ||
865 | * @dmabuf: [in] buffer to map page from. | ||
866 | * @page_num: [in] page in PAGE_SIZE units to map. | ||
867 | * | ||
868 | * This call must always succeed, any necessary preparations that might fail | ||
869 | * need to be done in begin_cpu_access. | ||
870 | */ | ||
871 | void *dma_buf_kmap_atomic(struct dma_buf *dmabuf, unsigned long page_num) | ||
872 | { | ||
873 | WARN_ON(!dmabuf); | ||
874 | |||
875 | if (!dmabuf->ops->map_atomic) | ||
876 | return NULL; | ||
877 | return dmabuf->ops->map_atomic(dmabuf, page_num); | ||
878 | } | ||
879 | EXPORT_SYMBOL_GPL(dma_buf_kmap_atomic); | ||
880 | |||
881 | /** | ||
882 | * dma_buf_kunmap_atomic - Unmap a page obtained by dma_buf_kmap_atomic. | ||
883 | * @dmabuf: [in] buffer to unmap page from. | ||
884 | * @page_num: [in] page in PAGE_SIZE units to unmap. | ||
885 | * @vaddr: [in] kernel space pointer obtained from dma_buf_kmap_atomic. | ||
886 | * | ||
887 | * This call must always succeed. | ||
888 | */ | ||
889 | void dma_buf_kunmap_atomic(struct dma_buf *dmabuf, unsigned long page_num, | ||
890 | void *vaddr) | ||
891 | { | ||
892 | WARN_ON(!dmabuf); | ||
893 | |||
894 | if (dmabuf->ops->unmap_atomic) | ||
895 | dmabuf->ops->unmap_atomic(dmabuf, page_num, vaddr); | ||
896 | } | ||
897 | EXPORT_SYMBOL_GPL(dma_buf_kunmap_atomic); | ||
898 | |||
899 | /** | ||
900 | * dma_buf_kmap - Map a page of the buffer object into kernel address space. The | 850 | * dma_buf_kmap - Map a page of the buffer object into kernel address space. The |
901 | * same restrictions as for kmap and friends apply. | 851 | * same restrictions as for kmap and friends apply. |
902 | * @dmabuf: [in] buffer to map page from. | 852 | * @dmabuf: [in] buffer to map page from. |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c index bbbb4f9578db..0558da049827 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | |||
@@ -238,9 +238,7 @@ static const struct dma_buf_ops amdgpu_dmabuf_ops = { | |||
238 | .release = drm_gem_dmabuf_release, | 238 | .release = drm_gem_dmabuf_release, |
239 | .begin_cpu_access = amdgpu_gem_begin_cpu_access, | 239 | .begin_cpu_access = amdgpu_gem_begin_cpu_access, |
240 | .map = drm_gem_dmabuf_kmap, | 240 | .map = drm_gem_dmabuf_kmap, |
241 | .map_atomic = drm_gem_dmabuf_kmap_atomic, | ||
242 | .unmap = drm_gem_dmabuf_kunmap, | 241 | .unmap = drm_gem_dmabuf_kunmap, |
243 | .unmap_atomic = drm_gem_dmabuf_kunmap_atomic, | ||
244 | .mmap = drm_gem_dmabuf_mmap, | 242 | .mmap = drm_gem_dmabuf_mmap, |
245 | .vmap = drm_gem_dmabuf_vmap, | 243 | .vmap = drm_gem_dmabuf_vmap, |
246 | .vunmap = drm_gem_dmabuf_vunmap, | 244 | .vunmap = drm_gem_dmabuf_vunmap, |
diff --git a/drivers/gpu/drm/armada/armada_gem.c b/drivers/gpu/drm/armada/armada_gem.c index a97f509743a5..3fb37c75c065 100644 --- a/drivers/gpu/drm/armada/armada_gem.c +++ b/drivers/gpu/drm/armada/armada_gem.c | |||
@@ -490,8 +490,6 @@ static const struct dma_buf_ops armada_gem_prime_dmabuf_ops = { | |||
490 | .map_dma_buf = armada_gem_prime_map_dma_buf, | 490 | .map_dma_buf = armada_gem_prime_map_dma_buf, |
491 | .unmap_dma_buf = armada_gem_prime_unmap_dma_buf, | 491 | .unmap_dma_buf = armada_gem_prime_unmap_dma_buf, |
492 | .release = drm_gem_dmabuf_release, | 492 | .release = drm_gem_dmabuf_release, |
493 | .map_atomic = armada_gem_dmabuf_no_kmap, | ||
494 | .unmap_atomic = armada_gem_dmabuf_no_kunmap, | ||
495 | .map = armada_gem_dmabuf_no_kmap, | 493 | .map = armada_gem_dmabuf_no_kmap, |
496 | .unmap = armada_gem_dmabuf_no_kunmap, | 494 | .unmap = armada_gem_dmabuf_no_kunmap, |
497 | .mmap = armada_gem_dmabuf_mmap, | 495 | .mmap = armada_gem_dmabuf_mmap, |
diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c index 0055d919070c..186db2e4c57a 100644 --- a/drivers/gpu/drm/drm_prime.c +++ b/drivers/gpu/drm/drm_prime.c | |||
@@ -434,35 +434,6 @@ void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr) | |||
434 | EXPORT_SYMBOL(drm_gem_dmabuf_vunmap); | 434 | EXPORT_SYMBOL(drm_gem_dmabuf_vunmap); |
435 | 435 | ||
436 | /** | 436 | /** |
437 | * drm_gem_dmabuf_kmap_atomic - map_atomic implementation for GEM | ||
438 | * @dma_buf: buffer to be mapped | ||
439 | * @page_num: page number within the buffer | ||
440 | * | ||
441 | * Not implemented. This can be used as the &dma_buf_ops.map_atomic callback. | ||
442 | */ | ||
443 | void *drm_gem_dmabuf_kmap_atomic(struct dma_buf *dma_buf, | ||
444 | unsigned long page_num) | ||
445 | { | ||
446 | return NULL; | ||
447 | } | ||
448 | EXPORT_SYMBOL(drm_gem_dmabuf_kmap_atomic); | ||
449 | |||
450 | /** | ||
451 | * drm_gem_dmabuf_kunmap_atomic - unmap_atomic implementation for GEM | ||
452 | * @dma_buf: buffer to be unmapped | ||
453 | * @page_num: page number within the buffer | ||
454 | * @addr: virtual address of the buffer | ||
455 | * | ||
456 | * Not implemented. This can be used as the &dma_buf_ops.unmap_atomic callback. | ||
457 | */ | ||
458 | void drm_gem_dmabuf_kunmap_atomic(struct dma_buf *dma_buf, | ||
459 | unsigned long page_num, void *addr) | ||
460 | { | ||
461 | |||
462 | } | ||
463 | EXPORT_SYMBOL(drm_gem_dmabuf_kunmap_atomic); | ||
464 | |||
465 | /** | ||
466 | * drm_gem_dmabuf_kmap - map implementation for GEM | 437 | * drm_gem_dmabuf_kmap - map implementation for GEM |
467 | * @dma_buf: buffer to be mapped | 438 | * @dma_buf: buffer to be mapped |
468 | * @page_num: page number within the buffer | 439 | * @page_num: page number within the buffer |
@@ -519,9 +490,7 @@ static const struct dma_buf_ops drm_gem_prime_dmabuf_ops = { | |||
519 | .unmap_dma_buf = drm_gem_unmap_dma_buf, | 490 | .unmap_dma_buf = drm_gem_unmap_dma_buf, |
520 | .release = drm_gem_dmabuf_release, | 491 | .release = drm_gem_dmabuf_release, |
521 | .map = drm_gem_dmabuf_kmap, | 492 | .map = drm_gem_dmabuf_kmap, |
522 | .map_atomic = drm_gem_dmabuf_kmap_atomic, | ||
523 | .unmap = drm_gem_dmabuf_kunmap, | 493 | .unmap = drm_gem_dmabuf_kunmap, |
524 | .unmap_atomic = drm_gem_dmabuf_kunmap_atomic, | ||
525 | .mmap = drm_gem_dmabuf_mmap, | 494 | .mmap = drm_gem_dmabuf_mmap, |
526 | .vmap = drm_gem_dmabuf_vmap, | 495 | .vmap = drm_gem_dmabuf_vmap, |
527 | .vunmap = drm_gem_dmabuf_vunmap, | 496 | .vunmap = drm_gem_dmabuf_vunmap, |
diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/i915_gem_dmabuf.c index 69a7aec49e84..82e2ca17a441 100644 --- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c +++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c | |||
@@ -111,15 +111,6 @@ static void i915_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr) | |||
111 | i915_gem_object_unpin_map(obj); | 111 | i915_gem_object_unpin_map(obj); |
112 | } | 112 | } |
113 | 113 | ||
114 | static void *i915_gem_dmabuf_kmap_atomic(struct dma_buf *dma_buf, unsigned long page_num) | ||
115 | { | ||
116 | return NULL; | ||
117 | } | ||
118 | |||
119 | static void i915_gem_dmabuf_kunmap_atomic(struct dma_buf *dma_buf, unsigned long page_num, void *addr) | ||
120 | { | ||
121 | |||
122 | } | ||
123 | static void *i915_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num) | 114 | static void *i915_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num) |
124 | { | 115 | { |
125 | struct drm_i915_gem_object *obj = dma_buf_to_obj(dma_buf); | 116 | struct drm_i915_gem_object *obj = dma_buf_to_obj(dma_buf); |
@@ -225,9 +216,7 @@ static const struct dma_buf_ops i915_dmabuf_ops = { | |||
225 | .unmap_dma_buf = i915_gem_unmap_dma_buf, | 216 | .unmap_dma_buf = i915_gem_unmap_dma_buf, |
226 | .release = drm_gem_dmabuf_release, | 217 | .release = drm_gem_dmabuf_release, |
227 | .map = i915_gem_dmabuf_kmap, | 218 | .map = i915_gem_dmabuf_kmap, |
228 | .map_atomic = i915_gem_dmabuf_kmap_atomic, | ||
229 | .unmap = i915_gem_dmabuf_kunmap, | 219 | .unmap = i915_gem_dmabuf_kunmap, |
230 | .unmap_atomic = i915_gem_dmabuf_kunmap_atomic, | ||
231 | .mmap = i915_gem_dmabuf_mmap, | 220 | .mmap = i915_gem_dmabuf_mmap, |
232 | .vmap = i915_gem_dmabuf_vmap, | 221 | .vmap = i915_gem_dmabuf_vmap, |
233 | .vunmap = i915_gem_dmabuf_vunmap, | 222 | .vunmap = i915_gem_dmabuf_vunmap, |
diff --git a/drivers/gpu/drm/i915/selftests/mock_dmabuf.c b/drivers/gpu/drm/i915/selftests/mock_dmabuf.c index 302f7d103635..f81fda8ea45e 100644 --- a/drivers/gpu/drm/i915/selftests/mock_dmabuf.c +++ b/drivers/gpu/drm/i915/selftests/mock_dmabuf.c | |||
@@ -130,9 +130,7 @@ static const struct dma_buf_ops mock_dmabuf_ops = { | |||
130 | .unmap_dma_buf = mock_unmap_dma_buf, | 130 | .unmap_dma_buf = mock_unmap_dma_buf, |
131 | .release = mock_dmabuf_release, | 131 | .release = mock_dmabuf_release, |
132 | .map = mock_dmabuf_kmap, | 132 | .map = mock_dmabuf_kmap, |
133 | .map_atomic = mock_dmabuf_kmap_atomic, | ||
134 | .unmap = mock_dmabuf_kunmap, | 133 | .unmap = mock_dmabuf_kunmap, |
135 | .unmap_atomic = mock_dmabuf_kunmap_atomic, | ||
136 | .mmap = mock_dmabuf_mmap, | 134 | .mmap = mock_dmabuf_mmap, |
137 | .vmap = mock_dmabuf_vmap, | 135 | .vmap = mock_dmabuf_vmap, |
138 | .vunmap = mock_dmabuf_vunmap, | 136 | .vunmap = mock_dmabuf_vunmap, |
diff --git a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c index 8e41d649e248..1a073f9b2834 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c +++ b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | |||
@@ -148,8 +148,6 @@ static const struct dma_buf_ops omap_dmabuf_ops = { | |||
148 | .release = drm_gem_dmabuf_release, | 148 | .release = drm_gem_dmabuf_release, |
149 | .begin_cpu_access = omap_gem_dmabuf_begin_cpu_access, | 149 | .begin_cpu_access = omap_gem_dmabuf_begin_cpu_access, |
150 | .end_cpu_access = omap_gem_dmabuf_end_cpu_access, | 150 | .end_cpu_access = omap_gem_dmabuf_end_cpu_access, |
151 | .map_atomic = omap_gem_dmabuf_kmap_atomic, | ||
152 | .unmap_atomic = omap_gem_dmabuf_kunmap_atomic, | ||
153 | .map = omap_gem_dmabuf_kmap, | 151 | .map = omap_gem_dmabuf_kmap, |
154 | .unmap = omap_gem_dmabuf_kunmap, | 152 | .unmap = omap_gem_dmabuf_kunmap, |
155 | .mmap = omap_gem_dmabuf_mmap, | 153 | .mmap = omap_gem_dmabuf_mmap, |
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c index 8b0b4ff64bb4..d7661702c11c 100644 --- a/drivers/gpu/drm/tegra/gem.c +++ b/drivers/gpu/drm/tegra/gem.c | |||
@@ -596,18 +596,6 @@ static int tegra_gem_prime_end_cpu_access(struct dma_buf *buf, | |||
596 | return 0; | 596 | return 0; |
597 | } | 597 | } |
598 | 598 | ||
599 | static void *tegra_gem_prime_kmap_atomic(struct dma_buf *buf, | ||
600 | unsigned long page) | ||
601 | { | ||
602 | return NULL; | ||
603 | } | ||
604 | |||
605 | static void tegra_gem_prime_kunmap_atomic(struct dma_buf *buf, | ||
606 | unsigned long page, | ||
607 | void *addr) | ||
608 | { | ||
609 | } | ||
610 | |||
611 | static void *tegra_gem_prime_kmap(struct dma_buf *buf, unsigned long page) | 599 | static void *tegra_gem_prime_kmap(struct dma_buf *buf, unsigned long page) |
612 | { | 600 | { |
613 | return NULL; | 601 | return NULL; |
@@ -648,8 +636,6 @@ static const struct dma_buf_ops tegra_gem_prime_dmabuf_ops = { | |||
648 | .release = tegra_gem_prime_release, | 636 | .release = tegra_gem_prime_release, |
649 | .begin_cpu_access = tegra_gem_prime_begin_cpu_access, | 637 | .begin_cpu_access = tegra_gem_prime_begin_cpu_access, |
650 | .end_cpu_access = tegra_gem_prime_end_cpu_access, | 638 | .end_cpu_access = tegra_gem_prime_end_cpu_access, |
651 | .map_atomic = tegra_gem_prime_kmap_atomic, | ||
652 | .unmap_atomic = tegra_gem_prime_kunmap_atomic, | ||
653 | .map = tegra_gem_prime_kmap, | 639 | .map = tegra_gem_prime_kmap, |
654 | .unmap = tegra_gem_prime_kunmap, | 640 | .unmap = tegra_gem_prime_kunmap, |
655 | .mmap = tegra_gem_prime_mmap, | 641 | .mmap = tegra_gem_prime_mmap, |
diff --git a/drivers/gpu/drm/udl/udl_dmabuf.c b/drivers/gpu/drm/udl/udl_dmabuf.c index 91ae60309d3e..556f62662aa9 100644 --- a/drivers/gpu/drm/udl/udl_dmabuf.c +++ b/drivers/gpu/drm/udl/udl_dmabuf.c | |||
@@ -157,27 +157,12 @@ static void *udl_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num) | |||
157 | return NULL; | 157 | return NULL; |
158 | } | 158 | } |
159 | 159 | ||
160 | static void *udl_dmabuf_kmap_atomic(struct dma_buf *dma_buf, | ||
161 | unsigned long page_num) | ||
162 | { | ||
163 | /* TODO */ | ||
164 | |||
165 | return NULL; | ||
166 | } | ||
167 | |||
168 | static void udl_dmabuf_kunmap(struct dma_buf *dma_buf, | 160 | static void udl_dmabuf_kunmap(struct dma_buf *dma_buf, |
169 | unsigned long page_num, void *addr) | 161 | unsigned long page_num, void *addr) |
170 | { | 162 | { |
171 | /* TODO */ | 163 | /* TODO */ |
172 | } | 164 | } |
173 | 165 | ||
174 | static void udl_dmabuf_kunmap_atomic(struct dma_buf *dma_buf, | ||
175 | unsigned long page_num, | ||
176 | void *addr) | ||
177 | { | ||
178 | /* TODO */ | ||
179 | } | ||
180 | |||
181 | static int udl_dmabuf_mmap(struct dma_buf *dma_buf, | 166 | static int udl_dmabuf_mmap(struct dma_buf *dma_buf, |
182 | struct vm_area_struct *vma) | 167 | struct vm_area_struct *vma) |
183 | { | 168 | { |
@@ -192,9 +177,7 @@ static const struct dma_buf_ops udl_dmabuf_ops = { | |||
192 | .map_dma_buf = udl_map_dma_buf, | 177 | .map_dma_buf = udl_map_dma_buf, |
193 | .unmap_dma_buf = udl_unmap_dma_buf, | 178 | .unmap_dma_buf = udl_unmap_dma_buf, |
194 | .map = udl_dmabuf_kmap, | 179 | .map = udl_dmabuf_kmap, |
195 | .map_atomic = udl_dmabuf_kmap_atomic, | ||
196 | .unmap = udl_dmabuf_kunmap, | 180 | .unmap = udl_dmabuf_kunmap, |
197 | .unmap_atomic = udl_dmabuf_kunmap_atomic, | ||
198 | .mmap = udl_dmabuf_mmap, | 181 | .mmap = udl_dmabuf_mmap, |
199 | .release = drm_gem_dmabuf_release, | 182 | .release = drm_gem_dmabuf_release, |
200 | }; | 183 | }; |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_prime.c b/drivers/gpu/drm/vmwgfx/vmwgfx_prime.c index fbffb37ccf42..373bc6da2f84 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_prime.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_prime.c | |||
@@ -71,17 +71,6 @@ static void vmw_prime_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr) | |||
71 | { | 71 | { |
72 | } | 72 | } |
73 | 73 | ||
74 | static void *vmw_prime_dmabuf_kmap_atomic(struct dma_buf *dma_buf, | ||
75 | unsigned long page_num) | ||
76 | { | ||
77 | return NULL; | ||
78 | } | ||
79 | |||
80 | static void vmw_prime_dmabuf_kunmap_atomic(struct dma_buf *dma_buf, | ||
81 | unsigned long page_num, void *addr) | ||
82 | { | ||
83 | |||
84 | } | ||
85 | static void *vmw_prime_dmabuf_kmap(struct dma_buf *dma_buf, | 74 | static void *vmw_prime_dmabuf_kmap(struct dma_buf *dma_buf, |
86 | unsigned long page_num) | 75 | unsigned long page_num) |
87 | { | 76 | { |
@@ -108,9 +97,7 @@ const struct dma_buf_ops vmw_prime_dmabuf_ops = { | |||
108 | .unmap_dma_buf = vmw_prime_unmap_dma_buf, | 97 | .unmap_dma_buf = vmw_prime_unmap_dma_buf, |
109 | .release = NULL, | 98 | .release = NULL, |
110 | .map = vmw_prime_dmabuf_kmap, | 99 | .map = vmw_prime_dmabuf_kmap, |
111 | .map_atomic = vmw_prime_dmabuf_kmap_atomic, | ||
112 | .unmap = vmw_prime_dmabuf_kunmap, | 100 | .unmap = vmw_prime_dmabuf_kunmap, |
113 | .unmap_atomic = vmw_prime_dmabuf_kunmap_atomic, | ||
114 | .mmap = vmw_prime_dmabuf_mmap, | 101 | .mmap = vmw_prime_dmabuf_mmap, |
115 | .vmap = vmw_prime_dmabuf_vmap, | 102 | .vmap = vmw_prime_dmabuf_vmap, |
116 | .vunmap = vmw_prime_dmabuf_vunmap, | 103 | .vunmap = vmw_prime_dmabuf_vunmap, |
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c index 12d0072c52c2..aff0ab7bf83d 100644 --- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c +++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c | |||
@@ -358,7 +358,6 @@ static const struct dma_buf_ops vb2_dc_dmabuf_ops = { | |||
358 | .map_dma_buf = vb2_dc_dmabuf_ops_map, | 358 | .map_dma_buf = vb2_dc_dmabuf_ops_map, |
359 | .unmap_dma_buf = vb2_dc_dmabuf_ops_unmap, | 359 | .unmap_dma_buf = vb2_dc_dmabuf_ops_unmap, |
360 | .map = vb2_dc_dmabuf_ops_kmap, | 360 | .map = vb2_dc_dmabuf_ops_kmap, |
361 | .map_atomic = vb2_dc_dmabuf_ops_kmap, | ||
362 | .vmap = vb2_dc_dmabuf_ops_vmap, | 361 | .vmap = vb2_dc_dmabuf_ops_vmap, |
363 | .mmap = vb2_dc_dmabuf_ops_mmap, | 362 | .mmap = vb2_dc_dmabuf_ops_mmap, |
364 | .release = vb2_dc_dmabuf_ops_release, | 363 | .release = vb2_dc_dmabuf_ops_release, |
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c index cf94765e593f..015e737095cd 100644 --- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c +++ b/drivers/media/common/videobuf2/videobuf2-dma-sg.c | |||
@@ -507,7 +507,6 @@ static const struct dma_buf_ops vb2_dma_sg_dmabuf_ops = { | |||
507 | .map_dma_buf = vb2_dma_sg_dmabuf_ops_map, | 507 | .map_dma_buf = vb2_dma_sg_dmabuf_ops_map, |
508 | .unmap_dma_buf = vb2_dma_sg_dmabuf_ops_unmap, | 508 | .unmap_dma_buf = vb2_dma_sg_dmabuf_ops_unmap, |
509 | .map = vb2_dma_sg_dmabuf_ops_kmap, | 509 | .map = vb2_dma_sg_dmabuf_ops_kmap, |
510 | .map_atomic = vb2_dma_sg_dmabuf_ops_kmap, | ||
511 | .vmap = vb2_dma_sg_dmabuf_ops_vmap, | 510 | .vmap = vb2_dma_sg_dmabuf_ops_vmap, |
512 | .mmap = vb2_dma_sg_dmabuf_ops_mmap, | 511 | .mmap = vb2_dma_sg_dmabuf_ops_mmap, |
513 | .release = vb2_dma_sg_dmabuf_ops_release, | 512 | .release = vb2_dma_sg_dmabuf_ops_release, |
diff --git a/drivers/media/common/videobuf2/videobuf2-vmalloc.c b/drivers/media/common/videobuf2/videobuf2-vmalloc.c index cdec023a918d..6dfbd5b05907 100644 --- a/drivers/media/common/videobuf2/videobuf2-vmalloc.c +++ b/drivers/media/common/videobuf2/videobuf2-vmalloc.c | |||
@@ -346,7 +346,6 @@ static const struct dma_buf_ops vb2_vmalloc_dmabuf_ops = { | |||
346 | .map_dma_buf = vb2_vmalloc_dmabuf_ops_map, | 346 | .map_dma_buf = vb2_vmalloc_dmabuf_ops_map, |
347 | .unmap_dma_buf = vb2_vmalloc_dmabuf_ops_unmap, | 347 | .unmap_dma_buf = vb2_vmalloc_dmabuf_ops_unmap, |
348 | .map = vb2_vmalloc_dmabuf_ops_kmap, | 348 | .map = vb2_vmalloc_dmabuf_ops_kmap, |
349 | .map_atomic = vb2_vmalloc_dmabuf_ops_kmap, | ||
350 | .vmap = vb2_vmalloc_dmabuf_ops_vmap, | 349 | .vmap = vb2_vmalloc_dmabuf_ops_vmap, |
351 | .mmap = vb2_vmalloc_dmabuf_ops_mmap, | 350 | .mmap = vb2_vmalloc_dmabuf_ops_mmap, |
352 | .release = vb2_vmalloc_dmabuf_ops_release, | 351 | .release = vb2_vmalloc_dmabuf_ops_release, |
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index e74db7902549..a5220445b5e8 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c | |||
@@ -369,8 +369,6 @@ static const struct dma_buf_ops dma_buf_ops = { | |||
369 | .detach = ion_dma_buf_detatch, | 369 | .detach = ion_dma_buf_detatch, |
370 | .begin_cpu_access = ion_dma_buf_begin_cpu_access, | 370 | .begin_cpu_access = ion_dma_buf_begin_cpu_access, |
371 | .end_cpu_access = ion_dma_buf_end_cpu_access, | 371 | .end_cpu_access = ion_dma_buf_end_cpu_access, |
372 | .map_atomic = ion_dma_buf_kmap, | ||
373 | .unmap_atomic = ion_dma_buf_kunmap, | ||
374 | .map = ion_dma_buf_kmap, | 372 | .map = ion_dma_buf_kmap, |
375 | .unmap = ion_dma_buf_kunmap, | 373 | .unmap = ion_dma_buf_kunmap, |
376 | }; | 374 | }; |
diff --git a/drivers/tee/tee_shm.c b/drivers/tee/tee_shm.c index 556960a1bab3..df4a1553b78b 100644 --- a/drivers/tee/tee_shm.c +++ b/drivers/tee/tee_shm.c | |||
@@ -80,11 +80,6 @@ static void tee_shm_op_release(struct dma_buf *dmabuf) | |||
80 | tee_shm_release(shm); | 80 | tee_shm_release(shm); |
81 | } | 81 | } |
82 | 82 | ||
83 | static void *tee_shm_op_map_atomic(struct dma_buf *dmabuf, unsigned long pgnum) | ||
84 | { | ||
85 | return NULL; | ||
86 | } | ||
87 | |||
88 | static void *tee_shm_op_map(struct dma_buf *dmabuf, unsigned long pgnum) | 83 | static void *tee_shm_op_map(struct dma_buf *dmabuf, unsigned long pgnum) |
89 | { | 84 | { |
90 | return NULL; | 85 | return NULL; |
@@ -107,7 +102,6 @@ static const struct dma_buf_ops tee_shm_dma_buf_ops = { | |||
107 | .map_dma_buf = tee_shm_op_map_dma_buf, | 102 | .map_dma_buf = tee_shm_op_map_dma_buf, |
108 | .unmap_dma_buf = tee_shm_op_unmap_dma_buf, | 103 | .unmap_dma_buf = tee_shm_op_unmap_dma_buf, |
109 | .release = tee_shm_op_release, | 104 | .release = tee_shm_op_release, |
110 | .map_atomic = tee_shm_op_map_atomic, | ||
111 | .map = tee_shm_op_map, | 105 | .map = tee_shm_op_map, |
112 | .mmap = tee_shm_op_mmap, | 106 | .mmap = tee_shm_op_mmap, |
113 | }; | 107 | }; |
diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h index ef338151cea8..d716d653b096 100644 --- a/include/drm/drm_prime.h +++ b/include/drm/drm_prime.h | |||
@@ -93,10 +93,6 @@ void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, | |||
93 | enum dma_data_direction dir); | 93 | enum dma_data_direction dir); |
94 | void *drm_gem_dmabuf_vmap(struct dma_buf *dma_buf); | 94 | void *drm_gem_dmabuf_vmap(struct dma_buf *dma_buf); |
95 | void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr); | 95 | void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr); |
96 | void *drm_gem_dmabuf_kmap_atomic(struct dma_buf *dma_buf, | ||
97 | unsigned long page_num); | ||
98 | void drm_gem_dmabuf_kunmap_atomic(struct dma_buf *dma_buf, | ||
99 | unsigned long page_num, void *addr); | ||
100 | void *drm_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num); | 96 | void *drm_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num); |
101 | void drm_gem_dmabuf_kunmap(struct dma_buf *dma_buf, unsigned long page_num, | 97 | void drm_gem_dmabuf_kunmap(struct dma_buf *dma_buf, unsigned long page_num, |
102 | void *addr); | 98 | void *addr); |
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index c0ad5bf61188..58725f890b5b 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h | |||
@@ -205,8 +205,6 @@ struct dma_buf_ops { | |||
205 | * to be restarted. | 205 | * to be restarted. |
206 | */ | 206 | */ |
207 | int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); | 207 | int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); |
208 | void *(*map_atomic)(struct dma_buf *, unsigned long); | ||
209 | void (*unmap_atomic)(struct dma_buf *, unsigned long, void *); | ||
210 | void *(*map)(struct dma_buf *, unsigned long); | 208 | void *(*map)(struct dma_buf *, unsigned long); |
211 | void (*unmap)(struct dma_buf *, unsigned long, void *); | 209 | void (*unmap)(struct dma_buf *, unsigned long, void *); |
212 | 210 | ||
@@ -394,8 +392,6 @@ int dma_buf_begin_cpu_access(struct dma_buf *dma_buf, | |||
394 | enum dma_data_direction dir); | 392 | enum dma_data_direction dir); |
395 | int dma_buf_end_cpu_access(struct dma_buf *dma_buf, | 393 | int dma_buf_end_cpu_access(struct dma_buf *dma_buf, |
396 | enum dma_data_direction dir); | 394 | enum dma_data_direction dir); |
397 | void *dma_buf_kmap_atomic(struct dma_buf *, unsigned long); | ||
398 | void dma_buf_kunmap_atomic(struct dma_buf *, unsigned long, void *); | ||
399 | void *dma_buf_kmap(struct dma_buf *, unsigned long); | 395 | void *dma_buf_kmap(struct dma_buf *, unsigned long); |
400 | void dma_buf_kunmap(struct dma_buf *, unsigned long, void *); | 396 | void dma_buf_kunmap(struct dma_buf *, unsigned long, void *); |
401 | 397 | ||