mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/amd/display: use kunit/visibility.h for test helpers
@ 2026-09-07 13:28 Albert Esteve
  2026-09-07 13:28 ` [PATCH 1/3] drm/amd/display: replace STATIC_IFN_KUNIT with VISIBLE_IF_KUNIT Albert Esteve
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Albert Esteve @ 2026-09-07 13:28 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, David Airlie, Simona Vetter,
	Jonathan Corbet, Shuah Khan, Randy Dunlap
  Cc: amd-gfx, dri-devel, linux-kernel, linux-doc, Maxime Ripard,
	Albert Esteve

amdgpu_dm grew its own STATIC_IFN_KUNIT / EXPORT_IF_KUNIT /
INLINE_IFN_KUNIT macros instead of using kunit/visibility.h. This
series switches the KUnit helpers over to the common API.

VISIBLE_IF_KUNIT is gated on CONFIG_KUNIT rather than
CONFIG_DRM_AMD_DC_KUNIT_TEST, so the helpers are non-static whenever
KUnit is enabled. EXPORT_SYMBOL_IF_KUNIT places the symbols in the
EXPORTED_FOR_KUNIT_TESTING namespace; the AMD DC test files import
that namespace with MODULE_IMPORT_NS().

INLINE_IFN_KUNIT is dropped rather than generalized. It was only used
on amdgpu_dm_fixpt_from_s3132(), inverted the original static inline,
and is unnecessary for tests in another translation unit.

Tested with:
  ./tools/testing/kunit/kunit.py run --arch=x86_64 \
    --kunitconfig=drivers/gpu/drm/amd/display/amdgpu_dm/tests

(CONFIG_GCOV omitted; it is not available on x86_64.)

Suggested-by: Maxime Ripard <mripard@kernel.org>

Signed-off-by: Albert Esteve <aesteve@redhat.com>
---
Albert Esteve (3):
      drm/amd/display: replace STATIC_IFN_KUNIT with VISIBLE_IF_KUNIT
      drm/amd/display: replace EXPORT_IF_KUNIT with EXPORT_SYMBOL_IF_KUNIT
      drm/amd/display: drop INLINE_IFN_KUNIT

 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |  79 ++++-----
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_audio.c    |  26 +--
 .../amd/display/amdgpu_dm/amdgpu_dm_backlight.c    |  74 ++++----
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_color.c    | 133 +++++++--------
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c  |  12 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_connector.c    | 190 ++++++++++-----------
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c  |  38 ++---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c |  52 +++---
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_cursor.c   |  10 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_dmub.c |  30 ++--
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_freesync.c |  10 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 105 ++++++------
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c  | 140 +++++++--------
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c  | 146 ++++++++--------
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_ism.c  |  40 ++---
 .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c    |  60 +++----
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c    | 104 +++++------
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c   | 116 ++++++-------
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c  |  22 +--
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_quirks.c   |   4 +-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c   |   9 +-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c |  10 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c   |  18 +-
 .../display/amdgpu_dm/tests/amdgpu_dm_audio_test.c |   1 +
 .../amdgpu_dm/tests/amdgpu_dm_backlight_test.c     |   1 +
 .../display/amdgpu_dm/tests/amdgpu_dm_color_test.c |   1 +
 .../amdgpu_dm/tests/amdgpu_dm_colorop_test.c       |   1 +
 .../amdgpu_dm/tests/amdgpu_dm_connector_test.c     |   1 +
 .../display/amdgpu_dm/tests/amdgpu_dm_crc_test.c   |   1 +
 .../display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c  |   1 +
 .../amdgpu_dm/tests/amdgpu_dm_cursor_test.c        |   1 +
 .../display/amdgpu_dm/tests/amdgpu_dm_dmub_test.c  |   1 +
 .../amdgpu_dm/tests/amdgpu_dm_freesync_test.c      |   1 +
 .../display/amdgpu_dm/tests/amdgpu_dm_hdcp_test.c  |   1 +
 .../amdgpu_dm/tests/amdgpu_dm_helpers_test.c       |   1 +
 .../display/amdgpu_dm/tests/amdgpu_dm_irq_test.c   |   1 +
 .../display/amdgpu_dm/tests/amdgpu_dm_ism_test.c   |   1 +
 .../amdgpu_dm/tests/amdgpu_dm_kunit_helpers.c      |   1 +
 .../amdgpu_dm/tests/amdgpu_dm_mst_types_test.c     |   1 +
 .../display/amdgpu_dm/tests/amdgpu_dm_plane_test.c |   1 +
 .../amdgpu_dm/tests/amdgpu_dm_pp_smu_test.c        |   1 +
 .../display/amdgpu_dm/tests/amdgpu_dm_psr_test.c   |   1 +
 .../amdgpu_dm/tests/amdgpu_dm_quirks_test.c        |   1 +
 .../amdgpu_dm/tests/amdgpu_dm_replay_test.c        |   1 +
 .../amdgpu_dm/tests/amdgpu_dm_services_test.c      |   1 +
 .../amd/display/amdgpu_dm/tests/amdgpu_dm_test.c   |   1 +
 .../display/amdgpu_dm/tests/amdgpu_dm_wb_test.c    |   1 +
 drivers/gpu/drm/amd/display/dc/core/dc_sink.c      |   6 +-
 drivers/gpu/drm/amd/display/dc/core/dc_stream.c    |   2 +-
 drivers/gpu/drm/amd/display/dc/dm_helpers.h        |  13 +-
 tools/lib/python/kdoc/xforms_lists.py              |   3 +-
 51 files changed, 748 insertions(+), 728 deletions(-)
---
base-commit: bc35965f6940a9bf834d54187b6088b8eb09206d
change-id: 20260907-visibility-unification-fd358c580447

Best regards,
-- 
Albert Esteve <aesteve@redhat.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-07 15:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-07 13:28 [PATCH 0/3] drm/amd/display: use kunit/visibility.h for test helpers Albert Esteve
2026-09-07 13:28 ` [PATCH 1/3] drm/amd/display: replace STATIC_IFN_KUNIT with VISIBLE_IF_KUNIT Albert Esteve
2026-09-07 13:28 ` [PATCH 2/3] drm/amd/display: replace EXPORT_IF_KUNIT with EXPORT_SYMBOL_IF_KUNIT Albert Esteve
2026-09-07 13:28 ` [PATCH 3/3] drm/amd/display: drop INLINE_IFN_KUNIT Albert Esteve
2026-09-07 15:39   ` Jani Nikula
2026-09-07 15:24 ` [PATCH 0/3] drm/amd/display: use kunit/visibility.h for test helpers Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®