Skip to content

convert i915_active.count from atomic_t to refcount_t

Deepak R Varma dri-devel intel-gfx lkml oe-lkp 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v11 patch 0 repliesSuperseded

Changes in v2 from the cover letter

1. Patch series introduced.
2. Handle build issues Reported-by: kernel test robot <[email protected]> Earlier a standalone patch was sent for the i915 base driver only. The Kernel Test Robot reported failure for additional atomic_*() calls specific to i915 debugging support when enabled. This version now includes those changes as well.
3. Handle build issues Reported-by: kernel test robot <[email protected]> for i915/selftests Include changes for i915/selftests use cases for atomic_* to refcount_* transition.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/i915: convert i915_active.count from atomic_t to refcount_tdrivers/gpu/drm/i915/i915_active.c drivers/gpu/drm/i915/i915_active.h drivers/gpu/drm/i915/i915_active_types.h+20 -181 reply
2/2drm/i915/selftests: Convert atomic_* API calls for i915_active.count refcount_*drivers/gpu/drm/i915/selftests/i915_active.c+4 -40 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/2] convert i915_active.count from atomic_t to refcount_t

Transition the reference count member variable count of struct i915_active from atomic_t type to refcount_t type. This proposal is based on issues identified using the atomic_as_refcounter.cocci Coccinelle semantic patch script.

Patch 1/2: proposes to convert the base implementation of variable count from
atomic_t to refcount_t. This also includes the transition of atomic_*() API calls to their equivalent refcount_*() API calls.

Patch 2/2: proposes to transition the atomic_*() API calls in i915 selftest
use cases to their equivalent refcount_*() API calls.

Please Note:
1. Patch 1/2 should be applied before patch 2/2 due to interdependency.
2. I did not enable to the selftest and debug configurations earlier while building the i915 base driver. With the build failures reported by the Kernel Test Robot, I have now included those changes. I did not find any other configurations that required additional atomic_* API call transition for this member variable of struct i915_active. Please let me know if there are other related disabled configurations that I should be enable for additional code coverage.
3. Any guidance on working with i915/selftests would be very helpful for my learning.

Changes in v2:
1. Patch series introduced.
2. Handle build issues Reported-by: kernel test robot <[email protected]> Earlier a standalone patch was sent for the i915 base driver only. The Kernel Test Robot reported failure for additional atomic_*() calls specific to i915 debugging support when enabled. This version now includes those changes as well.
3. Handle build issues Reported-by: kernel test robot <[email protected]> for i915/selftests Include changes for i915/selftests use cases for atomic_* to refcount_* transition.

Deepak R Varma (2):
drm/i915: convert i915_active.count from atomic_t to refcount_t drm/i915/selftests: Convert atomic_* API calls for i915_active.count
refcount_*

 drivers/gpu/drm/i915/i915_active.c           | 28 +++++++++++---------
 drivers/gpu/drm/i915/i915_active.h           |  6 ++---
 drivers/gpu/drm/i915/i915_active_types.h     |  4 +--
 drivers/gpu/drm/i915/selftests/i915_active.c |  8 +++---
 4 files changed, 24 insertions(+), 22 deletions(-)

--
2.34.1