dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/gma500: Replace drm_gem_object_unreference_unlocked with put function
@ 2018-06-25 15:21 Thomas Zimmermann
  2018-06-26  8:18 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Zimmermann @ 2018-06-25 15:21 UTC (permalink / raw)
  To: patrik.r.jakobsson; +Cc: Thomas Zimmermann, dri-devel

This patch unifies the naming of DRM functions for reference counting
of struct drm_gem_object. The resulting code is more aligned with the
rest of the Linux kernel interfaces.

Signed-off-by: Thomas Zimmermann <contact@tzimmermann.org>
---
 drivers/gpu/drm/gma500/framebuffer.c | 2 +-
 drivers/gpu/drm/gma500/gem.c         | 2 +-
 drivers/gpu/drm/gma500/gma_display.c | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index 8fa4ef192c1e..2f00a37684a2 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -517,7 +517,7 @@ static int psb_fbdev_destroy(struct drm_device *dev, struct psb_fbdev *fbdev)
 	drm_framebuffer_cleanup(&psbfb->base);
 
 	if (psbfb->base.obj[0])
-		drm_gem_object_unreference_unlocked(psbfb->base.obj[0]);
+		drm_gem_object_put_unlocked(psbfb->base.obj[0]);
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/gma500/gem.c b/drivers/gpu/drm/gma500/gem.c
index 131239759a75..913bf4c256fa 100644
--- a/drivers/gpu/drm/gma500/gem.c
+++ b/drivers/gpu/drm/gma500/gem.c
@@ -93,7 +93,7 @@ int psb_gem_create(struct drm_file *file, struct drm_device *dev, u64 size,
 		return ret;
 	}
 	/* We have the initial and handle reference but need only one now */
-	drm_gem_object_unreference_unlocked(&r->gem);
+	drm_gem_object_put_unlocked(&r->gem);
 	*handlep = handle;
 	return 0;
 }
diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers/gpu/drm/gma500/gma_display.c
index c8f071c47daf..015dc9f9348d 100644
--- a/drivers/gpu/drm/gma500/gma_display.c
+++ b/drivers/gpu/drm/gma500/gma_display.c
@@ -353,7 +353,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc,
 			gt = container_of(gma_crtc->cursor_obj,
 					  struct gtt_range, gem);
 			psb_gtt_unpin(gt);
-			drm_gem_object_unreference_unlocked(gma_crtc->cursor_obj);
+			drm_gem_object_put_unlocked(gma_crtc->cursor_obj);
 			gma_crtc->cursor_obj = NULL;
 		}
 		return 0;
@@ -429,7 +429,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc,
 	if (gma_crtc->cursor_obj) {
 		gt = container_of(gma_crtc->cursor_obj, struct gtt_range, gem);
 		psb_gtt_unpin(gt);
-		drm_gem_object_unreference_unlocked(gma_crtc->cursor_obj);
+		drm_gem_object_put_unlocked(gma_crtc->cursor_obj);
 	}
 
 	gma_crtc->cursor_obj = obj;
@@ -437,7 +437,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc,
 	return ret;
 
 unref_cursor:
-	drm_gem_object_unreference_unlocked(obj);
+	drm_gem_object_put_unlocked(obj);
 	return ret;
 }
 
-- 
2.14.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/gma500: Replace drm_gem_object_unreference_unlocked with put function
  2018-06-25 15:21 [PATCH] drm/gma500: Replace drm_gem_object_unreference_unlocked with put function Thomas Zimmermann
@ 2018-06-26  8:18 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2018-06-26  8:18 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: dri-devel

On Mon, Jun 25, 2018 at 05:21:48PM +0200, Thomas Zimmermann wrote:
> This patch unifies the naming of DRM functions for reference counting
> of struct drm_gem_object. The resulting code is more aligned with the
> rest of the Linux kernel interfaces.
> 
> Signed-off-by: Thomas Zimmermann <contact@tzimmermann.org>

Applied, thanks for the patch.
-Daniel

> ---
>  drivers/gpu/drm/gma500/framebuffer.c | 2 +-
>  drivers/gpu/drm/gma500/gem.c         | 2 +-
>  drivers/gpu/drm/gma500/gma_display.c | 6 +++---
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
> index 8fa4ef192c1e..2f00a37684a2 100644
> --- a/drivers/gpu/drm/gma500/framebuffer.c
> +++ b/drivers/gpu/drm/gma500/framebuffer.c
> @@ -517,7 +517,7 @@ static int psb_fbdev_destroy(struct drm_device *dev, struct psb_fbdev *fbdev)
>  	drm_framebuffer_cleanup(&psbfb->base);
>  
>  	if (psbfb->base.obj[0])
> -		drm_gem_object_unreference_unlocked(psbfb->base.obj[0]);
> +		drm_gem_object_put_unlocked(psbfb->base.obj[0]);
>  	return 0;
>  }
>  
> diff --git a/drivers/gpu/drm/gma500/gem.c b/drivers/gpu/drm/gma500/gem.c
> index 131239759a75..913bf4c256fa 100644
> --- a/drivers/gpu/drm/gma500/gem.c
> +++ b/drivers/gpu/drm/gma500/gem.c
> @@ -93,7 +93,7 @@ int psb_gem_create(struct drm_file *file, struct drm_device *dev, u64 size,
>  		return ret;
>  	}
>  	/* We have the initial and handle reference but need only one now */
> -	drm_gem_object_unreference_unlocked(&r->gem);
> +	drm_gem_object_put_unlocked(&r->gem);
>  	*handlep = handle;
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers/gpu/drm/gma500/gma_display.c
> index c8f071c47daf..015dc9f9348d 100644
> --- a/drivers/gpu/drm/gma500/gma_display.c
> +++ b/drivers/gpu/drm/gma500/gma_display.c
> @@ -353,7 +353,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc,
>  			gt = container_of(gma_crtc->cursor_obj,
>  					  struct gtt_range, gem);
>  			psb_gtt_unpin(gt);
> -			drm_gem_object_unreference_unlocked(gma_crtc->cursor_obj);
> +			drm_gem_object_put_unlocked(gma_crtc->cursor_obj);
>  			gma_crtc->cursor_obj = NULL;
>  		}
>  		return 0;
> @@ -429,7 +429,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc,
>  	if (gma_crtc->cursor_obj) {
>  		gt = container_of(gma_crtc->cursor_obj, struct gtt_range, gem);
>  		psb_gtt_unpin(gt);
> -		drm_gem_object_unreference_unlocked(gma_crtc->cursor_obj);
> +		drm_gem_object_put_unlocked(gma_crtc->cursor_obj);
>  	}
>  
>  	gma_crtc->cursor_obj = obj;
> @@ -437,7 +437,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc,
>  	return ret;
>  
>  unref_cursor:
> -	drm_gem_object_unreference_unlocked(obj);
> +	drm_gem_object_put_unlocked(obj);
>  	return ret;
>  }
>  
> -- 
> 2.14.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-26  8:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-25 15:21 [PATCH] drm/gma500: Replace drm_gem_object_unreference_unlocked with put function Thomas Zimmermann
2018-06-26  8:18 ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).