]> git.baikalelectronics.ru Git - kernel.git/commit
lib/scatterlist: sg_page_iter: support sg lists w/o backing pages
authorImre Deak <imre.deak@intel.com>
Tue, 26 Mar 2013 13:14:18 +0000 (15:14 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 27 Mar 2013 16:13:44 +0000 (17:13 +0100)
commitbc90acb11fe97f9a4d7506959675e262c7aca3b8
treea35f01706b353841b71645da050bc721c9f0467b
parente91c6dc00819dea3a7863d148665e711372e16b4
lib/scatterlist: sg_page_iter: support sg lists w/o backing pages

The i915 driver uses sg lists for memory without backing 'struct page'
pages, similarly to other IO memory regions, setting only the DMA
address for these. It does this, so that it can program the HW MMU
tables in a uniform way both for sg lists with and without backing pages.

Without a valid page pointer we can't call nth_page to get the current
page in __sg_page_iter_next, so add a helper that relevant users can
call separately. Also add a helper to get the DMA address of the current
page (idea from Daniel).

Convert all places in i915, to use the new API.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_cache.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_dmabuf.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_tiling.c
include/linux/scatterlist.h
lib/scatterlist.c