Re: [PATCH] drm/i915: Handle i915_ppgtt_put correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 19, 2014 at 10:50 AM, Michel Thierry
<michel.thierry@xxxxxxxxx> wrote:
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -2223,6 +2223,7 @@ static struct i915_vma *__i915_gem_vma_create(struct drm_i915_gem_object *obj,
>         INIT_LIST_HEAD(&vma->exec_list);
>         vma->vm = vm;
>         vma->obj = obj;
> +       vma->ppgtt_refcount = 0;
>
>         switch (INTEL_INFO(vm->dev)->gen) {
>         case 8:
> @@ -2267,8 +2268,10 @@ i915_gem_obj_lookup_or_create_vma(struct drm_i915_gem_object *obj,
>         if (!vma)
>                 vma = __i915_gem_vma_create(obj, vm);
>
> -       if (!i915_is_ggtt(vm))
> +       if (!i915_is_ggtt(vm)) {
>                 i915_ppgtt_get(i915_vm_to_ppgtt(vm));
> +               vma->ppgtt_refcount++;
> +       }

Shouldn't we just move the ppgtt into the vma_create hunk (or
function) instead of this complication?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux