From: Simon Glass <sjg@chromium.org> The video subsystem has a video_sync() function which does quite a few things and is rather hard to predict and control: - it may or may not actually sync, depending on a timer, etc - it may be called when U-Boot is idle, so any time delays can cause a sync These two problems make it hard to test. This series introduces a deterministic video_manual_sync() which does exactly what it is told, using a set of flags: VIDSYNC_FORCE - the force flag was provided (info for the driver) VIDSYNC_FLUSH - framebuffer changes should be flushed to hardware VIDSYNC_COPY - the copy framebuffer (if any) should be updated The video_sync() method is renamed to sync() and is passed the flags, so that drivers can find out what to do. This allows the sandbox-specific code in video_sync() to move to the driver. These features will (later) be used by expo to provide a better user experience, e.g. to sync only part of the display, or to sync quickly when there is mouse movement. The pointer also needs to be drawn with transparency which is not well supported by the BMP code. This series adds support for a simple transparency colour for now, although an alpha channel may be appropriate in the future. Simon Glass (22): doc: sandbox: Update command-line options documentation sandbox: Add -V flag for video test delay sandbox: Add --video_frames option to capture test frames sandbox: Add a comment for sandbox_sdl_get_mouse_event() video: Add a missing comment in struct video_uc_priv video: Add a pointer image video: Check drawing the mouse pointer video: Move setting of cte in write_pix8() to the top video: Support transparency in the inner bmp functions video: Use variables for each colour component video: Support transparency with 24bpp BMP image video: Support transparency with BMP palette video: Export a function to draw a BMP with transparency video: Add a struct video_bbox for damage tracking video: Rename video_sync() to sync() in struct video_ops video: Tidy up the comment for sync() video: Provide a way for expo to control video sync video: Add flags parameter to sync() operation video: Refactor video_sync() to use video_manual_sync() video: sandbox: Optimise drawing based on damage video: sandbox: Add sync() method for video video: sandbox: Add test for sync() damage rectangle arch/sandbox/cpu/sdl.c | 49 +++- arch/sandbox/cpu/start.c | 32 +++ arch/sandbox/include/asm/sdl.h | 16 +- arch/sandbox/include/asm/state.h | 3 + doc/arch/sandbox/sandbox.rst | 21 +- drivers/video/efi.c | 4 +- drivers/video/images/Makefile | 3 + drivers/video/images/riscos_arrow.bmp | Bin 0 -> 3798 bytes drivers/video/mcde_simple.c | 4 +- drivers/video/sandbox_sdl.c | 36 +++ drivers/video/seps525.c | 4 +- drivers/video/video-uclass.c | 110 ++++++-- drivers/video/video_bmp.c | 121 ++++++--- include/dm/test.h | 15 + include/video.h | 88 ++++-- include/video_defs.h | 37 +++ test/dm/video.c | 376 ++++++++++++++++++++++++-- 17 files changed, 802 insertions(+), 117 deletions(-) create mode 100644 drivers/video/images/riscos_arrow.bmp -- 2.43.0 base-commit: a598eddb938d1b62bba672aacda440c80352fcb7 branch: proc