Skip to content

Provide ttm_bo_{get,put} for TMM BO ref-counting

Thomas Zimmermann dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drm/ttm: Introduce ttm_bo_get() and ttm_bo_put() for ref countingdrivers/gpu/drm/ttm/ttm_bo.c include/drm/ttm/ttm_bo_api.h+31 -20 replies
2/3drm/ttm: Replace ttm_bo_reference() with ttm_bo_get()drivers/gpu/drm/ttm/ttm_bo_util.c drivers/gpu/drm/ttm/ttm_bo_vm.c+8 -50 replies
3/3drm/ttm: Replace ttm_bo_unref() with ttm_bo_put()drivers/gpu/drm/ttm/ttm_bo.c drivers/gpu/drm/ttm/ttm_bo_util.c drivers/gpu/drm/ttm/ttm_bo_vm.c+9 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Provide ttm_bo_{get,put} for TMM BO ref-counting

TTM buffer objects provide ttm_bo_reference() and ttm_bo_unref() for managing reference counters. This patch set introduces ttm_bo_get() and ttm_ot_put(), which follow Linux kernel conventions.

A call to ttm_bo_unref() clears the supplied pointer to NULL. This is unnecessary in most cases and occationally callers have to work around this behaviour. ttm_bo_put() only releases the reference, but keeps the pointer's value.

This patch set introduces ttm_bo_get() and ttm_bo_put(), and converts TTM to the new functions. The old functions remain in place until all callers have been converted.

Thomas Zimmermann (3):
drm/ttm: Introduce ttm_bo_get() and ttm_bo_put() for ref counting drm/ttm: Replace ttm_bo_reference() with ttm_bo_get() drm/ttm: Replace ttm_bo_unref() with ttm_bo_put()

 drivers/gpu/drm/ttm/ttm_bo.c      | 10 ++++++++--
 drivers/gpu/drm/ttm/ttm_bo_util.c | 11 ++++++-----
 drivers/gpu/drm/ttm/ttm_bo_vm.c   | 18 ++++++++++--------
 include/drm/ttm/ttm_bo_api.h      | 25 ++++++++++++++++++++++++-
 4 files changed, 48 insertions(+), 16 deletions(-)

--
2.14.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel