From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 1/4] drm: Support legacy cursor ioctls via universal planes when possible (v2) Date: Tue, 20 May 2014 09:24:41 +0200 Message-ID: <20140520072441.GY8790@phenom.ffwll.local> References: <1400203049-21385-2-git-send-email-matthew.d.roper@intel.com> <1400279896-26112-1-git-send-email-matthew.d.roper@intel.com> <20140519222545.GE31484@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B6DD6E811 for ; Tue, 20 May 2014 00:24:47 -0700 (PDT) Received: by mail-ee0-f44.google.com with SMTP id c41so216558eek.17 for ; Tue, 20 May 2014 00:24:46 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140519222545.GE31484@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Matt Roper Cc: intel-gfx , dri-devel List-Id: intel-gfx@lists.freedesktop.org On Mon, May 19, 2014 at 03:25:45PM -0700, Matt Roper wrote: > On Sat, May 17, 2014 at 12:43:04AM +0200, Daniel Vetter wrote: > > On Sat, May 17, 2014 at 12:38 AM, Matt Roper wrote: > > > + if (ret) { > > > + if (req->flags & DRM_MODE_CURSOR_BO) > > > + drm_mode_rmfb(dev, &fb->base.id, file_priv); > > > + return ret; > > > + } > > > > With the new refcount logic an unconditional > > drm_framebuffer_unreference should be here instead of this. I think, > > but please double-check since it's late here ;-) > > -Daniel > > Actually, I'm not sure if we want the unreference at all. > setplane_internal() unrefs fb on failure (and old_fb on success), so I > think that's already taken care of. Oh right, I've forgotten about that part. A one-line comment here that setplane_internal will eat the reference would be good - you already have a corresponding comment around setplane_internal but I guess that's not good enough for silly me ;-) -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch