• Michel Thierry's avatar
    drm/i915: Handle i915_ppgtt_put correctly · e07f0552
    Michel Thierry authored
    Unfortunately, the gem_obj/vma relationship is not symmetrical; a gem_obj
    can look up for the same vma more than once (where the ppgtt refcount is
    incremented), but will free the vma only once (i915_gem_free_object).
    
    This difference in refcount get/put means that the ppgtt is not removed
    after the context and vma are destroyed, because sometimes the refcount
    will never go back to zero.
    
    v2: Just move the ppgtt refcount into vma_create.
    
    OTC-Jira: VIZ-3719
    Signed-off-by: default avatarMichel Thierry <michel.thierry@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    e07f0552
i915_gem_gtt.c 55.9 KB