Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1708547
| From | Cihangir Akturk <cakturk@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 11/29] drm/hisilicon: switch to drm_*_get(), drm_*_put() helpers |
| Date | 2017-08-10 14:20 +0200 |
| Message-ID | <ucUBv-5tj-97@gated-at.bofh.it> (permalink) |
| References | <ucUBs-5tj-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference()
and drm_*_unreference() helpers.
drm_*_reference() and drm_*_unreference() functions are just
compatibility alias for drm_*_get() and drm_*_put() and should not be
used by new code. So convert all users of compatibility functions to
use the new APIs.
Generated by: scripts/coccinelle/api/drm-get-put.cocci
Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 4 ++--
drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
index f5ac80d..c1034af 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
@@ -158,7 +158,7 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper,
out_unreserve_ttm_bo:
ttm_bo_unreserve(&bo->bo);
out_unref_gem:
- drm_gem_object_unreference_unlocked(gobj);
+ drm_gem_object_put_unlocked(gobj);
return ret;
}
@@ -173,7 +173,7 @@ static void hibmc_fbdev_destroy(struct hibmc_fbdev *fbdev)
drm_fb_helper_fini(fbh);
if (gfb)
- drm_framebuffer_unreference(&gfb->fb);
+ drm_framebuffer_put(&gfb->fb);
}
static const struct drm_fb_helper_funcs hibmc_fbdev_helper_funcs = {
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c
index ac457c7..3518167 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c
@@ -444,7 +444,7 @@ int hibmc_dumb_create(struct drm_file *file, struct drm_device *dev,
}
ret = drm_gem_handle_create(file, gobj, &handle);
- drm_gem_object_unreference_unlocked(gobj);
+ drm_gem_object_put_unlocked(gobj);
if (ret) {
DRM_ERROR("failed to unreference GEM object: %d\n", ret);
return ret;
@@ -479,7 +479,7 @@ int hibmc_dumb_mmap_offset(struct drm_file *file, struct drm_device *dev,
bo = gem_to_hibmc_bo(obj);
*offset = hibmc_bo_mmap_offset(bo);
- drm_gem_object_unreference_unlocked(obj);
+ drm_gem_object_put_unlocked(obj);
return 0;
}
@@ -487,7 +487,7 @@ static void hibmc_user_framebuffer_destroy(struct drm_framebuffer *fb)
{
struct hibmc_framebuffer *hibmc_fb = to_hibmc_framebuffer(fb);
- drm_gem_object_unreference_unlocked(hibmc_fb->obj);
+ drm_gem_object_put_unlocked(hibmc_fb->obj);
drm_framebuffer_cleanup(fb);
kfree(hibmc_fb);
}
@@ -543,7 +543,7 @@ hibmc_user_framebuffer_create(struct drm_device *dev,
hibmc_fb = hibmc_framebuffer_init(dev, mode_cmd, obj);
if (IS_ERR(hibmc_fb)) {
- drm_gem_object_unreference_unlocked(obj);
+ drm_gem_object_put_unlocked(obj);
return ERR_PTR((long)hibmc_fb);
}
return &hibmc_fb->fb;
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/29] DRM API Conversions Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:20 +0200
[PATCH v2 21/29] drm/rockchip: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:20 +0200
Re: [PATCH v2 21/29] drm/rockchip: switch to drm_*_get(), drm_*_put() helpers Sean Paul <seanpaul@chromium.org> - 2017-08-10 20:20 +0200
Re: [PATCH v2 21/29] drm/rockchip: switch to drm_*_get(), drm_*_put() helpers Sean Paul <seanpaul@chromium.org> - 2017-08-10 22:00 +0200
Re: [PATCH v2 21/29] drm/rockchip: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 22:00 +0200
[PATCH v2 23/29] drm/tilcdc: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:20 +0200
[PATCH v2 08/29] drm/etnaviv: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:20 +0200
[PATCH v2 25/29] drm/vc4: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:20 +0200
[PATCH v2 10/29] drm/gma500: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:20 +0200
[PATCH v2 15/29] drm/mgag200: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:20 +0200
[PATCH v2 14/29] drm/mediatek: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:20 +0200
[PATCH v2 16/29] drm/msm: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:20 +0200
[PATCH v2 05/29] drm/atmel-hlcdc: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:20 +0200
[PATCH v2 24/29] drm/udl: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:20 +0200
[PATCH v2 11/29] drm/hisilicon: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:20 +0200
[PATCH v2 02/29] drm: mali-dp: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:20 +0200
[PATCH v2 17/29] drm/nouveau: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:30 +0200
[PATCH v2 07/29] drm/cirrus: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:30 +0200
[PATCH v2 03/29] drm/armada: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:30 +0200
[PATCH v2 09/29] drm/exynos: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:30 +0200
[PATCH v2 20/29] drm/radeon: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:30 +0200
[PATCH v2 04/29] drm/ast: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:30 +0200
Re: [PATCH v2 04/29] drm/ast: switch to drm_*_get(), drm_*_put() helpers Joel Stanley <joel@jms.id.au> - 2017-08-11 01:40 +0200
[PATCH v2 22/29] drm/tegra: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:30 +0200
[PATCH v2 12/29] drm/i915: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:30 +0200
[PATCH v2 18/29] drm/omap: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:30 +0200
[PATCH v2 13/29] drm/imx: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:30 +0200
[PATCH v2 06/29] drm/bochs: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:30 +0200
[PATCH v2 19/29] drm/qxl: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:30 +0200
[PATCH v2 01/29] drm/amdgpu: switch to drm_*_get(), drm_*_put() helpers Cihangir Akturk <cakturk@gmail.com> - 2017-08-10 14:40 +0200
csiph-web