]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: s/for_each_sgt_dma/for_each_sgt_daddr/
authorMatthew Auld <matthew.auld@intel.com>
Thu, 29 Aug 2019 20:19:19 +0000 (21:19 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 29 Aug 2019 20:59:16 +0000 (21:59 +0100)
commitcd6dd2bf190acbe9a3c59eedfa3229d404bf582c
tree4d20cb75763736f9b11291bd789fa232da41e920
parentdcc3c6fe55a29d96fb0edeefe75395fccdc956ff
drm/i915: s/for_each_sgt_dma/for_each_sgt_daddr/

The sg_table for our backing store might contain addresses from
stolen-memory or in the future local-memory, at which point this is no
longer a dma-iterator. As a consequence we should now break on NULL
iter.sgp, instead of dmap == 0 which is considered an invalid dma
address.

As a bonus, gcc much prefers this construct,

  Function                                     old     new   delta
  gen8_ggtt_insert_entries                     211     192     -19
  gen6_ggtt_insert_entries                     292     262     -30
  i915_error_object_create                     996     954     -42

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190829201919.21493-1-matthew.auld@intel.com
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_gtt.h
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/i915_scatterlist.h
drivers/gpu/drm/i915/selftests/i915_vma.c