Repository navigation
drm/apple: test apple_typec_port_rgb8_only() - #2833
Conversation
apple_typec_port_rgb8_only() decides whether a Type-C connector gets the BT.2020/PQ output properties: it must not when any pipeline that can drive the port runs the native26 (ext26) IOMFB method set, which scans out XRGB8888 only. It had no test. Make it visible to KUnit (VISIBLE_IF_KUNIT, no change for non-KUnit builds) and add topology_rgb8_only_test to the apple-dcp-topology suite. It registers four ports over a 10-bit pipeline, an ext26 one and one without drvdata, and checks: no pipelines; any pipeline with an ext26 candidate after a 10-bit one; a single pipeline counting only its own method set, including one that is not a candidate for the port; a port the ext26 pipeline cannot drive; a candidate without drvdata being skipped; a port without routes and an index past the last port. No functional change. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Review at 17db3f1. The test calls the real
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial §1–§6 review at 17db3f1c46c43671d801f4d3d8a0da59afd85670: APPROVE (ready for MERGETRAIN-LINUX4).
Checklist Audit (§1–§6)
- §1 No model gating: Pass — test-only change exercising hardware-derived
DCP_IOMFB_METHODS_J613_EXT26(dcp_is_ext26()). - §2 Production-ready / zero regressions: Pass —
apple_drv.conly switchesapple_typec_port_rgb8_only()fromstatictoVISIBLE_IF_KUNIT(identicalstaticlinkage whenCONFIG_KUNITis off).dcp-fabric.hguards the prototype with#if IS_ENABLED(CONFIG_KUNIT), andapple_drv.cincludes it viadcp.h, keeping-Wmissing-prototypesclean across KUnit on/off configs. Becausedcp-fabric-topology-test.cis#included indcp-fabric.cwithin the sameappledrmmodule asapple_drv.c, no symbol export is needed. - §3 Safety / test hygiene: Pass —
topology_rgb8_init()registerstopology_rgb8_unlist()viakunit_add_action_or_reset(), which runs in LIFO order beforekunit_kzalloc()/kunit_platform_device_*teardown and cleans updcp_typec_portsunderdcp_typec_fabric_lockeven on init failure. - §4 Clean-room & attribution: Pass — single commit
17db3f1c46c4, human author/committer (Ryan Murray <ryan@aurorasilicon.org>) + humanSigned-off-by:only, zero AI trailers in commit; PR body includesAssisted-by:. - §5 Evidence: Pass (test-only) — arm64 QEMU
LLVM=1withdrivers/gpu/drm/apple/tests/topology.kunitconfig(apple-dcp-topology7/7, 201/202 overall with 1 unrelatedCONFIG_UCLAMP_TASKskip), 4/4 mutants killed (pipeline filter, candidate filter, early return on first candidate, NULLdrvdatacheck),checkpatch.pl --strictclean. - §6 Naming: Pass.
- CI & mergeability:
host-testsSUCCESS;MERGEABLE(CLEAN) againstintegration/aurora.
Non-blocking Follow-up Notes (echoing @RyanTheTide's self-review)
- Surviving mutants (
dcp-fabric-topology-test.c:488-527):- Neither
all[]nornodata_first[]putsext26at index0, sofor (i = 1; i < num_dcp; i++)inapple_drv.c:1279survives. Adding a case withext26at index0(e.g.,{ ext26, plain, nodata }withNULL, both->true) would kill it. RGB8_PLAINleavesiomfb_method_profile == 0(DCP_IOMFB_METHODS_DEFAULT), so a mutant replacingdcp_is_ext26(d)withd->hw.iomfb_method_profile != DCP_IOMFB_METHODS_DEFAULTwould also survive; setting a non-ext26 non-default profile (e.g.,DCP_IOMFB_METHODS_H17G) on a plain pipeline would close that too.
- Neither
- Pre-existing CI gap:
drivers/gpu/drm/apple/tests/topology.kunitconfigis not wired into any.github/workflows/*.yml(host-tests.ymlrunstools/asahi/run-host-tests.pyonly;mt7932-kunit.ymlis Wi-Fi only). Worth wiring in a separate CI follow-up so the suite runs automatically on PRs.
Assisted-by: LLM (Gemini 4 Neon)
|
Merge-train adversarial review (MERGETRAIN-LINUX4) at 17db3f1: no blockers. Merges clean on integration/aurora d84d1c5. Full reviewVERDICT: NO BLOCKERS
Nit (same as the earlier review): no case puts the ext26 pipeline at Assisted-by: LLM (Claude:Opus 5.5) |
|
Executed check at 8b360dc (integration/aurora tip, which is the #2833 merge of 17db3f1), arm64 qemu KUnit, LLVM=1, drivers/gpu/drm/apple/tests/topology.kunitconfig.
|
Problem
apple_typec_port_rgb8_only()(from #2783) decides whether a Type-C connector gets the BT.2020/PQ output properties: it must not when any pipeline that can drive the port runs the native26 (ext26) method set, which scans out XRGB8888 only. It had no test.Change
Make the function visible to KUnit (
VISIBLE_IF_KUNIT; builds without KUnit are unchanged) and addtopology_rgb8_only_testto the apple-dcp-topology suite. It registers four ports over a 10-bit pipeline, an ext26 pipeline and one without drvdata. It then checks the any-pipeline and single-pipeline scopes, the port-candidate filter, a candidate without drvdata being skipped, a port with no routes, and an index past the last port. No functional change.Testing
tests/topology.kunitconfig: apple-dcp-topology 7/7 (6/6 before). All suites in that config: 201 of 202 pass, with 1 skip (apple_g17_rx_util_min_testneeds CONFIG_UCLAMP_TASK, unrelated).checkpatch.pl --strict: clean.Still to run
Assisted-by: LLM (Claude:Opus 5.5)