video: Provide an idle function for the console
Add a way to tell the console that the machine is idle. This will be used (later) to show the cursor. Call the video console sync after that, so that any updates are shown. Keep the video_sync_all() for the case where CONFIG_CURSOR is not enabled, to reduce code size. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -837,3 +837,7 @@ void vidconsole_set_bitmap_font(struct udevice *dev,
|
||||
}
|
||||
vc_priv->xstart_frac = 0;
|
||||
}
|
||||
|
||||
void vidconsole_idle(struct udevice *dev)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -621,7 +621,20 @@ int video_default_font_height(struct udevice *dev)
|
||||
|
||||
static void video_idle(struct cyclic_info *cyc)
|
||||
{
|
||||
video_sync_all();
|
||||
if (CONFIG_IS_ENABLED(CURSOR)) {
|
||||
struct udevice *cons;
|
||||
struct uclass *uc;
|
||||
|
||||
/* Handle cursor display for each video console */
|
||||
uclass_id_foreach_dev(UCLASS_VIDEO_CONSOLE, cons, uc) {
|
||||
if (device_active(cons)) {
|
||||
vidconsole_idle(cons);
|
||||
video_sync(cons->parent, true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
video_sync_all();
|
||||
}
|
||||
}
|
||||
|
||||
void video_set_white_on_black(struct udevice *dev, bool white_on_black)
|
||||
|
||||
Reference in New Issue
Block a user