[Intel-gfx] [PATCH 5/8] drm/i915/icl: Add reset control register changes
Chris Wilson
chris at chris-wilson.co.uk
Fri Mar 16 12:45:42 UTC 2018
Quoting Mika Kuoppala (2018-03-16 12:14:53)
> +static int gen11_reset_engines(struct drm_i915_private *dev_priv,
> + unsigned engine_mask)
> +{
> + struct intel_engine_cs *engine;
> + const u32 hw_engine_mask[I915_NUM_ENGINES] = {
> + [RCS] = GEN11_GRDOM_RENDER,
> + [BCS] = GEN11_GRDOM_BLT,
> + [VCS] = GEN11_GRDOM_MEDIA,
> + [VCS2] = GEN11_GRDOM_MEDIA2,
> + [VCS3] = GEN11_GRDOM_MEDIA3,
> + [VCS4] = GEN11_GRDOM_MEDIA4,
> + [VECS] = GEN11_GRDOM_VECS,
> + [VECS2] = GEN11_GRDOM_VECS2,
> + };
No gratuitously decorating Christmas trees.
> + u32 hw_mask;
> +
> + BUILD_BUG_ON(VECS2 + 1 != I915_NUM_ENGINES);
> +
> + if (engine_mask == ALL_ENGINES) {
> + hw_mask = GEN11_GRDOM_FULL;
> + } else {
Plonk struct intel_engine_cs *engine; here instead.
> + unsigned int tmp;
> +
> + hw_mask = 0;
> + for_each_engine_masked(engine, dev_priv, engine_mask, tmp)
> + hw_mask |= hw_engine_mask[engine->id];
> + }
More information about the Intel-gfx
mailing list