1
0
Fork 0
alistair23-linux/drivers/gpu/drm/vmwgfx
Jason Gunthorpe d901b2760d lib/scatterlist: Provide a DMA page iterator
Commit 2db76d7c3c ("lib/scatterlist: sg_page_iter: support sg lists w/o
backing pages") introduced the sg_page_iter_dma_address() function without
providing a way to use it in the general case. If the sg_dma_len() is not
equal to the sg length callers cannot safely use the
for_each_sg_page/sg_page_iter_dma_address combination.

Resolve this API mistake by providing a DMA specific iterator,
for_each_sg_dma_page(), that uses the right length so
sg_page_iter_dma_address() works as expected with all sglists.

A new iterator type is introduced to provide compile-time safety against
wrongly mixing accessors and iterators.

Acked-by: Christoph Hellwig <hch@lst.de> (for scatterlist)
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> (ipu3-cio2)
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-02-11 15:02:33 -07:00
..
device_include Merge tag 'vmwgfx-next-4.19-3' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-07-10 11:13:39 +10:00
Kconfig drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
Makefile drm/vmwgfx: Add a validation module v2 2018-09-27 15:21:35 +02:00
ttm_lock.c drm/vmwgfx: Make the object handles idr-generated 2018-09-27 16:14:18 +02:00
ttm_lock.h drm/ttm, drm/vmwgfx: Move the lock- and object functionality to the vmwgfx driver 2018-09-27 15:19:20 +02:00
ttm_object.c drm/vmwgfx: Look up objects without taking a reference 2018-09-27 16:14:48 +02:00
ttm_object.h drm/vmwgfx: Look up objects without taking a reference 2018-09-27 16:14:48 +02:00
vmwgfx_binding.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_binding.h drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_blit.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_bo.c drm/vmwgfx: Look up user buffer objects without taking a reference 2018-09-28 08:57:07 +02:00
vmwgfx_cmdbuf.c drm/vmwgfx: Replace unconditional mutex unlocked warnings with lockdep counterpart 2018-09-27 15:21:37 +02:00
vmwgfx_cmdbuf_res.c drm/vmwgfx: Don't refcount command-buffer managed resource lookups during command buffer validation 2018-09-28 08:57:08 +02:00
vmwgfx_context.c drm/vmwgfx: Don't refcount cotable lookups during command buffer validation 2018-09-28 08:57:08 +02:00
vmwgfx_cotable.c drm/vmwgfx: Remove the resource avail field 2018-09-27 15:21:37 +02:00
vmwgfx_drv.c IOMMU Updates for Linux v4.21 2019-01-01 15:55:29 -08:00
vmwgfx_drv.h drm pull request for 4.21-rc1 2018-12-25 11:48:26 -08:00
vmwgfx_execbuf.c drm/vmwgfx: Protect from excessive execbuf kernel memory allocations v3 2018-12-13 13:04:25 +01:00
vmwgfx_fb.c drm/vmwgfx: Move buffer object related code to vmwgfx_bo.c 2018-07-03 20:33:46 +02:00
vmwgfx_fence.c drm/vmwgfx: Remove set but not used variable 'file_priv' 2018-12-05 10:09:27 +01:00
vmwgfx_fence.h drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_fifo.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_gmr.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_gmrid_manager.c Merge branch 'ida-4.19' of git://git.infradead.org/users/willy/linux-dax 2018-08-26 11:48:42 -07:00
vmwgfx_ioctl.c Merge tag 'vmwgfx-next-4.19-3' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-07-10 11:13:39 +10:00
vmwgfx_irq.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_kms.c drm/vmwgfx: Fix a layout race condition 2018-12-05 10:08:53 +01:00
vmwgfx_kms.h drm/vmwgfx: Fix up the implicit display unit handling 2018-12-05 10:08:46 +01:00
vmwgfx_ldu.c drm/vmwgfx: Fix up the implicit display unit handling 2018-12-05 10:08:46 +01:00
vmwgfx_marker.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_mob.c Merge tag 'vmwgfx-next-4.19-2' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-07-10 11:10:34 +10:00
vmwgfx_msg.c Merge tag 'vmwgfx-next-4.19-2' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-07-10 11:10:34 +10:00
vmwgfx_msg.h drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_overlay.c Merge tag 'vmwgfx-next-4.19-2' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-07-10 11:10:34 +10:00
vmwgfx_prime.c drm/ttm, drm/vmwgfx: Move the lock- and object functionality to the vmwgfx driver 2018-09-27 15:19:20 +02:00
vmwgfx_reg.h drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_resource.c drm/ttm: allow reserving more than one shared slot v3 2018-12-07 17:53:44 -05:00
vmwgfx_resource_priv.h drm/vmwgfx: Make the object handles idr-generated 2018-09-27 16:14:18 +02:00
vmwgfx_scrn.c drm/vmwgfx: Use the standard atomic helpers for page-flip 2018-12-05 10:09:55 +01:00
vmwgfx_shader.c drm/vmwgfx: Don't refcount cotable lookups during command buffer validation 2018-09-28 08:57:08 +02:00
vmwgfx_simple_resource.c drm/vmwgfx: Make the object handles idr-generated 2018-09-27 16:14:18 +02:00
vmwgfx_so.c drm/vmwgfx: Don't refcount cotable lookups during command buffer validation 2018-09-28 08:57:08 +02:00
vmwgfx_so.h drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_stdu.c drm/vmwgfx: Use the standard atomic helpers for page-flip 2018-12-05 10:09:55 +01:00
vmwgfx_surface.c Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-10-04 10:19:33 +10:00
vmwgfx_ttm_buffer.c lib/scatterlist: Provide a DMA page iterator 2019-02-11 15:02:33 -07:00
vmwgfx_ttm_glue.c drm pull request for 4.21-rc1 2018-12-25 11:48:26 -08:00
vmwgfx_va.c drm/vmwgfx: add SPDX idenitifier and clarify license 2018-06-29 15:28:48 -05:00
vmwgfx_validation.c drm pull request for 4.21-rc1 2018-12-25 11:48:26 -08:00
vmwgfx_validation.h drm/vmwgfx: Protect from excessive execbuf kernel memory allocations v3 2018-12-13 13:04:25 +01:00