From: Daniel Vetter Subject: Re: [PATCH v2] drm/i915: Handle i915_ppgtt_put correctly Date: Tue, 26 Aug 2014 14:39:15 +0200 Message-ID: <20140826123915.GQ15520@phenom.ffwll.local> References: <1408438259-19828-1-git-send-email-michel.thierry@intel.com> <1408459781-18500-1-git-send-email-michel.thierry@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by gabe.freedesktop.org (Postfix) with ESMTP id 0BB8089170 for ; Tue, 26 Aug 2014 05:38:52 -0700 (PDT) Received: by mail-wi0-f173.google.com with SMTP id f8so4116205wiw.0 for ; Tue, 26 Aug 2014 05:38:52 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1408459781-18500-1-git-send-email-michel.thierry@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Michel Thierry Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Aug 19, 2014 at 03:49:41PM +0100, Michel Thierry wrote: > 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: Michel Thierry Queued for -next, thanks for the patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch