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.

struct i915_hw_ppgtt *ppgtt;

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

Reply via email to