if (priv->ycur < 0)
priv->ycur = 0;
}
- video_sync(dev->parent);
+ video_sync(dev->parent, false);
return 0;
}
}
priv->last_ch = 0;
- video_sync(dev->parent);
+ video_sync(dev->parent, false);
}
static const struct vid_rgb colors[VID_COLOR_COUNT] = {
if (mode == 2) {
video_clear(dev->parent);
- video_sync(dev->parent);
+ video_sync(dev->parent, false);
priv->ycur = 0;
priv->xcur_frac = priv->xstart_frac;
} else {
struct udevice *dev = sdev->priv;
vidconsole_put_char(dev, ch);
- video_sync(dev->parent);
+ video_sync(dev->parent, false);
}
static void vidconsole_puts(struct stdio_dev *sdev, const char *s)
while (*s)
vidconsole_put_char(dev, *s++);
- video_sync(dev->parent);
+ video_sync(dev->parent, false);
}
/* Set up the number of rows and colours (rotated drivers override this) */
for (s = argv[1]; *s; s++)
vidconsole_put_char(dev, *s);
- video_sync(dev->parent);
+ video_sync(dev->parent, false);
return 0;
}
}
/* Flush video activity to the caches */
-void video_sync(struct udevice *vid)
+void video_sync(struct udevice *vid, bool force)
{
/*
* flush_dcache_range() is declared in common.h but it seems that some
struct video_priv *priv = dev_get_uclass_priv(vid);
static ulong last_sync;
- if (get_timer(last_sync) > 10) {
+ if (force || get_timer(last_sync) > 10) {
sandbox_sdl_sync(priv->fb);
last_sync = get_timer(0);
}
dev;
uclass_find_next_device(&dev)) {
if (device_active(dev))
- video_sync(dev);
+ video_sync(dev, true);
}
}
* buffer are displayed to the user.
*
* @dev: Device to sync
+ * @force: True to force a sync even if there was one recently (this is
+ * very expensive on sandbox)
*/
-void video_sync(struct udevice *vid);
+void video_sync(struct udevice *vid, bool force);
/**
* video_sync_all() - Sync all devices' frame buffers with there hardware
/* reference clear: */
video_clear(con->parent);
- video_sync(con->parent);
+ video_sync(con->parent, false);
ut_asserteq(46, compress_frame_buffer(dev));
/* test clear escape sequence: [2J */