On pe, 2016-04-01 at 08:12 +0100, Chris Wilson wrote:
> On Fri, Apr 01, 2016 at 10:05:03AM +0300, Joonas Lahtinen wrote:
> > 
> > Looks much better without container_of everywhere.
> > 
> > v2:
> > 
> > - In i915_gem_restore_gtt_mappings too (Chris)
> > @@ -3294,9 +3282,7 @@ void i915_gem_restore_gtt_mappings(struct drm_device 
> > *dev)
> >             list_for_each_entry(vm, &dev_priv->vm_list, global_link) {
> >                     /* TODO: Perhaps it shouldn't be gen6 specific */
> >  
> > -                   struct i915_hw_ppgtt *ppgtt =
> > -                                   container_of(vm, struct i915_hw_ppgtt,
> > -                                                base);
> > +                   struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm);
> >  
> >                     if (i915_is_ggtt(vm))
> >                             ppgtt = dev_priv->mm.aliasing_ppgtt;
> Sadly, WARN.
> 

Oops.

> struct i915_hw_ppgtt *ppgtt;
> 
> if (i915_is_ggtt(vm))
>       ppgtt = dev_priv->mm.aliasing_ppgtt;
> else
>       ppgtt = i915_vm_to_ppgtt(vm);
> -Chris
> 
-- 
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

Reply via email to