aboutsummaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2020-12-03 09:30:00 +0100
committerMichal Simek <michal.simek@xilinx.com>2021-01-05 11:54:53 +0100
commit9d69c2d9a8eb27bfa2ac0ac1a0fc779f5eccb49b (patch)
tree3c4e106f7c8feb888469bf5e9b46a854d8929aae /drivers/video
parent9de731f295c5f1aa0f55f30b076b94f9cb72428e (diff)
downloadu-boot-9d69c2d9a8eb27bfa2ac0ac1a0fc779f5eccb49b.zip
u-boot-9d69c2d9a8eb27bfa2ac0ac1a0fc779f5eccb49b.tar.gz
u-boot-9d69c2d9a8eb27bfa2ac0ac1a0fc779f5eccb49b.tar.bz2
video: Introduce video_sync operation
Some drivers like LCD connected via SPI requires explicit sync function which copy framebuffer content over SPI to controller to display. This hook doesn't exist yet that's why introduce it via video operations. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/video-uclass.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 6fc4128..938e7d3 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -175,6 +175,15 @@ void video_set_default_colors(struct udevice *dev, bool invert)
/* Flush video activity to the caches */
int video_sync(struct udevice *vid, bool force)
{
+ struct video_ops *ops = video_get_ops(vid);
+ int ret;
+
+ if (ops && ops->video_sync) {
+ ret = ops->video_sync(vid);
+ if (ret)
+ return ret;
+ }
+
/*
* flush_dcache_range() is declared in common.h but it seems that some
* architectures do not actually implement it. Is there a way to find