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
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx