Merge branch 'next'
[oweals/u-boot.git] / include / video.h
index 75200f0e4522c7975c31efd7081fe9fdb27e618c..e7c58e86cb490ea503467d185dd0ab0f6ec3ddeb 100644 (file)
@@ -17,6 +17,8 @@
 
 #include <stdio_dev.h>
 
+struct udevice;
+
 struct video_uc_platdata {
        uint align;
        uint size;
@@ -61,13 +63,16 @@ enum video_log2_bpp {
  * @font_size: Font size in pixels (0 to use a default value)
  * @fb:                Frame buffer
  * @fb_size:   Frame buffer size
- * @line_length:       Length of each frame buffer line, in bytes
+ * @line_length:       Length of each frame buffer line, in bytes. This can be
+ *             set by the driver, but if not, the uclass will set it after
+ *             probing
  * @colour_fg: Foreground colour (pixel value)
  * @colour_bg: Background colour (pixel value)
  * @flush_dcache:      true to enable flushing of the data cache after
  *             the LCD is updated
  * @cmap:      Colour map for 8-bit-per-pixel displays
  * @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)
  */
 struct video_priv {
        /* Things set up by the driver: */
@@ -90,6 +95,7 @@ struct video_priv {
        bool flush_dcache;
        ushort *cmap;
        u8 fg_col_idx;
+       u8 bg_col_idx;
 };
 
 /* Placeholder - there are no video operations at present */
@@ -191,9 +197,10 @@ void video_set_flush_dcache(struct udevice *dev, bool flush);
 /**
  * Set default colors and attributes
  *
- * @priv       device information
+ * @dev:       video device
+ * @invert     true to invert colours
  */
-void video_set_default_colors(struct video_priv *priv);
+void video_set_default_colors(struct udevice *dev, bool invert);
 
 #endif /* CONFIG_DM_VIDEO */