Skip to content

Commit bb0e9ac

Browse files
committed
display: Make M2+ desktop disable hack more generic
This should work on the Mac Pro. Signed-off-by: Hector Martin <[email protected]>
1 parent 9b73944 commit bb0e9ac

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

src/display.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "dcp_iboot.h"
88
#include "fb.h"
99
#include "memory.h"
10+
#include "soc.h"
1011
#include "string.h"
1112
#include "utils.h"
1213
#include "xnuboot.h"
@@ -462,14 +463,6 @@ int display_configure(const char *config)
462463

463464
int display_init(void)
464465
{
465-
// HACK: disable non-working display config on j473/j474s
466-
int model_node = adt_path_offset(adt, "/");
467-
if (model_node >= 0 && (adt_is_compatible(adt, model_node, "J473AP") ||
468-
adt_is_compatible(adt, model_node, "J474sAP"))) {
469-
printf("display: skipping init on non-supported j473/j474s\n");
470-
return 0;
471-
}
472-
473466
int node = adt_path_offset(adt, "/arm-io/disp0");
474467

475468
if (node < 0) {
@@ -483,6 +476,17 @@ int display_init(void)
483476
else
484477
printf("display: Display is internal\n");
485478

479+
// HACK: disable non-working display config on j473/j474s/etc
480+
if (display_is_external) {
481+
switch (chip_id) {
482+
case T8112:
483+
case T6020 ... T6022:
484+
printf("display: skipping init on non-supported M2+ platform\n");
485+
return 0;
486+
break;
487+
}
488+
}
489+
486490
if (cur_boot_args.video.width == 640 && cur_boot_args.video.height == 1136) {
487491
printf("display: Dummy framebuffer found, initializing display\n");
488492
return display_configure(NULL);

0 commit comments

Comments
 (0)