From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Roper Subject: Re: [PATCH 4/7] drm: convert plane to properties/state Date: Wed, 23 Jul 2014 17:42:38 -0700 Message-ID: <20140724004238.GH22304@intel.com> References: <1406144300-4995-1-git-send-email-robdclark@gmail.com> <1406144300-4995-5-git-send-email-robdclark@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id CD0686E020 for ; Wed, 23 Jul 2014 17:40:59 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1406144300-4995-5-git-send-email-robdclark@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Rob Clark Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Wed, Jul 23, 2014 at 03:38:17PM -0400, Rob Clark wrote: ... > @@ -2702,10 +2895,11 @@ static int drm_mode_cursor_universal(struct drm_crtc *crtc, > * setplane_internal will take care of deref'ing either the old or new > * framebuffer depending on success. > */ > - ret = setplane_internal(crtc->cursor, crtc, fb, > + ret = setplane_internal(crtc->cursor, > + crtc->base.id, fb ? fb->base.id : 0, > crtc_x, crtc_y, crtc_w, crtc_h, > 0, 0, src_w, src_h); > - > + drm_framebuffer_unreference(fb); I haven't had time to look through this in depth yet, but can't we wind up unreferencing NULL here? Also, the comment above this call should probably be updated/removed since the locking works a bit differently now? Matt -- Matt Roper Graphics Software Engineer IoTG Platform Enabling & Development Intel Corporation (916) 356-2795