Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1703021 > unrolled thread

[PATCH 28/29] drm/vmwgfx: switch to drm_*{get,put} helpers

Started byCihangir Akturk <cakturk@gmail.com>
First post2017-08-03 14:10 +0200
Last post2017-08-03 15:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 28/29] drm/vmwgfx: switch to drm_*{get,put} helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-03 14:10 +0200
    Re: [PATCH 28/29] drm/vmwgfx: switch to drm_*{get,put} helpers Daniel Vetter <daniel@ffwll.ch> - 2017-08-03 15:10 +0200

#1703021 — [PATCH 28/29] drm/vmwgfx: switch to drm_*{get,put} helpers

FromCihangir Akturk <cakturk@gmail.com>
Date2017-08-03 14:10 +0200
Subject[PATCH 28/29] drm/vmwgfx: switch to drm_*{get,put} helpers
Message-ID<uan6Z-8co-65@gated-at.bofh.it>
drm_*_reference() and drm_*_unreference() functions are just
compatibility alias for drm_*_get() and drm_*_put() adn should not be
used by new code. So convert all users of compatibility functions to use
the new APIs.

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
---
 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:
-- 
2.7.4

[toc] | [next] | [standalone]


#1703093

FromDaniel Vetter <daniel@ffwll.ch>
Date2017-08-03 15:10 +0200
Message-ID<uao32-n3-31@gated-at.bofh.it>
In reply to#1703021
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 <cakturk@gmail.com>
> > ---
> >   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 <thellstrom@vmware.com>
> 
> (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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web