From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751866AbdHCNGG (ORCPT ); Thu, 3 Aug 2017 09:06:06 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36945 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751158AbdHCNGF (ORCPT ); Thu, 3 Aug 2017 09:06:05 -0400 Date: Thu, 3 Aug 2017 15:06:00 +0200 From: Daniel Vetter To: Thomas Hellstrom Cc: Cihangir Akturk , VMware Graphics , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 28/29] drm/vmwgfx: switch to drm_*{get,put} helpers Message-ID: <20170803130600.bwpskwxuwluxlyh5@phenom.ffwll.local> Mail-Followup-To: Thomas Hellstrom , Cihangir Akturk , VMware Graphics , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <1501761585-11757-1-git-send-email-cakturk@gmail.com> <1501761585-11757-29-git-send-email-cakturk@gmail.com> <82c874fa-9cf9-d3a3-6424-fc6e9745c4c9@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <82c874fa-9cf9-d3a3-6424-fc6e9745c4c9@vmware.com> X-Operating-System: Linux phenom 4.11.0-2-amd64 User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 03, 2017 at 02:40:43PM +0200, Thomas Hellstrom wrote: > On 08/03/2017 01:58 PM, Cihangir Akturk wrote: > > drm_*_reference() and drm_*_unreference() functions are just > > compatibility alias for drm_*_get() and drm_*_put() adn should not be > > s/adn/and/ > > used by new code. So convert all users of compatibility functions to use > > the new APIs. > > > > Signed-off-by: Cihangir Akturk > > --- > > drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +- > > drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 4 ++-- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c > > index 6f4cb46..d43dce9 100644 > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c > > @@ -500,7 +500,7 @@ static int vmw_fb_kms_detach(struct vmw_fb_par *par, > > } > > if (cur_fb) { > > - drm_framebuffer_unreference(cur_fb); > > + drm_framebuffer_put(cur_fb); > > par->set_fb = NULL; > > } > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c > > index 5ec24fd..fd4a988 100644 > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c > > @@ -316,7 +316,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data, > > out_no_surface: > > ttm_read_unlock(&dev_priv->reservation_sem); > > out_no_ttm_lock: > > - drm_framebuffer_unreference(fb); > > + drm_framebuffer_put(fb); > > out_no_fb: > > drm_modeset_unlock_all(dev); > > out_no_copy: > > @@ -393,7 +393,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data, > > ttm_read_unlock(&dev_priv->reservation_sem); > > out_no_ttm_lock: > > - drm_framebuffer_unreference(fb); > > + drm_framebuffer_put(fb); > > out_no_fb: > > drm_modeset_unlock_all(dev); > > out_no_copy: > > Apart from the above, > > Reviewed-by: Thomas Hellstrom > > (Assuming this gets pulled together with the whole series, not vmwgfx-next) Imo easier to pull this in through driver trees. It's going to take a bit until we can finally remove the wrappers, there's too many callers all around. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch