• T
    drm/i915: Fix DMA mapped scatterlist lookup · 934941ed
    Tvrtko Ursulin 提交于
    As the previous patch fixed the places where we walk the whole scatterlist
    for DMA addresses, this patch fixes the random lookup functionality.
    
    To achieve this we have to add a second lookup iterator and add a
    i915_gem_object_get_sg_dma helper, to be used analoguous to existing
    i915_gem_object_get_sg_dma. Therefore two lookup caches are maintained per
    object and they are flushed at the same point for simplicity. (Strictly
    speaking the DMA cache should be flushed from i915_gem_gtt_finish_pages,
    but today this conincides with unsetting of the pages in general.)
    
    Partial VMA view is then fixed to use the new DMA lookup and properly
    query sg length.
    
    v2:
     * Checkpatch.
    Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Matthew Auld <matthew.auld@intel.com>
    Cc: Lu Baolu <baolu.lu@linux.intel.com>
    Cc: Tom Murphy <murphyt7@tcd.ie>
    Cc: Logan Gunthorpe <logang@deltatee.com>
    Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
    Link: https://patchwork.freedesktop.org/patch/msgid/20201006092508.1064287-2-tvrtko.ursulin@linux.intel.com
    934941ed
i915_gem_object.h 15.1 KB