aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox/include/asm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox/include/asm')
-rw-r--r--arch/sandbox/include/asm/sdl.h7
-rw-r--r--arch/sandbox/include/asm/test.h18
2 files changed, 25 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/sdl.h b/arch/sandbox/include/asm/sdl.h
index 47fc4889d2..25dbdb5944 100644
--- a/arch/sandbox/include/asm/sdl.h
+++ b/arch/sandbox/include/asm/sdl.h
@@ -26,6 +26,13 @@ int sandbox_sdl_init_display(int width, int height, int log2_bpp,
bool double_size);
/**
+ * sandbox_sdl_remove_display() - Remove the SDL screen
+ *
+ * @return 0 if OK, -ENOENT if the SDL had not been inited.
+ */
+int sandbox_sdl_remove_display(void);
+
+/**
* sandbox_sdl_sync() - Sync current U-Boot LCD frame buffer to SDL
*
* This must be called periodically to update the screen for SDL so that the
diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h
index dab1a4ea01..0aad827e9c 100644
--- a/arch/sandbox/include/asm/test.h
+++ b/arch/sandbox/include/asm/test.h
@@ -8,6 +8,8 @@
#ifndef __ASM_TEST_H
#define __ASM_TEST_H
+#include <video.h>
+
/* The sandbox driver always permits an I2C device with this address */
#define SANDBOX_I2C_TEST_ADDR 0x59
@@ -285,4 +287,20 @@ void sandbox_cros_ec_set_test_flags(struct udevice *dev, uint flags);
*/
int sandbox_cros_ec_get_pwm_duty(struct udevice *dev, uint index, uint *duty);
+/**
+ * sandbox_sdl_set_bpp() - Set the depth of the sandbox display
+ *
+ * The device must not be active when this function is called. It activiates it
+ * before returning.
+ *
+ * This updates the depth value and adjusts a few other settings accordingly.
+ * It must be called before the display is probed.
+ *
+ * @dev: Device to adjust
+ * @l2bpp: depth to set
+ * @return 0 if the device was already active, other error if it fails to probe
+ * after the change
+ */
+int sandbox_sdl_set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp);
+
#endif