From 30d8fd8d2710c82e552035a10b494ad54f866b82 Mon Sep 17 00:00:00 2001 From: Eric Juta Date: Tue, 24 Nov 2026 21:14:39 +0000 Subject: [PATCH 1/4] drm/apple: enable the J615 panel brightness path The J615 board record does not admit panel nits, so the working 14.7 display session never registers a backlight device: /sys/class/backlight is empty on the 15-inch M3 MacBook Air and brightness controls do nothing. The J615 runs the J613 DCP image (DCP_V14_J613_FIRMWARE_UUID) on the same T8122 DCP, and its device tree carries apple,max-brightness like the J613. Admit the J615 to the nits path the same way the J613 is admitted, keeping the firmware UUID and display handoff checks. J514C remains excluded. Run the existing swap-level KUnit case for J615 as well, and move it out of the boards whose production path must stay untouched. Signed-off-by: Eric Juta --- drivers/gpu/drm/apple/iomfb_v14_7.c | 4 +++- .../drm/apple/iomfb_v14_7_backlight_test.c | 24 ++++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/apple/iomfb_v14_7.c b/drivers/gpu/drm/apple/iomfb_v14_7.c index c6d3c66a0be27..400f31c768f1f 100644 --- a/drivers/gpu/drm/apple/iomfb_v14_7.c +++ b/drivers/gpu/drm/apple/iomfb_v14_7.c @@ -136,6 +136,7 @@ static const struct dcp_v14_board dcp_v14_board_j615 = { .panel_width = 2880, .panel_height = 1864, .promotion = false, + .panel_nits = true, .ctm_set = A(421), .ctm_get = A(420), }; @@ -1694,7 +1695,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,j516c") || machine_is(ctx, "apple,j613") || + machine_is(ctx, "apple,j615")); } 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 a84e45338793e..61d5c1026392c 100644 --- a/drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c +++ b/drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c @@ -8,9 +8,9 @@ * a refused level never becomes the actual one). * * The objects are built here, with no DCP: nothing in a case may reach an - * RPC. A J615 or J514C panel never initialises the backlight policy; - * its state is set to answer "yes" so that a case fails if anything on - * those boards looks at it. + * RPC. A J514C panel never initialises the backlight policy; its state is + * set to answer "yes" so that a case fails if anything on that board + * looks at it. */ #include #include @@ -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 and J613 internal panels carry levels. */ +/* Only admitted T6030, J516C, J613 and J615 internal panels carry levels. */ static void v14_bl_boards(struct kunit *test) { static const char *const t6030_j516s[] = { "apple,t6030-dcp", "apple,j516s" }; @@ -152,10 +152,10 @@ 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, j613)); - KUNIT_EXPECT_FALSE(test, dcp_v14_panel_nits_admit(board, v14_bl_ctx_machine_is, j615)); board = dcp_v14_board_select(v14_bl_ctx_dcp_is, v14_bl_ctx_machine_is, j615, &known); KUNIT_ASSERT_NOT_NULL(test, board); - KUNIT_EXPECT_FALSE(test, board->panel_nits); + KUNIT_EXPECT_TRUE(test, board->panel_nits); + KUNIT_EXPECT_TRUE(test, dcp_v14_panel_nits_admit(board, v14_bl_ctx_machine_is, j615)); board = dcp_v14_board_select(v14_bl_ctx_dcp_is, v14_bl_ctx_machine_is, j516c, &known); KUNIT_ASSERT_NOT_NULL(test, board); KUNIT_EXPECT_TRUE(test, board->panel_nits); @@ -348,13 +348,13 @@ static bool v14_bl_queued(struct apple_dcp_v14 *v14) } /* - * The production paths on J615 and J514C: no policy is consulted, no - * level is encoded, the work does nothing, sleep leaves the gate alone. + * The production path on J514C: no policy is consulted, no level is + * encoded, the work does nothing, sleep leaves the gate alone. */ static void v14_bl_other_boards_untouched(struct kunit *test) { const struct dcp_v14_board *boards[] = { - &dcp_v14_board_j615, &dcp_v14_board_j514c, + &dcp_v14_board_j514c, }; struct dcp_backlight_present present; unsigned int i; @@ -477,6 +477,11 @@ static void v14_bl_j613_swap_levels(struct kunit *test) v14_bl_swap_levels(test, &dcp_v14_board_j613); } +static void v14_bl_j615_swap_levels(struct kunit *test) +{ + v14_bl_swap_levels(test, &dcp_v14_board_j615); +} + /* * The gate, through the production queue path: open, a kick queues the work; * suspended, nothing queues until resume; closed, nothing ever does. The @@ -586,6 +591,7 @@ static struct kunit_case v14_backlight_cases[] = { KUNIT_CASE(v14_bl_external_untouched), KUNIT_CASE(v14_bl_t6030_swap_levels), KUNIT_CASE(v14_bl_j613_swap_levels), + KUNIT_CASE(v14_bl_j615_swap_levels), KUNIT_CASE(v14_bl_t6030_gate), KUNIT_CASE(v14_bl_t6030_work), {} From 9f8edbe0515e0a43fe45b210a74eb776ee0e14b3 Mon Sep 17 00:00:00 2001 From: Eric Juta Date: Wed, 25 Nov 2026 11:25:54 +0000 Subject: [PATCH 2/4] selftests: match J615 display tests by the panel node Signed-off-by: Eric Juta --- tools/asahi/dcp14-panel-tests.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/asahi/dcp14-panel-tests.py b/tools/asahi/dcp14-panel-tests.py index 353996cca3404..8238ce559ebe6 100755 --- a/tools/asahi/dcp14-panel-tests.py +++ b/tools/asahi/dcp14-panel-tests.py @@ -80,7 +80,12 @@ #ifdef OLD assert(IS_ERR(b));puts("old J615 board selection rejects: PASS");return 0; #else - assert(!IS_ERR(b) && b && b->panel_width==2880 && b->panel_height==1864); + assert(IS_ERR(b)); + panel.compatible="apple,panel-j615"; + b=iomfb_v14_7_board(&dev); + assert(!IS_ERR(b) && b && b->panel_width==2880 && b->panel_height==1864 && b->panel_nits); + machine="apple,other";assert(iomfb_v14_7_board(&dev)==b); + panel.compatible=NULL; assert(!strcmp(b->firmware_uuid,"90F849E1-B422-367E-B389-50246F8DEC47")); assert(!strcmp(b->handoff,"apple,t8122-handoff") && !b->promotion); image_uuid=b->firmware_uuid;assert(probe_gate(&dev,b)==0); @@ -110,7 +115,7 @@ assert(dcp_v14_geometry(&q)==0&&q.panel_height==1964&&q.notch_rows==74); height=1964;notch=0;assert(dcp_v14_geometry(&q)==0&&q.panel_height==1964); width=2560;height=1600;stride=width*4;notch=64;assert(dcp_v14_geometry(&q)==-EINVAL);} - /* The Airs keep their machine records whatever the panel node says. */ + /* J613 keeps its machine record; J615 and J504 match the panel. */ machine="apple,j613";assert(iomfb_v14_7_board(&dev)==j); /* Other T8122 Macs (J433/J434 iMacs, no J504 panel) have no record. */ panel.compatible=NULL; From 0b3e63b43db89691f84f46a890f6426c527abc92 Mon Sep 17 00:00:00 2001 From: Eric Juta Date: Wed, 25 Nov 2026 11:26:32 +0000 Subject: [PATCH 3/4] drm/apple: keep enabled J615 out of the negative backlight fixture Signed-off-by: Eric Juta --- drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 aaf549ecd8ec3..c40b147aeb3c2 100644 --- a/drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c +++ b/drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c @@ -384,7 +384,7 @@ static bool v14_bl_queued(struct apple_dcp_v14 *v14) static void v14_bl_other_boards_untouched(struct kunit *test) { const struct dcp_v14_board *boards[] = { - &dcp_v14_board_j615, &dcp_v14_board_j514c, + &dcp_v14_board_j514c, }; struct dcp_backlight_present present; unsigned int i; From 52bc662b3fde6fc5858fbe7308c72b3ac7e69400 Mon Sep 17 00:00:00 2001 From: Eric Juta Date: Wed, 25 Nov 2026 11:27:05 +0000 Subject: [PATCH 4/4] drm/apple: describe the remaining negative backlight case Signed-off-by: Eric Juta --- drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c40b147aeb3c2..3eea1558792fe 100644 --- a/drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c +++ b/drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c @@ -378,7 +378,7 @@ static bool v14_bl_queued(struct apple_dcp_v14 *v14) } /* - * The production paths on J615 and J514C: no policy is consulted, no + * The production paths on J514C: no policy is consulted, no * level is encoded, the work does nothing, sleep leaves the gate alone. */ static void v14_bl_other_boards_untouched(struct kunit *test)