* [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put, get} functions
@ 2018-06-18 13:07 Thomas Zimmermann
2018-06-18 13:07 ` [PATCH 1/3] drm/omapdrm: Replace drm_gem_object_{un/reference} with put, get functions Thomas Zimmermann
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Thomas Zimmermann @ 2018-06-18 13:07 UTC (permalink / raw)
To: tomi.valkeinen; +Cc: Thomas Zimmermann, dri-devel
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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] drm/omapdrm: Replace drm_gem_object_{un/reference} with put, get functions
2018-06-18 13:07 [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put, get} functions Thomas Zimmermann
@ 2018-06-18 13:07 ` Thomas Zimmermann
2018-06-18 13:07 ` [PATCH 2/3] drm/omapdrm: Replace drm_gem_object_unreference_unlocked with put function Thomas Zimmermann
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Thomas Zimmermann @ 2018-06-18 13:07 UTC (permalink / raw)
To: tomi.valkeinen; +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 <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;
}
}
--
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] 8+ messages in thread
* [PATCH 2/3] drm/omapdrm: Replace drm_gem_object_unreference_unlocked with put function
2018-06-18 13:07 [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put, get} functions Thomas Zimmermann
2018-06-18 13:07 ` [PATCH 1/3] drm/omapdrm: Replace drm_gem_object_{un/reference} with put, get functions Thomas Zimmermann
@ 2018-06-18 13:07 ` Thomas Zimmermann
2018-06-18 13:07 ` [PATCH 3/3] drm/omapdrm: Replace drm_dev_unref with drm_dev_put Thomas Zimmermann
2018-09-26 9:47 ` [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put,get} functions Tomi Valkeinen
3 siblings, 0 replies; 8+ messages in thread
From: Thomas Zimmermann @ 2018-06-18 13:07 UTC (permalink / raw)
To: tomi.valkeinen; +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 <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;
}
--
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] 8+ messages in thread
* [PATCH 3/3] drm/omapdrm: Replace drm_dev_unref with drm_dev_put
2018-06-18 13:07 [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put, get} functions Thomas Zimmermann
2018-06-18 13:07 ` [PATCH 1/3] drm/omapdrm: Replace drm_gem_object_{un/reference} with put, get functions Thomas Zimmermann
2018-06-18 13:07 ` [PATCH 2/3] drm/omapdrm: Replace drm_gem_object_unreference_unlocked with put function Thomas Zimmermann
@ 2018-06-18 13:07 ` Thomas Zimmermann
2018-09-26 9:47 ` [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put,get} functions Tomi Valkeinen
3 siblings, 0 replies; 8+ messages in thread
From: Thomas Zimmermann @ 2018-06-18 13:07 UTC (permalink / raw)
To: tomi.valkeinen; +Cc: Thomas Zimmermann, dri-devel
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);
--
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] 8+ messages in thread
* Re: [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put,get} functions
2018-06-18 13:07 [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put, get} functions Thomas Zimmermann
` (2 preceding siblings ...)
2018-06-18 13:07 ` [PATCH 3/3] drm/omapdrm: Replace drm_dev_unref with drm_dev_put Thomas Zimmermann
@ 2018-09-26 9:47 ` Tomi Valkeinen
2018-09-26 10:50 ` Thomas Zimmermann
3 siblings, 1 reply; 8+ messages in thread
From: Tomi Valkeinen @ 2018-09-26 9:47 UTC (permalink / raw)
To: Thomas Zimmermann; +Cc: dri-devel
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
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put,get} functions
2018-09-26 9:47 ` [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put,get} functions Tomi Valkeinen
@ 2018-09-26 10:50 ` Thomas Zimmermann
2018-09-26 11:02 ` Tomi Valkeinen
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Zimmermann @ 2018-09-26 10:50 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: dri-devel
[-- Attachment #1.1.1: Type: text/plain, Size: 1589 bytes --]
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
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
Graham Norton, HRB 21284 (AG Nürnberg)
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put,get} functions
2018-09-26 10:50 ` Thomas Zimmermann
@ 2018-09-26 11:02 ` Tomi Valkeinen
2018-09-26 11:19 ` Thomas Zimmermann
0 siblings, 1 reply; 8+ messages in thread
From: Tomi Valkeinen @ 2018-09-26 11:02 UTC (permalink / raw)
To: Thomas Zimmermann; +Cc: dri-devel
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)
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put,get} functions
2018-09-26 11:02 ` Tomi Valkeinen
@ 2018-09-26 11:19 ` Thomas Zimmermann
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Zimmermann @ 2018-09-26 11:19 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: dri-devel
[-- Attachment #1.1.1: Type: text/plain, Size: 2092 bytes --]
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)
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
Graham Norton, HRB 21284 (AG Nürnberg)
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-09-26 11:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-18 13:07 [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put, get} functions Thomas Zimmermann
2018-06-18 13:07 ` [PATCH 1/3] drm/omapdrm: Replace drm_gem_object_{un/reference} with put, get functions Thomas Zimmermann
2018-06-18 13:07 ` [PATCH 2/3] drm/omapdrm: Replace drm_gem_object_unreference_unlocked with put function Thomas Zimmermann
2018-06-18 13:07 ` [PATCH 3/3] drm/omapdrm: Replace drm_dev_unref with drm_dev_put Thomas Zimmermann
2018-09-26 9:47 ` [PATCH 0/3] drm/omapdrm: Replace {un/reference} with {put,get} functions Tomi Valkeinen
2018-09-26 10:50 ` Thomas Zimmermann
2018-09-26 11:02 ` Tomi Valkeinen
2018-09-26 11:19 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox