video: Update video_set_default_colors() to support invert

It is useful to be able to invert the colours in some cases so that the
text matches the background colour. Add a parameter to the function to
support this.

It is strange that function takes a private data structure from another
driver as an argument. It seems better to pass the device and have the
function internally work out how to find its required information.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2018-11-06 15:21:36 -07:00
parent 4b6dbaa307
commit b9f210a35c
3 changed files with 23 additions and 11 deletions

View File

@@ -191,9 +191,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 */