[Intel-gfx] [PATCH] drm/i915/gvt: Fix build failure after intel_engine_cs change
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Tue Oct 18 06:47:56 UTC 2016
On ti, 2016-10-18 at 09:40 +0800, Zhenyu Wang wrote:
> @@ -134,7 +134,7 @@ static int render_mmio_to_ring_id(struct intel_gvt *gvt, unsigned int reg)
>
> reg &= ~GENMASK(11, 0);
> for (i = 0; i < I915_NUM_ENGINES; i++) {
> - if (gvt->dev_priv->engine[i].mmio_base == reg)
> + if (gvt->dev_priv->engine[i]->mmio_base == reg)
> return i;
> }
This loop is bad now that engine[i] might be NULL. Use for_each_engine
instead.
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list