dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tdz@users.sourceforge.net>
To: dri-devel@lists.freedesktop.org
Cc: Thomas Zimmermann <tdz@users.sourceforge.net>
Subject: [PATCH 0/7] Replace {un/reference} with {put,get} functions
Date: Sat,  9 Jun 2018 15:17:58 +0200	[thread overview]
Message-ID: <20180609131805.2738-1-tdz@users.sourceforge.net> (raw)

This patch set replaces functions named {un,reference} by their {put,get}
counterparts. Each patch also removes the replaced functions from the DRM
core and deletes them from the related Coccinelle script.
Affected data types are struct drm_connector, struct drm_framebuffer,
struct drm_gem_object, and struct drm_device.

This change fixes the related item on the DRM TODO list.

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.

Possible future changes: Most of DRM's remaining {un/ref} functions
perform additional tasks besides reference counting and should
probably not be renamed. Exceptions are ttm_bo_{reference,unref} and
ttm_object_file_{un/ref}. These functions mostly perform reference
counting, but would require additional changes to the calling code
besides renaming.


Thomas Zimmermann (7):
  drm: Replace drm_connector_{un/reference} with drm_connector_{put,get}
  drm: Replace drm_framebuffer_{un/reference} with
    drm_framebuffer_{put,get}
  drm: Replace drm_gem_object_{un/reference} with
    drm_gem_object_{put,get}
  drm: Replace __drm_gem_object_unreference with __drm_gem_object_put
  drm: Replace drm_gem_object_unreference_unlocked with put function
  drm: Replace drm_dev_unref with drm_dev_put
  drm: Clean up after DRM put/get conversion

 Documentation/gpu/todo.rst                         | 17 -----
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c            |  4 +-
 drivers/gpu/drm/arc/arcpgu_drv.c                   |  8 +--
 drivers/gpu/drm/armada/armada_crtc.c               |  8 +--
 drivers/gpu/drm/armada/armada_drv.c                |  6 +-
 drivers/gpu/drm/armada/armada_overlay.c            |  2 +-
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c       |  8 +--
 drivers/gpu/drm/bochs/bochs_fbdev.c                |  2 +-
 drivers/gpu/drm/bochs/bochs_mm.c                   | 10 +--
 drivers/gpu/drm/drm_drv.c                          | 13 ----
 drivers/gpu/drm/etnaviv/etnaviv_drv.c              |  8 +--
 drivers/gpu/drm/exynos/exynos_drm_drv.c            |  4 +-
 drivers/gpu/drm/exynos/exynos_drm_fb.c             |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_gem.c            | 10 +--
 drivers/gpu/drm/exynos/exynos_drm_plane.c          |  2 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c          |  8 +--
 drivers/gpu/drm/gma500/framebuffer.c               |  2 +-
 drivers/gpu/drm/gma500/gem.c                       |  2 +-
 drivers/gpu/drm/gma500/gma_display.c               |  6 +-
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c    |  4 +-
 drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c    |  8 +--
 drivers/gpu/drm/i915/i915_gem_object.h             | 13 +---
 drivers/gpu/drm/i915/intel_display.c               |  4 +-
 drivers/gpu/drm/i915/intel_dp_mst.c                |  2 +-
 drivers/gpu/drm/i915/selftests/huge_pages.c        |  2 +-
 drivers/gpu/drm/i915/selftests/i915_gem_context.c  |  2 +-
 drivers/gpu/drm/i915/selftests/i915_gem_dmabuf.c   |  2 +-
 drivers/gpu/drm/i915/selftests/i915_gem_evict.c    |  2 +-
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c      |  2 +-
 drivers/gpu/drm/i915/selftests/i915_gem_object.c   |  2 +-
 drivers/gpu/drm/i915/selftests/i915_request.c      |  2 +-
 drivers/gpu/drm/i915/selftests/i915_vma.c          |  2 +-
 drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c |  2 +-
 drivers/gpu/drm/imx/imx-drm-core.c                 |  8 +--
 drivers/gpu/drm/mediatek/mtk_drm_drv.c             |  6 +-
 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 +-
 drivers/gpu/drm/mxsfb/mxsfb_drv.c                  |  4 +-
 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 +-
 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 +-
 drivers/gpu/drm/pl111/pl111_drv.c                  | 14 ++--
 drivers/gpu/drm/qxl/qxl_drv.c                      |  2 +-
 drivers/gpu/drm/rcar-du/rcar_du_drv.c              |  2 +-
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c        |  4 +-
 drivers/gpu/drm/shmobile/shmob_drm_drv.c           |  4 +-
 drivers/gpu/drm/sti/sti_drv.c                      |  8 +--
 drivers/gpu/drm/stm/drv.c                          | 10 +--
 drivers/gpu/drm/sun4i/sun4i_drv.c                  |  4 +-
 drivers/gpu/drm/tegra/drm.c                        |  8 +--
 drivers/gpu/drm/tinydrm/core/tinydrm-core.c        |  6 +-
 drivers/gpu/drm/tve200/tve200_drv.c                | 10 +--
 drivers/gpu/drm/udl/udl_drv.c                      |  2 +-
 drivers/gpu/drm/vc4/vc4_drv.c                      |  8 +--
 drivers/gpu/drm/vgem/vgem_drv.c                    |  2 +-
 drivers/gpu/drm/virtio/virtgpu_drm_bus.c           |  2 +-
 drivers/gpu/drm/zte/zx_drm_drv.c                   |  4 +-
 include/drm/drm_connector.h                        | 24 -------
 include/drm/drm_drv.h                              |  1 -
 include/drm/drm_framebuffer.h                      | 24 -------
 include/drm/drm_gem.h                              | 50 --------------
 scripts/coccinelle/api/drm-get-put.cocci           | 78 ----------------------
 75 files changed, 156 insertions(+), 372 deletions(-)
 delete mode 100644 scripts/coccinelle/api/drm-get-put.cocci

--
2.14.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2018-06-09 13:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-09 13:17 Thomas Zimmermann [this message]
2018-06-09 13:17 ` [PATCH 1/7] drm: Replace drm_connector_{un/reference} with drm_connector_{put, get} Thomas Zimmermann
2018-06-09 13:18 ` [PATCH 2/7] drm: Replace drm_framebuffer_{un/reference} with drm_framebuffer_{put, get} Thomas Zimmermann
2018-06-09 13:18 ` [PATCH 3/7] drm: Replace drm_gem_object_{un/reference} with drm_gem_object_{put, get} Thomas Zimmermann
2018-06-09 13:18 ` [PATCH 4/7] drm: Replace __drm_gem_object_unreference with __drm_gem_object_put Thomas Zimmermann
2018-06-09 13:18 ` [PATCH 5/7] drm: Replace drm_gem_object_unreference_unlocked with put function Thomas Zimmermann
2018-06-09 13:18 ` [PATCH 6/7] drm: Replace drm_dev_unref with drm_dev_put Thomas Zimmermann
2018-06-18  8:18   ` Benjamin Gaignard
2018-06-18 14:39   ` Philippe CORNU
2018-06-19 15:25   ` Alex Deucher
2018-06-09 13:18 ` [PATCH 7/7] drm: Clean up after DRM put/get conversion Thomas Zimmermann
2018-06-18  8:47 ` [PATCH 0/7] Replace {un/reference} with {put,get} functions Daniel Vetter
2018-06-18 11:06   ` Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180609131805.2738-1-tdz@users.sourceforge.net \
    --to=tdz@users.sourceforge.net \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox