Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1708947
| From | Sean Paul <seanpaul@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 21/29] drm/rockchip: switch to drm_*_get(), drm_*_put() helpers |
| Date | 2017-08-10 20:20 +0200 |
| Message-ID | <ud0dQ-Jr-9@gated-at.bofh.it> (permalink) |
| References | <ucUBs-5tj-9@gated-at.bofh.it> <ucUBs-5tj-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Aug 10, 2017 at 03:10:04PM +0300, Cihangir Akturk wrote:
> 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>
Hi Cihangir,
Thank you for the patch. Unfortunately it does not apply to drm-misc-next. Could
you please resend with conflicts resolved?
Thanks,
Sean
> ---
> drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 6 +++---
> drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 2 +-
> drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 4 ++--
> drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--
> 4 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
> index 81f9548..a933b58 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
> @@ -48,7 +48,7 @@ static void rockchip_drm_fb_destroy(struct drm_framebuffer *fb)
> int i;
>
> for (i = 0; i < ROCKCHIP_MAX_FB_BUFFER; i++)
> - drm_gem_object_unreference_unlocked(rockchip_fb->obj[i]);
> + drm_gem_object_put_unlocked(rockchip_fb->obj[i]);
>
> drm_framebuffer_cleanup(fb);
> kfree(rockchip_fb);
> @@ -144,7 +144,7 @@ rockchip_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
> width * drm_format_plane_cpp(mode_cmd->pixel_format, i);
>
> if (obj->size < min_size) {
> - drm_gem_object_unreference_unlocked(obj);
> + drm_gem_object_put_unlocked(obj);
> ret = -EINVAL;
> goto err_gem_object_unreference;
> }
> @@ -161,7 +161,7 @@ rockchip_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
>
> err_gem_object_unreference:
> for (i--; i >= 0; i--)
> - drm_gem_object_unreference_unlocked(objs[i]);
> + drm_gem_object_put_unlocked(objs[i]);
> return ERR_PTR(ret);
> }
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> index ce946b9..724579e 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> @@ -173,7 +173,7 @@ void rockchip_drm_fbdev_fini(struct drm_device *dev)
> drm_fb_helper_unregister_fbi(helper);
>
> if (helper->fb)
> - drm_framebuffer_unreference(helper->fb);
> + drm_framebuffer_put(helper->fb);
>
> drm_fb_helper_fini(helper);
> }
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
> index b74ac71..9f880d0 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
> @@ -383,7 +383,7 @@ rockchip_gem_create_with_handle(struct drm_file *file_priv,
> goto err_handle_create;
>
> /* drop reference from allocate - handle holds it now. */
> - drm_gem_object_unreference_unlocked(obj);
> + drm_gem_object_put_unlocked(obj);
>
> return rk_obj;
>
> @@ -414,7 +414,7 @@ int rockchip_gem_dumb_map_offset(struct drm_file *file_priv,
> DRM_DEBUG_KMS("offset = 0x%llx\n", *offset);
>
> out:
> - drm_gem_object_unreference_unlocked(obj);
> + drm_gem_object_put_unlocked(obj);
>
> return 0;
> }
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index 5d45033..12e17e6 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -1065,7 +1065,7 @@ static void vop_crtc_atomic_flush(struct drm_crtc *crtc,
> if (old_plane_state->fb == plane->state->fb)
> continue;
>
> - drm_framebuffer_reference(old_plane_state->fb);
> + drm_framebuffer_get(old_plane_state->fb);
> drm_flip_work_queue(&vop->fb_unref_work, old_plane_state->fb);
> set_bit(VOP_PENDING_FB_UNREF, &vop->pending);
> WARN_ON(drm_crtc_vblank_get(crtc) != 0);
> @@ -1189,7 +1189,7 @@ static void vop_fb_unref_worker(struct drm_flip_work *work, void *val)
> struct drm_framebuffer *fb = val;
>
> drm_crtc_vblank_put(&vop->crtc);
> - drm_framebuffer_unreference(fb);
> + drm_framebuffer_put(fb);
> }
>
> static void vop_handle_vblank(struct vop *vop)
> --
> 2.7.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Sean Paul, Software Engineer, Google / Chromium OS
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