From: Chris Wilson Subject: Re: [PATCH] drm/i915: release cursor when crtc is destroyed Date: Tue, 23 Apr 2013 15:58:30 +0100 Message-ID: <20130423145830.GA5224@cantiga.alporthouse.com> References: <1366727228-6207-1-git-send-email-mika.kuoppala@intel.com> <20130423145609.GI6169@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id E01F0E608E for ; Tue, 23 Apr 2013 07:58:35 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130423145609.GI6169@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Apr 23, 2013 at 04:56:09PM +0200, Daniel Vetter wrote: > On Tue, Apr 23, 2013 at 05:27:08PM +0300, Mika Kuoppala wrote: > > crtc is holding a reference to a cursor bo and it needs > > to be released when crtc is destroyed so that we don't leak > > the cursor bo. > > = > > v2: Enhance set and move cursor so that disabled > > cursor is handled correctly (Ville Syrj=E4l=E4) > > = > > Signed-off-by: Mika Kuoppala > = > Oh, nice catch! > = > Could we somehow test this in an igt? I'm thinking of the following > sequence: > - Check how many objects there are in debugfs (maybe that needs a slightly > saner interface than what we currently have in i915_gem_objects). > - Setup a mode and provoke the leak (we could augment the tests with > sprites and similar stuff). > - Check whether the object count dropped back to the old value or not. If > not, fail the test. It's a leak upon module unload, so presumably you want to use kmemleak instead. -Chris -- = Chris Wilson, Intel Open Source Technology Centre