summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-04-02 06:29:33 +1300
committerTom Rini <[email protected]>2025-05-02 13:40:25 -0600
commit3ad5f49b5db4337626004629842d3dea30467c92 (patch)
tree69750f930abdf9a1ea05df347db979eb535c489b /include
parentfe2d4d4cef093d24da389fda29a556b15c84829b (diff)
video: Make white-on-black a video-device property
The CONFIG_WHITE_ON_BLACK setting is hard-coded at build-time. It is useful to be able to control this when showing menus. Create a property to hold this information, using the CONFIG as the initial value. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/video.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/video.h b/include/video.h
index 2fe2f73a865..0ec6b1ca289 100644
--- a/include/video.h
+++ b/include/video.h
@@ -100,6 +100,7 @@ enum video_format {
* @fg_col_idx: Foreground color code (bit 3 = bold, bit 0-2 = color)
* @bg_col_idx: Background color code (bit 3 = bold, bit 0-2 = color)
* @last_sync: Monotonic time of last video sync
+ * @white_on_black: Use a black background
*/
struct video_priv {
/* Things set up by the driver: */
@@ -131,6 +132,7 @@ struct video_priv {
u8 fg_col_idx;
u8 bg_col_idx;
ulong last_sync;
+ bool white_on_black;
};
/**
@@ -347,6 +349,16 @@ void video_set_flush_dcache(struct udevice *dev, bool flush);
void video_set_default_colors(struct udevice *dev, bool invert);
/**
+ * video_set_white_on_black() - Change the setting for white-on-black
+ *
+ * This does nothing if the setting is already the same.
+ *
+ * @dev: video device
+ * @white_on_black: true to use white-on-black, false for black-on-white
+ */
+void video_set_white_on_black(struct udevice *dev, bool white_on_black);
+
+/**
* video_default_font_height() - Get the default font height
*
* @dev: video device