Skip to content

Commit

Permalink
display: Add NO_DISPLAY build config to skip display init
Browse files Browse the repository at this point in the history
Required for stage 1 loader to allow chainloaded display/dcp experiments
to start with the state left by iboot.

Signed-off-by: Janne Grunau <[email protected]>
  • Loading branch information
jannau authored and marcan committed Nov 27, 2023
1 parent 30485ea commit ba69847
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions src/display.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: MIT */

#include "../build/build_cfg.h"

#include "display.h"
#include "adt.h"
#include "assert.h"
Expand Down Expand Up @@ -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"))
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit ba69847

Please sign in to comment.