summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-02-03 07:36:13 -0700
committerSimon Glass <sjg@chromium.org>2020-02-05 19:33:46 -0700
commit6be88c72828923f2df8c441ee12f5829e0d06f32 (patch)
tree74f7feec5110c1b44a13804e032b988e7f97d71c /drivers
parent96d0cd460430f18d0f22eead5409ed3dc53b4c4e (diff)
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 'drivers')
-rw-r--r--drivers/video/sandbox_sdl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
index 913651c565..d1272d0918 100644
--- a/drivers/video/sandbox_sdl.c
+++ b/drivers/video/sandbox_sdl.c
@@ -8,6 +8,7 @@
#include <fdtdec.h>
#include <video.h>
#include <asm/sdl.h>
+#include <asm/state.h>
#include <asm/u-boot-sandbox.h>
#include <dm/test.h>
@@ -23,9 +24,11 @@ static int sandbox_sdl_probe(struct udevice *dev)
{
struct sandbox_sdl_plat *plat = dev_get_platdata(dev);
struct video_priv *uc_priv = dev_get_uclass_priv(dev);
+ struct sandbox_state *state = state_get_current();
int ret;
- ret = sandbox_sdl_init_display(plat->xres, plat->yres, plat->bpix);
+ ret = sandbox_sdl_init_display(plat->xres, plat->yres, plat->bpix,
+ state->double_lcd);
if (ret) {
puts("LCD init failed\n");
return ret;