This patch set replaces functions named {un,reference} by their {put,get} counterparts. Affected data types are struct drm_gem_object, and struct drm_device.
With the reference-counting functions being named {put,get}, the DRM interface is more aligned to Linux kernel nameing standard. The patch set does not change driver-internal interfaces.
Thomas Zimmermann (3): drm/omapdrm: Replace drm_gem_object_{un/reference} with put,get functions drm/omapdrm: Replace drm_gem_object_unreference_unlocked with put function drm/omapdrm: Replace drm_dev_unref with drm_dev_put
drivers/gpu/drm/omapdrm/omap_drv.c | 6 +++--- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 4 ++-- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-)
-- 2.14.4
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 tdz@users.sourceforge.net --- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c index 8e41d649e248..1a73c9887cd3 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c +++ b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c @@ -187,7 +187,7 @@ struct drm_gem_object *omap_gem_prime_import(struct drm_device *dev, * Importing dmabuf exported from out own gem increases * refcount on gem itself instead of f_count of dmabuf. */ - drm_gem_object_reference(obj); + drm_gem_object_get(obj); return obj; } }
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 tdz@users.sourceforge.net --- drivers/gpu/drm/omapdrm/omap_drv.c | 2 +- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index ef3b0e3571ec..926b765dde68 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -428,7 +428,7 @@ static int ioctl_gem_info(struct drm_device *dev, void *data, args->size = omap_gem_mmap_size(obj); args->offset = omap_gem_mmap_offset(obj);
- drm_gem_object_unreference_unlocked(obj); + drm_gem_object_put_unlocked(obj);
return ret; } diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c index 9f1e3d8f8488..4d264fd554d8 100644 --- a/drivers/gpu/drm/omapdrm/omap_fb.c +++ b/drivers/gpu/drm/omapdrm/omap_fb.c @@ -319,7 +319,7 @@ struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev,
error: while (--i >= 0) - drm_gem_object_unreference_unlocked(bos[i]); + drm_gem_object_put_unlocked(bos[i]);
return fb; } diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c index 0f66c74a54b0..853448dbeeca 100644 --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c @@ -150,7 +150,7 @@ static int omap_fbdev_create(struct drm_fb_helper *helper, /* note: if fb creation failed, we can't rely on fb destroy * to unref the bo: */ - drm_gem_object_unreference_unlocked(fbdev->bo); + drm_gem_object_put_unlocked(fbdev->bo); ret = PTR_ERR(fb); goto fail; } diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c index 17a53d207978..d436401e3474 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -664,7 +664,7 @@ int omap_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev,
*offset = omap_gem_mmap_offset(obj);
- drm_gem_object_unreference_unlocked(obj); + drm_gem_object_put_unlocked(obj);
fail: return ret; @@ -1298,7 +1298,7 @@ int omap_gem_new_handle(struct drm_device *dev, struct drm_file *file, }
/* drop reference from allocate - handle holds it now */ - drm_gem_object_unreference_unlocked(obj); + drm_gem_object_put_unlocked(obj);
return 0; }
This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces.
Signed-off-by: Thomas Zimmermann tdz@users.sourceforge.net --- drivers/gpu/drm/omapdrm/omap_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index 926b765dde68..6042f77450a6 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -601,7 +601,7 @@ static int omapdrm_init(struct omap_drm_private *priv, struct device *dev) omap_drm_irq_uninstall(ddev); err_free_drm_dev: omap_gem_deinit(ddev); - drm_dev_unref(ddev); + drm_dev_put(ddev); err_destroy_wq: destroy_workqueue(priv->wq); omap_disconnect_dssdevs(); @@ -630,7 +630,7 @@ static void omapdrm_cleanup(struct omap_drm_private *priv) omap_drm_irq_uninstall(ddev); omap_gem_deinit(ddev);
- drm_dev_unref(ddev); + drm_dev_put(ddev);
destroy_workqueue(priv->wq);
Hi,
On 18/06/18 16:07, Thomas Zimmermann wrote:
This patch set replaces functions named {un,reference} by their {put,get} counterparts. Affected data types are struct drm_gem_object, and struct drm_device.
With the reference-counting functions being named {put,get}, the DRM interface is more aligned to Linux kernel nameing standard. The patch set does not change driver-internal interfaces.
Thomas Zimmermann (3): drm/omapdrm: Replace drm_gem_object_{un/reference} with put,get functions drm/omapdrm: Replace drm_gem_object_unreference_unlocked with put function drm/omapdrm: Replace drm_dev_unref with drm_dev_put
drivers/gpu/drm/omapdrm/omap_drv.c | 6 +++--- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 4 ++-- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-)
Thanks, I have picked these up (better later than never... sorry I missed these).
Tomi
Hi
Thanks. I rebased just today. Patch 3 is slightly out of date. Do you want me to post an update?
Best regards Thomas
Am 26.09.18 um 11:47 schrieb Tomi Valkeinen:
Hi,
On 18/06/18 16:07, Thomas Zimmermann wrote:
This patch set replaces functions named {un,reference} by their {put,get} counterparts. Affected data types are struct drm_gem_object, and struct drm_device.
With the reference-counting functions being named {put,get}, the DRM interface is more aligned to Linux kernel nameing standard. The patch set does not change driver-internal interfaces.
Thomas Zimmermann (3): drm/omapdrm: Replace drm_gem_object_{un/reference} with put,get functions drm/omapdrm: Replace drm_gem_object_unreference_unlocked with put function drm/omapdrm: Replace drm_dev_unref with drm_dev_put
drivers/gpu/drm/omapdrm/omap_drv.c | 6 +++--- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 4 ++-- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-)
Thanks, I have picked these up (better later than never... sorry I missed these).
Tomi
On 26/09/18 13:50, Thomas Zimmermann wrote:
Hi
Thanks. I rebased just today. Patch 3 is slightly out of date. Do you want me to post an update?
Yes, the third one conflicted. I fixed it as follows. If it looks the same as your rebased one, no need to resend:
From 1ebbed291771d486aa25d42d024c9040c1254b3a Mon Sep 17 00:00:00 2001
From: Thomas Zimmermann tdz@users.sourceforge.net Date: Mon, 18 Jun 2018 15:07:27 +0200 Subject: [PATCH] drm/omap: Replace drm_dev_unref with drm_dev_put
This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces.
Signed-off-by: Thomas Zimmermann tdz@users.sourceforge.net Signed-off-by: Tomi Valkeinen tomi.valkeinen@ti.com --- drivers/gpu/drm/omapdrm/omap_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index f14d02ca968c..5e67d58cbc28 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -614,7 +614,7 @@ static int omapdrm_init(struct omap_drm_private *priv, struct device *dev) omap_disconnect_pipelines(ddev); err_crtc_uninit: omap_crtc_pre_uninit(priv); - drm_dev_unref(ddev); + drm_dev_put(ddev); return ret; }
@@ -643,7 +643,7 @@ static void omapdrm_cleanup(struct omap_drm_private *priv) omap_disconnect_pipelines(ddev); omap_crtc_pre_uninit(priv);
- drm_dev_unref(ddev); + drm_dev_put(ddev); }
static int pdev_probe(struct platform_device *pdev)
OK, great. Thanks again for taking the patches.
Am 26.09.18 um 13:02 schrieb Tomi Valkeinen:
On 26/09/18 13:50, Thomas Zimmermann wrote:
Hi
Thanks. I rebased just today. Patch 3 is slightly out of date. Do you want me to post an update?
Yes, the third one conflicted. I fixed it as follows. If it looks the same as your rebased one, no need to resend:
From 1ebbed291771d486aa25d42d024c9040c1254b3a Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann tdz@users.sourceforge.net Date: Mon, 18 Jun 2018 15:07:27 +0200 Subject: [PATCH] drm/omap: Replace drm_dev_unref with drm_dev_put
This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces.
Signed-off-by: Thomas Zimmermann tdz@users.sourceforge.net Signed-off-by: Tomi Valkeinen tomi.valkeinen@ti.com
drivers/gpu/drm/omapdrm/omap_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index f14d02ca968c..5e67d58cbc28 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -614,7 +614,7 @@ static int omapdrm_init(struct omap_drm_private *priv, struct device *dev) omap_disconnect_pipelines(ddev); err_crtc_uninit: omap_crtc_pre_uninit(priv);
- drm_dev_unref(ddev);
- drm_dev_put(ddev); return ret;
}
@@ -643,7 +643,7 @@ static void omapdrm_cleanup(struct omap_drm_private *priv) omap_disconnect_pipelines(ddev); omap_crtc_pre_uninit(priv);
- drm_dev_unref(ddev);
- drm_dev_put(ddev);
}
static int pdev_probe(struct platform_device *pdev)
dri-devel@lists.freedesktop.org