Skip to content

Commit bb5c8e7

Browse files
committed
display: Try to modeset twice
This works around issues switching to 120Hz mode on systems affected by the Sonoma situation, and in general it's probably a good idea anyway. Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent 1b5741b commit bb5c8e7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/display.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,12 @@ int display_configure(const char *config)
400400

401401
// Set mode
402402
if ((ret = dcp_ib_set_mode(iboot, &tbest, &cbest)) < 0) {
403-
printf("display: failed to set mode\n");
404-
return -1;
403+
printf("display: failed to set mode. trying again...\n");
404+
mdelay(500);
405+
if ((ret = dcp_ib_set_mode(iboot, &tbest, &cbest)) < 0) {
406+
printf("display: failed to set mode twice.\n");
407+
return ret;
408+
}
405409
}
406410

407411
u64 fb_pa = cur_boot_args.video.base;

0 commit comments

Comments
 (0)