drm/i915/guc: use for_each_engine_id() where appropriate
authorDave Gordon <david.s.gordon@intel.com>
Tue, 9 Aug 2016 14:19:22 +0000 (15:19 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 10 Aug 2016 09:40:05 +0000 (10:40 +0100)
commitc18468c4b2dbf08854dba4f041c8c1845bf0cc9c
tree5702381f0e41cb4af0e8c88bae29ea2c5a8ff5d3
parente02757d91f7481093742bb32385567499a59354c
drm/i915/guc: use for_each_engine_id() where appropriate

Now that host structures are indexed by host engine-id rather than
guc_id, we can usefully convert some for_each_engine() loops to use
for_each_engine_id() and avoid multiple dereferences of engine->id.

Also a few related tweaks to cache structure members locally wherever
they're used more than once or twice, hopefully eliminating memory
references.

Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_guc_submission.c