* [PATCH 0/4] drm/nouveau: Replace {un/reference} with {put, get} functions
@ 2018-06-18 12:53 Thomas Zimmermann
2018-06-18 12:53 ` [PATCH 1/4] drm/nouveau: Replace drm_connector_{un/reference} with put, get functions Thomas Zimmermann
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Thomas Zimmermann @ 2018-06-18 12:53 UTC (permalink / raw)
To: nouveau; +Cc: dri-devel, Thomas Zimmermann, bskeggs
This patch set replaces functions named {un,reference} by their
{put,get} counterparts. Affected data types are struct drm_connector,
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 (4):
drm/nouveau: Replace drm_connector_{un/reference} with put,get
functions
drm/nouveau: Replace drm_framebuffer_{un/reference} with put,get
functions
drm/nouveau: Replace drm_gem_object_unreference_unlocked with put
function
drm/nouveau: Replace drm_dev_unref with drm_dev_put
drivers/gpu/drm/nouveau/dispnv04/crtc.c | 2 +-
drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_display.c | 8 ++++----
drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_gem.c | 14 +++++++-------
drivers/gpu/drm/nouveau/nouveau_platform.c | 2 +-
7 files changed, 16 insertions(+), 16 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/4] drm/nouveau: Replace drm_connector_{un/reference} with put, get functions
2018-06-18 12:53 [PATCH 0/4] drm/nouveau: Replace {un/reference} with {put, get} functions Thomas Zimmermann
@ 2018-06-18 12:53 ` Thomas Zimmermann
2018-06-18 12:53 ` [PATCH 2/4] drm/nouveau: Replace drm_framebuffer_{un/reference} " Thomas Zimmermann
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Zimmermann @ 2018-06-18 12:53 UTC (permalink / raw)
To: nouveau; +Cc: dri-devel, Thomas Zimmermann, bskeggs
This patch unifies the naming of DRM functions for reference counting
of struct drm_connector. 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/nouveau/dispnv50/disp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index b83465ae7c1b..1f8bba8f6528 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1007,7 +1007,7 @@ nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
mstc->port = NULL;
drm_modeset_unlock(&drm->dev->mode_config.connection_mutex);
- drm_connector_unreference(&mstc->connector);
+ drm_connector_put(&mstc->connector);
}
static void
--
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/4] drm/nouveau: Replace drm_framebuffer_{un/reference} with put, get functions
2018-06-18 12:53 [PATCH 0/4] drm/nouveau: Replace {un/reference} with {put, get} functions Thomas Zimmermann
2018-06-18 12:53 ` [PATCH 1/4] drm/nouveau: Replace drm_connector_{un/reference} with put, get functions Thomas Zimmermann
@ 2018-06-18 12:53 ` Thomas Zimmermann
2018-06-18 12:53 ` [PATCH 3/4] drm/nouveau: Replace drm_gem_object_unreference_unlocked with put function Thomas Zimmermann
2018-06-18 12:53 ` [PATCH 4/4] drm/nouveau: Replace drm_dev_unref with drm_dev_put Thomas Zimmermann
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Zimmermann @ 2018-06-18 12:53 UTC (permalink / raw)
To: nouveau; +Cc: dri-devel, Thomas Zimmermann, bskeggs
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/nouveau/nouveau_fbcon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 85c1f10bc2b6..844498c4267c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -429,7 +429,7 @@ nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
nouveau_vma_del(&nouveau_fb->vma);
nouveau_bo_unmap(nouveau_fb->nvbo);
nouveau_bo_unpin(nouveau_fb->nvbo);
- drm_framebuffer_unreference(&nouveau_fb->base);
+ drm_framebuffer_put(&nouveau_fb->base);
}
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] 5+ messages in thread
* [PATCH 3/4] drm/nouveau: Replace drm_gem_object_unreference_unlocked with put function
2018-06-18 12:53 [PATCH 0/4] drm/nouveau: Replace {un/reference} with {put, get} functions Thomas Zimmermann
2018-06-18 12:53 ` [PATCH 1/4] drm/nouveau: Replace drm_connector_{un/reference} with put, get functions Thomas Zimmermann
2018-06-18 12:53 ` [PATCH 2/4] drm/nouveau: Replace drm_framebuffer_{un/reference} " Thomas Zimmermann
@ 2018-06-18 12:53 ` Thomas Zimmermann
2018-06-18 12:53 ` [PATCH 4/4] drm/nouveau: Replace drm_dev_unref with drm_dev_put Thomas Zimmermann
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Zimmermann @ 2018-06-18 12:53 UTC (permalink / raw)
To: nouveau; +Cc: dri-devel, Thomas Zimmermann, bskeggs
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/nouveau/dispnv04/crtc.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_display.c | 8 ++++----
drivers/gpu/drm/nouveau/nouveau_gem.c | 14 +++++++-------
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index 6aa6ee16dcbd..2c569e264df3 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -1017,7 +1017,7 @@ nv04_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
nv_crtc->cursor.set_offset(nv_crtc, nv_crtc->cursor.offset);
nv_crtc->cursor.show(nv_crtc, true);
out:
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
return ret;
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c
index e2211bb2cf79..e67a471331b5 100644
--- a/drivers/gpu/drm/nouveau/nouveau_abi16.c
+++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c
@@ -139,7 +139,7 @@ nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16,
if (chan->ntfy) {
nouveau_vma_del(&chan->ntfy_vma);
nouveau_bo_unpin(chan->ntfy);
- drm_gem_object_unreference_unlocked(&chan->ntfy->gem);
+ drm_gem_object_put_unlocked(&chan->ntfy->gem);
}
if (chan->heap.block_size)
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 774b429142bc..dfa236370726 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -205,7 +205,7 @@ nouveau_user_framebuffer_destroy(struct drm_framebuffer *drm_fb)
struct nouveau_framebuffer *fb = nouveau_framebuffer(drm_fb);
if (fb->nvbo)
- drm_gem_object_unreference_unlocked(&fb->nvbo->gem);
+ drm_gem_object_put_unlocked(&fb->nvbo->gem);
drm_framebuffer_cleanup(drm_fb);
kfree(fb);
@@ -287,7 +287,7 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
if (ret == 0)
return &fb->base;
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
return ERR_PTR(ret);
}
@@ -939,7 +939,7 @@ nouveau_display_dumb_create(struct drm_file *file_priv, struct drm_device *dev,
return ret;
ret = drm_gem_handle_create(file_priv, &bo->gem, &args->handle);
- drm_gem_object_unreference_unlocked(&bo->gem);
+ drm_gem_object_put_unlocked(&bo->gem);
return ret;
}
@@ -954,7 +954,7 @@ nouveau_display_dumb_map_offset(struct drm_file *file_priv,
if (gem) {
struct nouveau_bo *bo = nouveau_gem_object(gem);
*poffset = drm_vma_node_offset_addr(&bo->bo.vma_node);
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
return 0;
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 300daee74209..df73bec354e8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -274,7 +274,7 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
}
/* drop reference from allocate - handle holds it now */
- drm_gem_object_unreference_unlocked(&nvbo->gem);
+ drm_gem_object_put_unlocked(&nvbo->gem);
return ret;
}
@@ -354,7 +354,7 @@ validate_fini_no_ticket(struct validate_op *op, struct nouveau_fence *fence,
list_del(&nvbo->entry);
nvbo->reserved_by = NULL;
ttm_bo_unreserve(&nvbo->bo);
- drm_gem_object_unreference_unlocked(&nvbo->gem);
+ drm_gem_object_put_unlocked(&nvbo->gem);
}
}
@@ -400,14 +400,14 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
nvbo = nouveau_gem_object(gem);
if (nvbo == res_bo) {
res_bo = NULL;
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
continue;
}
if (nvbo->reserved_by && nvbo->reserved_by == file_priv) {
NV_PRINTK(err, cli, "multiple instances of buffer %d on "
"validation list\n", b->handle);
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
ret = -EINVAL;
break;
}
@@ -894,7 +894,7 @@ nouveau_gem_ioctl_cpu_prep(struct drm_device *dev, void *data,
ret = lret;
nouveau_bo_sync_for_cpu(nvbo);
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
return ret;
}
@@ -913,7 +913,7 @@ nouveau_gem_ioctl_cpu_fini(struct drm_device *dev, void *data,
nvbo = nouveau_gem_object(gem);
nouveau_bo_sync_for_device(nvbo);
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
return 0;
}
@@ -930,7 +930,7 @@ nouveau_gem_ioctl_info(struct drm_device *dev, void *data,
return -ENOENT;
ret = nouveau_gem_info(file_priv, gem, req);
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
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
* [PATCH 4/4] drm/nouveau: Replace drm_dev_unref with drm_dev_put
2018-06-18 12:53 [PATCH 0/4] drm/nouveau: Replace {un/reference} with {put, get} functions Thomas Zimmermann
` (2 preceding siblings ...)
2018-06-18 12:53 ` [PATCH 3/4] drm/nouveau: Replace drm_gem_object_unreference_unlocked with put function Thomas Zimmermann
@ 2018-06-18 12:53 ` Thomas Zimmermann
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Zimmermann @ 2018-06-18 12:53 UTC (permalink / raw)
To: nouveau; +Cc: dri-devel, Thomas Zimmermann, bskeggs
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/nouveau/nouveau_platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_platform.c b/drivers/gpu/drm/nouveau/nouveau_platform.c
index 1ada186fab77..039e23548e08 100644
--- a/drivers/gpu/drm/nouveau/nouveau_platform.c
+++ b/drivers/gpu/drm/nouveau/nouveau_platform.c
@@ -36,7 +36,7 @@ static int nouveau_platform_probe(struct platform_device *pdev)
ret = drm_dev_register(drm, 0);
if (ret < 0) {
- drm_dev_unref(drm);
+ drm_dev_put(drm);
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
end of thread, other threads:[~2018-06-18 12:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-18 12:53 [PATCH 0/4] drm/nouveau: Replace {un/reference} with {put, get} functions Thomas Zimmermann
2018-06-18 12:53 ` [PATCH 1/4] drm/nouveau: Replace drm_connector_{un/reference} with put, get functions Thomas Zimmermann
2018-06-18 12:53 ` [PATCH 2/4] drm/nouveau: Replace drm_framebuffer_{un/reference} " Thomas Zimmermann
2018-06-18 12:53 ` [PATCH 3/4] drm/nouveau: Replace drm_gem_object_unreference_unlocked with put function Thomas Zimmermann
2018-06-18 12:53 ` [PATCH 4/4] drm/nouveau: Replace drm_dev_unref with drm_dev_put Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox