Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933597AbcJUMws (ORCPT ); Fri, 21 Oct 2016 08:52:48 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:34575 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932247AbcJUMwm (ORCPT ); Fri, 21 Oct 2016 08:52:42 -0400 Date: Fri, 21 Oct 2016 14:52:37 +0200 From: Daniel Vetter To: Gustavo Padovan Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Daniel Stone , Daniel Vetter , Rob Clark , Greg Hackmann , John Harrison , laurent.pinchart@ideasonboard.com, seanpaul@google.com, marcheu@google.com, m.chehab@samsung.com, Sumit Semwal , Maarten Lankhorst , Gustavo Padovan Subject: Re: [PATCH v5 2/4] drm/fence: release fence reference when canceling event Message-ID: <20161021125237.GD20761@phenom.ffwll.local> Mail-Followup-To: Gustavo Padovan , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Daniel Stone , Rob Clark , Greg Hackmann , John Harrison , laurent.pinchart@ideasonboard.com, seanpaul@google.com, marcheu@google.com, m.chehab@samsung.com, Sumit Semwal , Maarten Lankhorst , Gustavo Padovan References: <1476975005-30441-1-git-send-email-gustavo@padovan.org> <1476975005-30441-3-git-send-email-gustavo@padovan.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1476975005-30441-3-git-send-email-gustavo@padovan.org> X-Operating-System: Linux phenom 4.6.0-1-amd64 User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1036 Lines: 40 On Thu, Oct 20, 2016 at 12:50:03PM -0200, Gustavo Padovan wrote: > From: Gustavo Padovan > > If the event gets canceled we also need to put away the fence > reference it holds. > > Signed-off-by: Gustavo Padovan Reviewed-by: Daniel Vetter I've broken my local dim scripts right now, so can't apply ;-) -Daniel > --- > drivers/gpu/drm/drm_fops.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c > index e84faec..8bed5f4 100644 > --- a/drivers/gpu/drm/drm_fops.c > +++ b/drivers/gpu/drm/drm_fops.c > @@ -663,6 +663,10 @@ void drm_event_cancel_free(struct drm_device *dev, > list_del(&p->pending_link); > } > spin_unlock_irqrestore(&dev->event_lock, flags); > + > + if (p->fence) > + fence_put(p->fence); > + > kfree(p); > } > EXPORT_SYMBOL(drm_event_cancel_free); > -- > 2.5.5 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch