aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_mocs.c
diff options
context:
space:
mode:
authorDave Gordon <david.s.gordon@intel.com>2016-03-23 14:19:53 -0400
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2016-03-24 10:34:06 -0400
commitc3232b1883e033e291aa3146f431b7ec87c80ec5 (patch)
tree23ddb4979bfa6c0da7b9393f254ec303102046d8 /drivers/gpu/drm/i915/intel_mocs.c
parentdb18b6a64ca3fb260858279b218b84d5c179330f (diff)
drm/i915: introduce for_each_engine_id()
Equivalent to the existing for_each_engine() macro, this will replace the latter wherever the third argument *is* actually wanted (in most places, it is not used). The third argument is renamed to emphasise that it is an engine id (type enum intel_engine_id). All the callers of the macro that actually need the third argument are updated to use this version, and the argument (generally 'i') is also updated to be 'id'. Other callers (where the third argument is unused) are untouched for now; they will be updated in the next patch. Signed-off-by: Dave Gordon <david.s.gordon@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_mocs.c')
-rw-r--r--drivers/gpu/drm/i915/intel_mocs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_mocs.c b/drivers/gpu/drm/i915/intel_mocs.c
index 3c725dde16ed..7c7ac0aa192a 100644
--- a/drivers/gpu/drm/i915/intel_mocs.c
+++ b/drivers/gpu/drm/i915/intel_mocs.c
@@ -325,11 +325,11 @@ int intel_rcs_context_init_mocs(struct drm_i915_gem_request *req)
325 if (get_mocs_settings(req->engine->dev, &t)) { 325 if (get_mocs_settings(req->engine->dev, &t)) {
326 struct drm_i915_private *dev_priv = req->i915; 326 struct drm_i915_private *dev_priv = req->i915;
327 struct intel_engine_cs *engine; 327 struct intel_engine_cs *engine;
328 enum intel_engine_id ring_id; 328 enum intel_engine_id id;
329 329
330 /* Program the control registers */ 330 /* Program the control registers */
331 for_each_engine(engine, dev_priv, ring_id) { 331 for_each_engine_id(engine, dev_priv, id) {
332 ret = emit_mocs_control_table(req, &t, ring_id); 332 ret = emit_mocs_control_table(req, &t, id);
333 if (ret) 333 if (ret)
334 return ret; 334 return ret;
335 } 335 }