]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - arch/sandbox/include/asm/sdl.h
sandbox: fix a compilation error
[thirdparty/u-boot.git] / arch / sandbox / include / asm / sdl.h
index 56dcb84803d332456cb032c7d5d9669e6e9a724b..ee4991f7c24aeb8518b3f97b1edd03809b30b213 100644 (file)
@@ -7,6 +7,7 @@
 #define __SANDBOX_SDL_H
 
 #include <errno.h>
+#include <video.h>
 
 #ifdef CONFIG_SANDBOX_SDL
 
@@ -87,6 +88,22 @@ int sandbox_sdl_sound_stop(void);
  */
 int sandbox_sdl_sound_init(int rate, int channels);
 
+/**
+ * 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);
+
 #else
 static inline int sandbox_sdl_init_display(int width, int height, int log2_bpp,
                                           bool double_size)
@@ -134,6 +151,12 @@ static inline int sandbox_sdl_sound_init(int rate, int channels)
        return -ENODEV;
 }
 
+static inline int sandbox_sdl_set_bpp(struct udevice *dev,
+                                     enum video_log2_bpp l2bpp)
+{
+       return -ENOSYS;
+}
+
 #endif
 
 #endif