Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2 0/3] lib/igt_hdcp: extract shared HDCP helpers from kms_content_protection
@ 2026-10-22 10:50 Sowmiya S
  2026-10-22 10:50 ` [PATCH i-g-t v2 1/3] lib/igt_hdcp: add shared HDCP helper library Sowmiya S
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Sowmiya S @ 2026-10-22 10:50 UTC (permalink / raw)
  To: igt-dev; +Cc: swati2.sharma, karthik.b.s, Sowmiya S

tests/kms_content_protection.c duplicates nearly every HDCP primitive
(enable, disable, Link Integrity Check wait, sink capability probing,
force-HDCP1.4 toggling, DP-MST topology grouping, etc.) between its
single-output and DP-MST code paths. This series pulls that mechanism
out into a new shared library, lib/igt_hdcp.{c,h}, so it isn't
maintained as two near-identical copies, and so it's available to
future HDCP-related tests (e.g. a concurrency test exercising HDCP
alongside other dependent modules) instead of being re-implemented
from scratch.

The functions are parametrized over output arrays (count == 1 for the
single-output case, count == N for DP-MST) so both code paths share
the exact same primitives rather than near-duplicate copies.
Test-specific policy - retry loops, FB/plane handling, SRM firmware
writing, uevent-vs-poll waiting, and the subtest tables - stays in the
test file; only the HDCP mechanism itself moves to the library.

Patch 1 adds the library. It's purely additive and not used by any
test yet, so it doesn't change behavior on its own.

Patch 2 switches kms_content_protection.c over to the new library,
removing its duplicated local helpers. Each call site's original
behavior is preserved exactly, including places where the
single-output and DP-MST paths used to differ subtly (LIC retry
tolerance, which output's name appears in a failure message, and
which outputs get actively polled vs. spot-checked during disable).

Patch 3 adds a "hdcp" subtest that reports whether at least one
connected output supports HDCP.

Sowmiya S (3):
  lib/igt_hdcp: add shared HDCP helper library
  tests/kms_content_protection: use shared igt_hdcp library
  tests/kms_feature_discovery: add hdcp capability discovery subtest

 lib/igt_hdcp.c                 | 423 +++++++++++++++++++++++++++++++
 lib/igt_hdcp.h                 |  67 +++++
 lib/meson.build                |   1 +
 tests/kms_content_protection.c | 444 +++++++--------------------------
 tests/kms_feature_discovery.c  |  26 ++
 5 files changed, 612 insertions(+), 349 deletions(-)
 create mode 100644 lib/igt_hdcp.c
 create mode 100644 lib/igt_hdcp.h

-- 
2.43.0


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

end of thread, other threads:[~2026-10-23  0:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-22 10:50 [PATCH i-g-t v2 0/3] lib/igt_hdcp: extract shared HDCP helpers from kms_content_protection Sowmiya S
2026-10-22 10:50 ` [PATCH i-g-t v2 1/3] lib/igt_hdcp: add shared HDCP helper library Sowmiya S
2026-10-22 10:50 ` [PATCH i-g-t v2 2/3] tests/kms_content_protection: use shared igt_hdcp library Sowmiya S
2026-10-22 10:50 ` [PATCH i-g-t v2 3/3] tests/kms_feature_discovery: add hdcp capability discovery subtest Sowmiya S
2026-10-22 11:58 ` ✓ Xe.CI.BAT: success for lib/igt_hdcp: extract shared HDCP helpers from kms_content_protection (rev2) Patchwork
2026-10-22 12:39 ` ✓ i915.CI.BAT: " Patchwork
2026-10-22 18:01 ` ✓ Xe.CI.FULL: " Patchwork
2026-10-22 23:59 ` ✓ i915.CI.Full: " Patchwork

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