diff options
author | Simon Glass <sjg@chromium.org> | 2020-02-03 17:36:13 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-02-06 05:33:46 +0300 |
commit | 6be88c72828923f2df8c441ee12f5829e0d06f32 (patch) | |
tree | 74f7feec5110c1b44a13804e032b988e7f97d71c /arch/sandbox/include | |
parent | 96d0cd460430f18d0f22eead5409ed3dc53b4c4e (diff) | |
download | u-boot-6be88c72828923f2df8c441ee12f5829e0d06f32.tar.xz |
sandbox: sdl: Add an option to double the screen size
On high-DPI displays U-Boot's LCD window can look very small. Add a
-K flag to expand it to make things easier to read, while still using
the existing resolution internally.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r-- | arch/sandbox/include/asm/sdl.h | 9 | ||||
-rw-r--r-- | arch/sandbox/include/asm/state.h | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/arch/sandbox/include/asm/sdl.h b/arch/sandbox/include/asm/sdl.h index c45dbddd70..47fc4889d2 100644 --- a/arch/sandbox/include/asm/sdl.h +++ b/arch/sandbox/include/asm/sdl.h @@ -17,10 +17,13 @@ * @height Window height in pixels * @log2_bpp: Log to base 2 of the number of bits per pixel. So a 32bpp * display will pass 5, since 2*5 = 32 + * @double_size: true to double the visible size in each direction for high-DPI + * displays * @return 0 if OK, -ENODEV if no device, -EIO if SDL failed to initialize * and -EPERM if the video failed to come up. */ -int sandbox_sdl_init_display(int width, int height, int log2_bpp); +int sandbox_sdl_init_display(int width, int height, int log2_bpp, + bool double_size); /** * sandbox_sdl_sync() - Sync current U-Boot LCD frame buffer to SDL @@ -78,8 +81,8 @@ int sandbox_sdl_sound_stop(void); int sandbox_sdl_sound_init(int rate, int channels); #else -static inline int sandbox_sdl_init_display(int width, int height, - int log2_bpp) +static inline int sandbox_sdl_init_display(int width, int height, int log2_bpp, + bool double_size) { return -ENODEV; } diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h index ad3e94beb9..705645d714 100644 --- a/arch/sandbox/include/asm/state.h +++ b/arch/sandbox/include/asm/state.h @@ -83,6 +83,7 @@ struct sandbox_state { bool write_state; /* Write sandbox state on exit */ bool ignore_missing_state_on_read; /* No error if state missing */ bool show_lcd; /* Show LCD on start-up */ + bool double_lcd; /* Double display size for high-DPI */ enum sysreset_t last_sysreset; /* Last system reset type */ bool sysreset_allowed[SYSRESET_COUNT]; /* Allowed system reset types */ enum state_terminal_raw term_raw; /* Terminal raw/cooked */ |