* [PATCH 0/3] drm/msm: Replace {un/reference} with {put,get} functions
@ 2018-06-18 13:02 Thomas Zimmermann
2018-06-18 13:02 ` [PATCH 1/3] drm/msm: Replace drm_framebuffer_{un/reference} with put, get functions Thomas Zimmermann
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Thomas Zimmermann @ 2018-06-18 13:02 UTC (permalink / raw)
To: robdclark; +Cc: linux-arm-msm, Thomas Zimmermann, freedreno, dri-devel
This patch set replaces functions named {un,reference} by their
{put,get} counterparts. Affected data types are struct struct drm_framebuffer,
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/msm: Replace drm_framebuffer_{un/reference} with put,get functions
drm/msm: Replace drm_gem_object_{un/reference} with put,get functions
drm/msm: Replace drm_dev_unref with drm_dev_put
drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 4 ++--
drivers/gpu/drm/msm/adreno/a5xx_power.c | 2 +-
drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 2 +-
drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 4 ++--
drivers/gpu/drm/msm/msm_drv.c | 8 ++++----
drivers/gpu/drm/msm/msm_gem_submit.c | 4 ++--
6 files changed, 12 insertions(+), 12 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] 5+ messages in thread
* [PATCH 1/3] drm/msm: Replace drm_framebuffer_{un/reference} with put, get functions
2018-06-18 13:02 [PATCH 0/3] drm/msm: Replace {un/reference} with {put,get} functions Thomas Zimmermann
@ 2018-06-18 13:02 ` Thomas Zimmermann
2018-06-18 13:02 ` [PATCH 2/3] drm/msm: Replace drm_gem_object_{un/reference} " Thomas Zimmermann
2018-06-18 13:02 ` [PATCH 3/3] drm/msm: Replace drm_dev_unref with drm_dev_put Thomas Zimmermann
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Zimmermann @ 2018-06-18 13:02 UTC (permalink / raw)
To: robdclark; +Cc: linux-arm-msm, Thomas Zimmermann, freedreno, dri-devel
This patch unifies the naming of DRM functions for reference counting
of struct drm_framebuffer. 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/msm/disp/mdp5/mdp5_plane.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
index c4f115fe96ff..04f3c5a18b3c 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
@@ -185,7 +185,7 @@ static void mdp5_plane_reset(struct drm_plane *plane)
struct mdp5_plane_state *mdp5_state;
if (plane->state && plane->state->fb)
- drm_framebuffer_unreference(plane->state->fb);
+ drm_framebuffer_put(plane->state->fb);
kfree(to_mdp5_plane_state(plane->state));
mdp5_state = kzalloc(sizeof(*mdp5_state), GFP_KERNEL);
@@ -228,7 +228,7 @@ static void mdp5_plane_destroy_state(struct drm_plane *plane,
struct mdp5_plane_state *pstate = to_mdp5_plane_state(state);
if (state->fb)
- drm_framebuffer_unreference(state->fb);
+ drm_framebuffer_put(state->fb);
kfree(pstate);
}
--
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] 5+ messages in thread
* [PATCH 2/3] drm/msm: Replace drm_gem_object_{un/reference} with put, get functions
2018-06-18 13:02 [PATCH 0/3] drm/msm: Replace {un/reference} with {put,get} functions Thomas Zimmermann
2018-06-18 13:02 ` [PATCH 1/3] drm/msm: Replace drm_framebuffer_{un/reference} with put, get functions Thomas Zimmermann
@ 2018-06-18 13:02 ` Thomas Zimmermann
[not found] ` <20180618130220.15045-3-tdz-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2018-06-18 13:02 ` [PATCH 3/3] drm/msm: Replace drm_dev_unref with drm_dev_put Thomas Zimmermann
2 siblings, 1 reply; 5+ messages in thread
From: Thomas Zimmermann @ 2018-06-18 13:02 UTC (permalink / raw)
To: robdclark; +Cc: linux-arm-msm, Thomas Zimmermann, freedreno, 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/msm/adreno/a5xx_debugfs.c | 4 ++--
drivers/gpu/drm/msm/adreno/a5xx_power.c | 2 +-
drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 2 +-
drivers/gpu/drm/msm/msm_gem_submit.c | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c b/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
index 059ec7d394d0..d2127b1c4ece 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
@@ -132,14 +132,14 @@ reset_set(void *data, u64 val)
if (a5xx_gpu->pm4_bo) {
if (a5xx_gpu->pm4_iova)
msm_gem_put_iova(a5xx_gpu->pm4_bo, gpu->aspace);
- drm_gem_object_unreference(a5xx_gpu->pm4_bo);
+ drm_gem_object_put(a5xx_gpu->pm4_bo);
a5xx_gpu->pm4_bo = NULL;
}
if (a5xx_gpu->pfp_bo) {
if (a5xx_gpu->pfp_iova)
msm_gem_put_iova(a5xx_gpu->pfp_bo, gpu->aspace);
- drm_gem_object_unreference(a5xx_gpu->pfp_bo);
+ drm_gem_object_put(a5xx_gpu->pfp_bo);
a5xx_gpu->pfp_bo = NULL;
}
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_power.c b/drivers/gpu/drm/msm/adreno/a5xx_power.c
index e9c0e56dbec0..7a41e1c147e4 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_power.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_power.c
@@ -323,7 +323,7 @@ void a5xx_gpmu_ucode_init(struct msm_gpu *gpu)
if (a5xx_gpu->gpmu_iova)
msm_gem_put_iova(a5xx_gpu->gpmu_bo, gpu->aspace);
if (a5xx_gpu->gpmu_bo)
- drm_gem_object_unreference(a5xx_gpu->gpmu_bo);
+ drm_gem_object_put(a5xx_gpu->gpmu_bo);
a5xx_gpu->gpmu_bo = NULL;
a5xx_gpu->gpmu_iova = 0;
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c
index 970c7963ae29..f3c21f827a4d 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c
@@ -272,7 +272,7 @@ void a5xx_preempt_fini(struct msm_gpu *gpu)
if (a5xx_gpu->preempt_iova[i])
msm_gem_put_iova(a5xx_gpu->preempt_bo[i], gpu->aspace);
- drm_gem_object_unreference(a5xx_gpu->preempt_bo[i]);
+ drm_gem_object_put(a5xx_gpu->preempt_bo[i]);
a5xx_gpu->preempt_bo[i] = NULL;
}
}
diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c
index 7bd83e0afa97..7a7923e6220d 100644
--- a/drivers/gpu/drm/msm/msm_gem_submit.c
+++ b/drivers/gpu/drm/msm/msm_gem_submit.c
@@ -144,7 +144,7 @@ static int submit_lookup_objects(struct msm_gem_submit *submit,
goto out_unlock;
}
- drm_gem_object_reference(obj);
+ drm_gem_object_get(obj);
submit->bos[i].obj = msm_obj;
@@ -396,7 +396,7 @@ static void submit_cleanup(struct msm_gem_submit *submit)
struct msm_gem_object *msm_obj = submit->bos[i].obj;
submit_unlock_unpin_bo(submit, i, false);
list_del_init(&msm_obj->submit_entry);
- drm_gem_object_unreference(&msm_obj->base);
+ drm_gem_object_put(&msm_obj->base);
}
ww_acquire_fini(&submit->ticket);
--
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] 5+ messages in thread
* [PATCH 3/3] drm/msm: Replace drm_dev_unref with drm_dev_put
2018-06-18 13:02 [PATCH 0/3] drm/msm: Replace {un/reference} with {put,get} functions Thomas Zimmermann
2018-06-18 13:02 ` [PATCH 1/3] drm/msm: Replace drm_framebuffer_{un/reference} with put, get functions Thomas Zimmermann
2018-06-18 13:02 ` [PATCH 2/3] drm/msm: Replace drm_gem_object_{un/reference} " Thomas Zimmermann
@ 2018-06-18 13:02 ` Thomas Zimmermann
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Zimmermann @ 2018-06-18 13:02 UTC (permalink / raw)
To: robdclark; +Cc: linux-arm-msm, Thomas Zimmermann, freedreno, 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/msm/msm_drv.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 021a0b6f9a59..8b96976c6b40 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -261,7 +261,7 @@ static int msm_drm_uninit(struct device *dev)
msm_mdss_destroy(ddev);
ddev->dev_private = NULL;
- drm_dev_unref(ddev);
+ drm_dev_put(ddev);
kfree(priv);
@@ -369,7 +369,7 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) {
- drm_dev_unref(ddev);
+ drm_dev_put(ddev);
return -ENOMEM;
}
@@ -379,7 +379,7 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
ret = msm_mdss_init(ddev);
if (ret) {
kfree(priv);
- drm_dev_unref(ddev);
+ drm_dev_put(ddev);
return ret;
}
@@ -398,7 +398,7 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
if (ret) {
msm_mdss_destroy(ddev);
kfree(priv);
- drm_dev_unref(ddev);
+ drm_dev_put(ddev);
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] 5+ messages in thread
* Re: [PATCH 2/3] drm/msm: Replace drm_gem_object_{un/reference} with put, get functions
[not found] ` <20180618130220.15045-3-tdz-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
@ 2018-06-18 14:28 ` Jordan Crouse
0 siblings, 0 replies; 5+ messages in thread
From: Jordan Crouse @ 2018-06-18 14:28 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
robdclark-Re5JQEeQqe8AvxtiuMwx3w,
freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Mon, Jun 18, 2018 at 03:02:19PM +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.
Thanks for doing this.
> Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
> ---
> drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 4 ++--
> drivers/gpu/drm/msm/adreno/a5xx_power.c | 2 +-
> drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 2 +-
> drivers/gpu/drm/msm/msm_gem_submit.c | 4 ++--
> 4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c b/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
> index 059ec7d394d0..d2127b1c4ece 100644
> --- a/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
> +++ b/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
> @@ -132,14 +132,14 @@ reset_set(void *data, u64 val)
> if (a5xx_gpu->pm4_bo) {
> if (a5xx_gpu->pm4_iova)
> msm_gem_put_iova(a5xx_gpu->pm4_bo, gpu->aspace);
> - drm_gem_object_unreference(a5xx_gpu->pm4_bo);
> + drm_gem_object_put(a5xx_gpu->pm4_bo);
> a5xx_gpu->pm4_bo = NULL;
> }
>
> if (a5xx_gpu->pfp_bo) {
> if (a5xx_gpu->pfp_iova)
> msm_gem_put_iova(a5xx_gpu->pfp_bo, gpu->aspace);
> - drm_gem_object_unreference(a5xx_gpu->pfp_bo);
> + drm_gem_object_put(a5xx_gpu->pfp_bo);
> a5xx_gpu->pfp_bo = NULL;
> }
>
> diff --git a/drivers/gpu/drm/msm/adreno/a5xx_power.c b/drivers/gpu/drm/msm/adreno/a5xx_power.c
> index e9c0e56dbec0..7a41e1c147e4 100644
> --- a/drivers/gpu/drm/msm/adreno/a5xx_power.c
> +++ b/drivers/gpu/drm/msm/adreno/a5xx_power.c
> @@ -323,7 +323,7 @@ void a5xx_gpmu_ucode_init(struct msm_gpu *gpu)
> if (a5xx_gpu->gpmu_iova)
> msm_gem_put_iova(a5xx_gpu->gpmu_bo, gpu->aspace);
> if (a5xx_gpu->gpmu_bo)
> - drm_gem_object_unreference(a5xx_gpu->gpmu_bo);
> + drm_gem_object_put(a5xx_gpu->gpmu_bo);
>
> a5xx_gpu->gpmu_bo = NULL;
> a5xx_gpu->gpmu_iova = 0;
> diff --git a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c
> index 970c7963ae29..f3c21f827a4d 100644
> --- a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c
> +++ b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c
> @@ -272,7 +272,7 @@ void a5xx_preempt_fini(struct msm_gpu *gpu)
> if (a5xx_gpu->preempt_iova[i])
> msm_gem_put_iova(a5xx_gpu->preempt_bo[i], gpu->aspace);
>
> - drm_gem_object_unreference(a5xx_gpu->preempt_bo[i]);
> + drm_gem_object_put(a5xx_gpu->preempt_bo[i]);
> a5xx_gpu->preempt_bo[i] = NULL;
> }
> }
> diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c
> index 7bd83e0afa97..7a7923e6220d 100644
> --- a/drivers/gpu/drm/msm/msm_gem_submit.c
> +++ b/drivers/gpu/drm/msm/msm_gem_submit.c
> @@ -144,7 +144,7 @@ static int submit_lookup_objects(struct msm_gem_submit *submit,
> goto out_unlock;
> }
>
> - drm_gem_object_reference(obj);
> + drm_gem_object_get(obj);
>
> submit->bos[i].obj = msm_obj;
>
> @@ -396,7 +396,7 @@ static void submit_cleanup(struct msm_gem_submit *submit)
> struct msm_gem_object *msm_obj = submit->bos[i].obj;
> submit_unlock_unpin_bo(submit, i, false);
> list_del_init(&msm_obj->submit_entry);
> - drm_gem_object_unreference(&msm_obj->base);
> + drm_gem_object_put(&msm_obj->base);
> }
>
> ww_acquire_fini(&submit->ticket);
> --
> 2.14.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-06-18 14:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-18 13:02 [PATCH 0/3] drm/msm: Replace {un/reference} with {put,get} functions Thomas Zimmermann
2018-06-18 13:02 ` [PATCH 1/3] drm/msm: Replace drm_framebuffer_{un/reference} with put, get functions Thomas Zimmermann
2018-06-18 13:02 ` [PATCH 2/3] drm/msm: Replace drm_gem_object_{un/reference} " Thomas Zimmermann
[not found] ` <20180618130220.15045-3-tdz-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2018-06-18 14:28 ` Jordan Crouse
2018-06-18 13:02 ` [PATCH 3/3] drm/msm: Replace drm_dev_unref with drm_dev_put Thomas Zimmermann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.