Skip to content

Commit 277e8e7

Browse files
committed
display: Exclude j413 from Sequoia workaround by changing the logic
It seems this model does not need it *and* it somehow causes nondeterministic problems. Also add a delay to the poweroff/on sequence to be more conservative. Fixes: #406 Signed-off-by: Hector Martin <[email protected]>
1 parent 9d445d8 commit 277e8e7

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/display.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ int display_configure(const char *config)
407407
if (display_needs_power_cycle) {
408408
if ((ret = dcp_ib_set_power(iboot, false)) < 0)
409409
printf("display: failed to set power off (continuing anyway)\n");
410+
mdelay(100);
410411
}
411412
// Sonoma bug workaround: Power on internal panel early
412413
if ((ret = dcp_ib_set_power(iboot, true)) < 0)
@@ -599,6 +600,16 @@ int display_init(void)
599600
else
600601
disp_path = "/arm-io/disp0";
601602

603+
bool has_notch = false;
604+
int product = adt_path_offset(adt, "/product");
605+
if (product < 0) {
606+
printf("/product node not found!\n");
607+
} else {
608+
u32 val = 0;
609+
ADT_GETPROP(adt, product, "partially-occluded-display", &val);
610+
has_notch = !!val;
611+
}
612+
602613
int node = adt_path_offset(adt, disp_path);
603614
if (node < 0) {
604615
printf("%s node not found!\n", disp_path);
@@ -623,7 +634,8 @@ int display_init(void)
623634
fb_clear_direct(); // Old m1n1 stage1 ends up with an ugly logo situation, clear it.
624635
return display_configure(NULL);
625636
#ifndef CHAINLOADING
626-
} else if ((chip_id == T8103 || chip_id == T8112) && firmware_sfw_in_range(V15_0B1, FW_MAX)) {
637+
} else if (!has_notch && firmware_sfw_in_range(V15_0B1, FW_MAX) &&
638+
os_firmware.version < V15_0B1) {
627639
printf("display: Internal display on t8103 or t8112 with Sequoia SFW, power cycling\n");
628640
display_needs_power_cycle = true;
629641
return display_configure(NULL);

0 commit comments

Comments
 (0)