drm/i915: tweak gen6_for_{each_pde, all_pdes} macros
authorDave Gordon <david.s.gordon@intel.com>
Fri, 24 Jun 2016 18:37:46 +0000 (19:37 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Mon, 27 Jun 2016 12:13:53 +0000 (13:13 +0100)
commit731f74c5c644f113186288013e73382e20dd1d9e
tree911ae74dcd65d6512344bf0752c27f9733e84d29
parent883445d43e45ddc5ef19274a169a1aa603428ab6
drm/i915: tweak gen6_for_{each_pde, all_pdes} macros

Gen8 versions of these macros were updated a few months ago
(e8ebd8e drm/i915: eliminate 'temp' in gen8_for_each macros)
originally because at least one iterator could generate an
out of bounds access, but also because eliminating the 'temp'
parameter generated smaller and faster code.

Matthew Auld recently noticed the same problem with the gen6
versions and provided a patch
https://lists.freedesktop.org/archives/intel-gfx/2016-June/099334.html
but while we're changing these, we might as well make them as
much like the gen8 versions as possible, including the style
of using "&& (..., true)" rather than ": (..., 1) : 0", and
of course eliminating the redundant 'temp'.

Furthermore, the "all_pdes" version is only used in one place,
so we can improve code efficiency by changing both the macro
parameters and the calling code to reduce extra dereferences.

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1466793466-23500-1-git-send-email-david.s.gordon@intel.com
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_gtt.h
This page took 0.025576 seconds and 5 git commands to generate.