Re: [Intel-gfx] [PATCH] drm/i915/gvt: Fix build failure after intel_engine_cs change

2016-10-18 Thread Chris Wilson
On Tue, Oct 18, 2016 at 09:40:07AM +0800, Zhenyu Wang wrote:
> Change GVT-g code reference for intel_engine_cs from static array to
> allocated pointer after commit 3b3f1650b1ca ("drm/i915: Allocate
> intel_engine_cs structure only for the enabled engines").

You also need to enable deprecation warnings and fix the use of obsolete
functions.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/gvt: Fix build failure after intel_engine_cs change

2016-10-17 Thread Zhenyu Wang
On 2016.10.18 09:47:56 +0300, Joonas Lahtinen wrote:
> 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.
> 

yes, we're fixing this with newly merged code and testing for VM,
should be fixed in next pull request.

Thanks

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827


signature.asc
Description: PGP signature
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/gvt: Fix build failure after intel_engine_cs change

2016-10-17 Thread Joonas Lahtinen
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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx