Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions drivers/gpu/drm/apple/iomfb_v14_7.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ static const struct dcp_v14_board dcp_v14_board_j516c = {
.log_bringup = true,
.base_edid = true,
.swap_timestamps = true,
/*
* The J516S panel and this image's swap carry the level block the
* T6030 record uses (present byte +0x354, binary64 nits +0x35c, 500 nits
* at most), as the e272b67 path on this J516C presented it.
*/
.panel_nits = true,
};

/*
Expand Down Expand Up @@ -292,7 +298,7 @@ struct apple_dcp_v14 {
u64 swaps;
u64 swap_ns_max;

/* Immutable probe admission: only the J514S/J516S internal panel. */
/* Immutable probe admission: only the J514S/J516S/J516C internal panel. */
bool panel_nits;
/* Copy of the last accepted surface; active_fb pins its DMA under lock. */
u8 shown_surface[DCP_V14_SURFACE_SIZE];
Expand Down Expand Up @@ -1690,7 +1696,8 @@ static bool dcp_v14_panel_nits_admit(const struct dcp_v14_board *board,
dcp_v14_compat_fn machine_is, const void *ctx)
{
return board && board->panel_nits &&
(machine_is(ctx, "apple,j514s") || machine_is(ctx, "apple,j516s"));
(machine_is(ctx, "apple,j514s") || machine_is(ctx, "apple,j516s") ||
machine_is(ctx, "apple,j516c"));
}

const char *iomfb_v14_7_board_name(const struct dcp_v14_board *board)
Expand Down
12 changes: 6 additions & 6 deletions drivers/gpu/drm/apple/iomfb_v14_7_backlight_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* 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 J613, J615 or J516C panel never initialises the backlight policy;
* RPC. A J613, 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.
*/
Expand Down Expand Up @@ -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 the T6030 record (J514S, J516S) carries levels. */
/* Only the T6030 record (J514S, J516S) and the J516C record carry levels. */
static void v14_bl_boards(struct kunit *test)
{
static const char *const t6030_j516s[] = { "apple,t6030-dcp", "apple,j516s" };
Expand Down Expand Up @@ -156,7 +156,8 @@ static void v14_bl_boards(struct kunit *test)
KUNIT_EXPECT_FALSE(test, board->panel_nits);
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_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, j516c));
}

static void v14_bl_gate_transitions(struct kunit *test)
Expand Down Expand Up @@ -342,14 +343,13 @@ static bool v14_bl_queued(struct apple_dcp_v14 *v14)
}

/*
* The production paths on J613, J615 and J516C: no policy is consulted, no
* The production paths on J613, J615 and 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_j613, &dcp_v14_board_j615, &dcp_v14_board_j516c,
&dcp_v14_board_j514c,
&dcp_v14_board_j613, &dcp_v14_board_j615, &dcp_v14_board_j514c,
};
struct dcp_backlight_present present;
unsigned int i;
Expand Down
Loading