diff --git a/config.h b/config.h index 7ba01566..31c89387 100644 --- a/config.h +++ b/config.h @@ -12,6 +12,8 @@ // Minimal build for bring-up //#define BRINGUP +// Disable display configuration / bringup on desktop devices +//#define NO_DISPLAY // Print RTKit logs to the console //#define RTKIT_SYSLOG diff --git a/src/display.c b/src/display.c index 7145030c..19c5b697 100644 --- a/src/display.c +++ b/src/display.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: MIT */ +#include "../build/build_cfg.h" + #include "display.h" #include "adt.h" #include "assert.h" @@ -225,6 +227,11 @@ int display_start_dcp(void) if (iboot) return 0; +#ifdef NO_DISPLAY + printf("display: NO_DISPLAY!\n"); + return 0; +#endif + const display_config_t *disp_cfg = &display_config_m1; if (adt_is_compatible(adt, 0, "J473AP")) @@ -350,6 +357,11 @@ int display_configure(const char *config) dcp_timing_mode_t want; struct display_options opts = {0}; +#ifdef NO_DISPLAY + printf("display: skip configuration (NO_DISPLAY)\n"); + return 0; +#endif + display_parse_mode(config, &want, &opts); u64 start_time = get_ticks();