From 0c6c113ac69cad1d233d7c8a0b545f1b699bbaea Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Wed, 11 Nov 2026 14:25:25 -0500 Subject: [PATCH 1/2] drm/apple: v14.7: J514M panel nits and swap timestamps The J514M runs the pinned J516C 14.7 DCP image, like the J516M, but its board record lacks the two flags the J516M record has. Without .swap_timestamps the image gets zero presentation stamps and holds the 120 Hz panel to 60 fps. Without .panel_nits, and with apple,j514m missing from dcp_v14_panel_nits_admit(), no swap level block is sent, DCP logs "IOMFB: Could not find Backlight service" and no apple-panel-bl backlight is registered, so brightness keys and brightnessctl do nothing. Give the J514M record both flags and admit apple,j514m to the bounded nits path, as for the J516M. Flip the KUnit and host tests that held the old values, and check that the J514M internal panel stamps its swaps and the external role does not. Two J514M owners (webdevtodayjason and techgyani) reported this change working in #333: 120.07 fps measured at 120 Hz, apple-panel-bl with a maximum of 500, and brightnessctl set and restore. Fixes: 5b4485da02a ("drm/apple: admit J514M native display on normal boots") Link: https://github.com/omacom/linux-aurora/issues/448 Link: https://github.com/omacom/linux-aurora/issues/333 Assisted-by: Claude:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 Signed-off-by: Scott Jones --- drivers/gpu/drm/apple/iomfb_v14_7.c | 7 ++++++- drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c | 5 ++++- drivers/gpu/drm/apple/v14-board-test.c | 4 +++- tools/asahi/t6034-display-tests.py | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/apple/iomfb_v14_7.c b/drivers/gpu/drm/apple/iomfb_v14_7.c index 7a6c96dfa1f74f..f91da959bd0a77 100644 --- a/drivers/gpu/drm/apple/iomfb_v14_7.c +++ b/drivers/gpu/drm/apple/iomfb_v14_7.c @@ -247,6 +247,10 @@ static const struct dcp_v14_board dcp_v14_board_j514m = { .handoff = "apple,t6034-handoff", .promotion = true, .log_bringup = true, + /* Same pinned DCP image as J516C: zero stamps cap this panel at 60 fps. */ + .swap_timestamps = true, + /* J516C's 14.7 image uses the bounded nits block for the J514 panel too. */ + .panel_nits = true, }; static const struct dcp_v14_board *const dcp_v14_boards[] = { @@ -1762,7 +1766,8 @@ static bool dcp_v14_panel_nits_admit(const struct dcp_v14_board *board, return board && board->panel_nits && (machine_is(ctx, "apple,j514s") || machine_is(ctx, "apple,j516s") || machine_is(ctx, "apple,j516c") || machine_is(ctx, "apple,j613") || - machine_is(ctx, "apple,j504") || machine_is(ctx, "apple,j516m")); + machine_is(ctx, "apple,j504") || machine_is(ctx, "apple,j516m") || + machine_is(ctx, "apple,j514m")); } const char *iomfb_v14_7_board_name(const struct dcp_v14_board *board) diff --git a/drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c b/drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c index 6f1b6ad2bfe967..3edce23c643b6f 100644 --- a/drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c +++ b/drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c @@ -122,7 +122,7 @@ static bool v14_bl_ctx_machine_is(const void *ctx, const char *compat) return !strcmp(((const char *const *)ctx)[1], compat); } -/* Only admitted T6030, J516C, J613 and J504 internal panels carry levels. */ +/* Only admitted T6030, J516C, J613, J504 and J514M internal panels carry levels. */ static void v14_bl_boards(struct kunit *test) { static const char *const t6030_j516s[] = { "apple,t6030-dcp", "apple,j516s" }; @@ -131,6 +131,7 @@ static void v14_bl_boards(struct kunit *test) static const char *const j615[] = { "apple,t8122-dcp", "apple,j615" }; static const char *const j504[] = { "apple,t8122-dcp", "apple,j504" }; static const char *const j516c[] = { "apple,t6031-dcp", "apple,j516c" }; + static const char *const j514m[] = { "apple,t6034-dcp", "apple,j514m" }; static const char *const other_t6030[] = { "apple,t6030-dcp", "apple,other" }; const struct dcp_v14_board *board; bool known; @@ -166,6 +167,8 @@ static void v14_bl_boards(struct kunit *test) KUNIT_ASSERT_NOT_NULL(test, board); KUNIT_EXPECT_TRUE(test, board->panel_nits); KUNIT_EXPECT_TRUE(test, dcp_v14_panel_nits_admit(board, v14_bl_ctx_machine_is, j516c)); + /* The J514M root is admitted too; its record's flag is in v14-board-test. */ + KUNIT_EXPECT_TRUE(test, dcp_v14_panel_nits_admit(board, v14_bl_ctx_machine_is, j514m)); } static void v14_bl_gate_transitions(struct kunit *test) diff --git a/drivers/gpu/drm/apple/v14-board-test.c b/drivers/gpu/drm/apple/v14-board-test.c index 858b5db4e2835d..2b2297d65b9b9f 100644 --- a/drivers/gpu/drm/apple/v14-board-test.c +++ b/drivers/gpu/drm/apple/v14-board-test.c @@ -127,7 +127,9 @@ static void v14_board_j514m(struct kunit *test) KUNIT_EXPECT_STREQ(test, b->handoff, "apple,t6034-handoff"); KUNIT_EXPECT_TRUE(test, dcp_v14_board_admits(b, J516C_DCP_IMAGE)); KUNIT_EXPECT_FALSE(test, dcp_v14_board_admits(b, T6030_DCP_IMAGE)); - KUNIT_EXPECT_FALSE(test, b->panel_nits); + KUNIT_EXPECT_TRUE(test, b->panel_nits); + KUNIT_EXPECT_TRUE(test, dcp_v14_board_stamps_swaps(b, false)); + KUNIT_EXPECT_FALSE(test, dcp_v14_board_stamps_swaps(b, true)); KUNIT_EXPECT_NULL(test, board_for("apple,t6034-dcp", j514m_wrong_soc, &known)); KUNIT_EXPECT_NULL(test, board_for("apple,t6034-dcp", j516m, &known)); KUNIT_EXPECT_NULL(test, board_for("apple,t6031-dcp", j514m, &known)); diff --git a/tools/asahi/t6034-display-tests.py b/tools/asahi/t6034-display-tests.py index 7647e4bcfebb0f..ebcbf138f5c96c 100644 --- a/tools/asahi/t6034-display-tests.py +++ b/tools/asahi/t6034-display-tests.py @@ -51,7 +51,7 @@ def item(s, marker): assert(known && (!!b)==expected); if(!b)continue; assert(!strcmp(b->handoff,"apple,t6034-handoff")); - assert(b->promotion && b->log_bringup && !b->ctm_set && !b->ctm_get && !b->panel_nits); + assert(b->promotion && b->log_bringup && !b->ctm_set && !b->ctm_get && b->panel_nits && b->swap_timestamps); assert(dcp_v14_board_admits(b,"F493F03E-CC40-3D89-9A08-5F259BA2B246")); assert(!dcp_v14_board_admits(b,"F493F03E-CC40-3D89-9A08-5F259BA2B247")); assert(!dcp_v14_board_admits(b,"f493f03e-cc40-3d89-9a08-5f259ba2b246")); From cbe32f37b285ecc0639a4dccc440ec325b55664b Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Wed, 11 Nov 2026 23:52:52 -0500 Subject: [PATCH 2/2] drm/apple: v14.7: name the records that stamp swaps in comments The v14 board test still said only the T6031 (J516C) internal panel stamps its swaps; the J516M and J514M records now set swap_timestamps too. Name the records by the flag rather than by SoC or firmware image, since the J514C runs the same image and does not stamp. The J514M record's comment also mentioned panel geometry that the record does not set. Comment-only; no functional change. Assisted-by: Claude:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 Signed-off-by: Scott Jones --- drivers/gpu/drm/apple/iomfb_v14_7.c | 2 +- drivers/gpu/drm/apple/v14-board-test.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/apple/iomfb_v14_7.c b/drivers/gpu/drm/apple/iomfb_v14_7.c index f91da959bd0a77..4126fffdddd95e 100644 --- a/drivers/gpu/drm/apple/iomfb_v14_7.c +++ b/drivers/gpu/drm/apple/iomfb_v14_7.c @@ -236,7 +236,7 @@ static const struct dcp_v14_board dcp_v14_board_j514c = { .log_bringup = true, }; -/* J514M's 14.7 DCP image and panel geometry; the root SoC is required too. */ +/* J514M's 14.7 DCP image; the root SoC is required too. */ static const struct dcp_v14_board dcp_v14_board_j514m = { .name = "J514M", .debugfs = "dcp-j514m", diff --git a/drivers/gpu/drm/apple/v14-board-test.c b/drivers/gpu/drm/apple/v14-board-test.c index 2b2297d65b9b9f..87e209246ee6b8 100644 --- a/drivers/gpu/drm/apple/v14-board-test.c +++ b/drivers/gpu/drm/apple/v14-board-test.c @@ -4,8 +4,9 @@ * and which DCP firmware image a record admits. The J516C (T6031) record * admits only the T6030 image, whose IOMFB layouts were validated, and * refuses every other; the existing records are unchanged. Which DCPs stamp - * their swaps: the internal panel of a T6031 record; the T6030 and T8122 - * panels and external processors keep zero timestamps, byte for byte. + * their swaps: the internal panel of a record with swap_timestamps set + * (J516C, J516M, J514M); the J514C, T6030 and T8122 panels and external + * processors keep zero timestamps, byte for byte. */ #include #include @@ -245,7 +246,10 @@ static void v14_board_unchanged(struct kunit *test) KUNIT_EXPECT_TRUE(test, known); } -/* Only the internal panel of the J516C record stamps its swaps. */ +/* + * Only the internal panel of a record with swap_timestamps set (J516C, J516M, + * J514M) stamps its swaps; J516M and J514M are checked in their own cases. + */ static void v14_board_swap_timestamps(struct kunit *test) { const struct dcp_v14_board *j516c_b, *j514c_b, *t6030_b, *j613_b;