Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f99a614 authored by Tvrtko Ursulin's avatar Tvrtko Ursulin
Browse files

drm/i915: Do not rely on for loop caching the mask



for_each_engine_masked caches the engine mask but what does the caller
know.

Cache it explicitly for clarity and while at it correct the type to match.

Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190725125056.11942-1-tvrtko.ursulin@linux.intel.com
parent 5cca5038
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -378,12 +378,12 @@ int i915_active_acquire_preallocate_barrier(struct i915_active *ref,
					    struct intel_engine_cs *engine)
{
	struct drm_i915_private *i915 = engine->i915;
	intel_engine_mask_t tmp, mask = engine->mask;
	struct llist_node *pos, *next;
	unsigned long tmp;
	int err;

	GEM_BUG_ON(!engine->mask);
	for_each_engine_masked(engine, i915, engine->mask, tmp) {
	GEM_BUG_ON(!mask);
	for_each_engine_masked(engine, i915, mask, tmp) {
		struct intel_context *kctx = engine->kernel_context;
		struct active_node *node;