Skip to content

Commit ba69847

Browse files
jannaumarcan
authored andcommitted
display: Add NO_DISPLAY build config to skip display init
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]>
1 parent 30485ea commit ba69847

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
// Minimal build for bring-up
1414
//#define BRINGUP
15+
// Disable display configuration / bringup on desktop devices
16+
//#define NO_DISPLAY
1517

1618
// Print RTKit logs to the console
1719
//#define RTKIT_SYSLOG

src/display.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/* SPDX-License-Identifier: MIT */
22

3+
#include "../build/build_cfg.h"
4+
35
#include "display.h"
46
#include "adt.h"
57
#include "assert.h"
@@ -225,6 +227,11 @@ int display_start_dcp(void)
225227
if (iboot)
226228
return 0;
227229

230+
#ifdef NO_DISPLAY
231+
printf("display: NO_DISPLAY!\n");
232+
return 0;
233+
#endif
234+
228235
const display_config_t *disp_cfg = &display_config_m1;
229236

230237
if (adt_is_compatible(adt, 0, "J473AP"))
@@ -350,6 +357,11 @@ int display_configure(const char *config)
350357
dcp_timing_mode_t want;
351358
struct display_options opts = {0};
352359

360+
#ifdef NO_DISPLAY
361+
printf("display: skip configuration (NO_DISPLAY)\n");
362+
return 0;
363+
#endif
364+
353365
display_parse_mode(config, &want, &opts);
354366

355367
u64 start_time = get_ticks();

0 commit comments

Comments
 (0)