drm/i915/gen8: Add dynamic allocation macros and helper functions
authorMichel Thierry <michel.thierry@intel.com>
Wed, 8 Apr 2015 11:13:26 +0000 (12:13 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 10 Apr 2015 06:56:09 +0000 (08:56 +0200)
commit9271d959dc03fc7514030e22280cdbd6ca763ca5
tree8f4b866ae3969cac41ce7d9bf5f161485fd3310d
parent5a8e9943528dd84315db2e9dfd7330bcbb872414
drm/i915/gen8: Add dynamic allocation macros and helper functions

Similar to gen6, we will use for_each_pde/for_each_pdpe
and pte/pde/pdpe_index to iterate over these new structures.

v2: Match trace_i915_va_teardown params
v3: Multiple rebases.
v4: Updated to use unmap_and_free_pt.
v5: teardown_va_range logic no longer needed.
v6: Rebase after s/page_tables/page_table/.
v7: Renamed commit to match what it does now (it was "Use dynamic
allocation idioms on free").
v8: Prevent (harmless) out of range access in gen8_for_each_pde and
gen8_for_each_pdpe_e.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Michel Thierry <michel.thierry@intel.com> (v2+)
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
[danvet: s/BUG/WARN/]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_gtt.h