History

dma-buf: remove kmap_atomic interface

Neither used nor correctly implemented anywhere. Just completely remove the interface.

Christian König committed 8 years ago

Commit f664a521 parent a19741e17 files · +2 −165Browse files

Unified · Split

17 files
  1. drivers/dma-buf/dma-buf.c +2 −52
  2. drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c +0 −2
  3. drivers/gpu/drm/armada/armada_gem.c +0 −2
  4. drivers/gpu/drm/drm_prime.c +0 −31
  5. drivers/gpu/drm/i915/i915_gem_dmabuf.c +0 −11
  6. drivers/gpu/drm/i915/selftests/mock_dmabuf.c +0 −2
  7. drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c +0 −2
  8. drivers/gpu/drm/tegra/gem.c +0 −14
  9. drivers/gpu/drm/udl/udl_dmabuf.c +0 −17
  10. drivers/gpu/drm/vmwgfx/vmwgfx_prime.c +0 −13
  11. drivers/media/common/videobuf2/videobuf2-dma-contig.c +0 −1
  12. drivers/media/common/videobuf2/videobuf2-dma-sg.c +0 −1
  13. drivers/media/common/videobuf2/videobuf2-vmalloc.c +0 −1
  14. drivers/staging/android/ion/ion.c +0 −2
  15. drivers/tee/tee_shm.c +0 −6
  16. include/drm/drm_prime.h +0 −4
  17. include/linux/dma-buf.h +0 −4
drivers/dma-buf/dma-buf.c+2−52
@@ -405,7 +405,6 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info) · 404 unmodified lines
405 || !exp_info->ops->map_dma_buf405 || !exp_info->ops->map_dma_buf
406 || !exp_info->ops->unmap_dma_buf406 || !exp_info->ops->unmap_dma_buf
407 || !exp_info->ops->release407 || !exp_info->ops->release
408 || !exp_info->ops->map_atomic
409 || !exp_info->ops->map408 || !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); · 275 unmodified lines
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 they689 * Implementing the functions is optional for exporters and for importers all
691 * facilitate non-blocking fast-paths. Neither the importer nor the exporter690 * 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 are692 * 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 on693 * 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 bogus694 * 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 interface697 * 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 vmalloc698 * 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.
@@ -859,43 +846,6 @@ int dma_buf_end_cpu_access(struct dma_buf *dmabuf, · 146 unmodified lines
859}846}
860EXPORT_SYMBOL_GPL(dma_buf_end_cpu_access);847EXPORT_SYMBOL_GPL(dma_buf_end_cpu_access);
861 848
862/**
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 */
871void *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}
879EXPORT_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 */
889void 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}
897EXPORT_SYMBOL_GPL(dma_buf_kunmap_atomic);
898
899/**849/**
900 * dma_buf_kmap - Map a page of the buffer object into kernel address space. The850 * 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.
drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c+0−2
@@ -238,9 +238,7 @@ static const struct dma_buf_ops amdgpu_dmabuf_ops = { · 237 unmodified lines
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,
drivers/gpu/drm/armada/armada_gem.c+0−2
@@ -490,8 +490,6 @@ static const struct dma_buf_ops armada_gem_prime_dmabuf_ops = { · 489 unmodified lines
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,
drivers/gpu/drm/drm_prime.c+0−31
@@ -433,35 +433,6 @@ void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr) · 432 unmodified lines
433}433}
434EXPORT_SYMBOL(drm_gem_dmabuf_vunmap);434EXPORT_SYMBOL(drm_gem_dmabuf_vunmap);
435 435
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 */
443void *drm_gem_dmabuf_kmap_atomic(struct dma_buf *dma_buf,
444 unsigned long page_num)
445{
446 return NULL;
447}
448EXPORT_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 */
458void drm_gem_dmabuf_kunmap_atomic(struct dma_buf *dma_buf,
459 unsigned long page_num, void *addr)
460{
461
462}
463EXPORT_SYMBOL(drm_gem_dmabuf_kunmap_atomic);
464
465/**436/**
466 * drm_gem_dmabuf_kmap - map implementation for GEM437 * drm_gem_dmabuf_kmap - map implementation for GEM
467 * @dma_buf: buffer to be mapped438 * @dma_buf: buffer to be mapped
@@ -519,9 +490,7 @@ static const struct dma_buf_ops drm_gem_prime_dmabuf_ops = { · 51 unmodified lines
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,
drivers/gpu/drm/i915/i915_gem_dmabuf.c+0−11
@@ -111,15 +111,6 @@ static void i915_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr) · 110 unmodified lines
111 i915_gem_object_unpin_map(obj);111 i915_gem_object_unpin_map(obj);
112}112}
113 113
114static void *i915_gem_dmabuf_kmap_atomic(struct dma_buf *dma_buf, unsigned long page_num)
115{
116 return NULL;
117}
118
119static void i915_gem_dmabuf_kunmap_atomic(struct dma_buf *dma_buf, unsigned long page_num, void *addr)
120{
121
122}
123static void *i915_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num)114static 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 = { · 99 unmodified lines
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,
drivers/gpu/drm/i915/selftests/mock_dmabuf.c+0−2
@@ -130,9 +130,7 @@ static const struct dma_buf_ops mock_dmabuf_ops = { · 129 unmodified lines
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,
drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c+0−2
@@ -148,8 +148,6 @@ static const struct dma_buf_ops omap_dmabuf_ops = { · 147 unmodified lines
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,
drivers/gpu/drm/tegra/gem.c+0−14
@@ -596,18 +596,6 @@ static int tegra_gem_prime_end_cpu_access(struct dma_buf *buf, · 595 unmodified lines
596 return 0;596 return 0;
597}597}
598 598
599static void *tegra_gem_prime_kmap_atomic(struct dma_buf *buf,
600 unsigned long page)
601{
602 return NULL;
603}
604
605static void tegra_gem_prime_kunmap_atomic(struct dma_buf *buf,
606 unsigned long page,
607 void *addr)
608{
609}
610
611static void *tegra_gem_prime_kmap(struct dma_buf *buf, unsigned long page)599static 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 = { · 34 unmodified lines
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,
drivers/gpu/drm/udl/udl_dmabuf.c+0−17
@@ -157,27 +157,12 @@ static void *udl_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num) · 156 unmodified lines
157 return NULL;157 return NULL;
158}158}
159 159
160static void *udl_dmabuf_kmap_atomic(struct dma_buf *dma_buf,
161 unsigned long page_num)
162{
163 /* TODO */
164
165 return NULL;
166}
167
168static void udl_dmabuf_kunmap(struct dma_buf *dma_buf,160static 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
174static void udl_dmabuf_kunmap_atomic(struct dma_buf *dma_buf,
175 unsigned long page_num,
176 void *addr)
177{
178 /* TODO */
179}
180
181static int udl_dmabuf_mmap(struct dma_buf *dma_buf,166static 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 = { · 8 unmodified lines
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};
drivers/gpu/drm/vmwgfx/vmwgfx_prime.c+0−13
@@ -71,17 +71,6 @@ static void vmw_prime_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr) · 70 unmodified lines
71{71{
72}72}
73 73
74static void *vmw_prime_dmabuf_kmap_atomic(struct dma_buf *dma_buf,
75 unsigned long page_num)
76{
77 return NULL;
78}
79
80static void vmw_prime_dmabuf_kunmap_atomic(struct dma_buf *dma_buf,
81 unsigned long page_num, void *addr)
82{
83
84}
85static void *vmw_prime_dmabuf_kmap(struct dma_buf *dma_buf,74static 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 = { · 20 unmodified lines
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,
drivers/media/common/videobuf2/videobuf2-dma-contig.c+0−1
@@ -358,7 +358,6 @@ static const struct dma_buf_ops vb2_dc_dmabuf_ops = { · 357 unmodified lines
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,
drivers/media/common/videobuf2/videobuf2-dma-sg.c+0−1
@@ -507,7 +507,6 @@ static const struct dma_buf_ops vb2_dma_sg_dmabuf_ops = { · 506 unmodified lines
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,
drivers/media/common/videobuf2/videobuf2-vmalloc.c+0−1
@@ -346,7 +346,6 @@ static const struct dma_buf_ops vb2_vmalloc_dmabuf_ops = { · 345 unmodified lines
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,
drivers/staging/android/ion/ion.c+0−2
@@ -369,8 +369,6 @@ static const struct dma_buf_ops dma_buf_ops = { · 368 unmodified lines
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};
drivers/tee/tee_shm.c+0−6
@@ -80,11 +80,6 @@ static void tee_shm_op_release(struct dma_buf *dmabuf) · 79 unmodified lines
80 tee_shm_release(shm);80 tee_shm_release(shm);
81}81}
82 82
83static void *tee_shm_op_map_atomic(struct dma_buf *dmabuf, unsigned long pgnum)
84{
85 return NULL;
86}
87
88static void *tee_shm_op_map(struct dma_buf *dmabuf, unsigned long pgnum)83static 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 = { · 16 unmodified lines
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};
include/drm/drm_prime.h+0−4
@@ -93,10 +93,6 @@ void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, · 92 unmodified lines
93 enum dma_data_direction dir);93 enum dma_data_direction dir);
94void *drm_gem_dmabuf_vmap(struct dma_buf *dma_buf);94void *drm_gem_dmabuf_vmap(struct dma_buf *dma_buf);
95void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr);95void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr);
96void *drm_gem_dmabuf_kmap_atomic(struct dma_buf *dma_buf,
97 unsigned long page_num);
98void drm_gem_dmabuf_kunmap_atomic(struct dma_buf *dma_buf,
99 unsigned long page_num, void *addr);
100void *drm_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num);96void *drm_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num);
101void drm_gem_dmabuf_kunmap(struct dma_buf *dma_buf, unsigned long page_num,97void drm_gem_dmabuf_kunmap(struct dma_buf *dma_buf, unsigned long page_num,
102 void *addr);98 void *addr);
include/linux/dma-buf.h+0−4
@@ -205,8 +205,6 @@ struct dma_buf_ops { · 204 unmodified lines
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, · 181 unmodified lines
394 enum dma_data_direction dir);392 enum dma_data_direction dir);
395int dma_buf_end_cpu_access(struct dma_buf *dma_buf,393int dma_buf_end_cpu_access(struct dma_buf *dma_buf,
396 enum dma_data_direction dir);394 enum dma_data_direction dir);
397void *dma_buf_kmap_atomic(struct dma_buf *, unsigned long);
398void dma_buf_kunmap_atomic(struct dma_buf *, unsigned long, void *);
399void *dma_buf_kmap(struct dma_buf *, unsigned long);395void *dma_buf_kmap(struct dma_buf *, unsigned long);
400void dma_buf_kunmap(struct dma_buf *, unsigned long, void *);396void dma_buf_kunmap(struct dma_buf *, unsigned long, void *);
401 397