summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-11-13 21:22:06 (GMT)
committerSimon Glass <sjg@chromium.org>2016-11-26 00:59:31 (GMT)
commit7981394e550094bbbb2eb5e62065fa14c2ca77b0 (patch)
tree2adb318ec5d29dc46d1cb5c97a0fed5476ae50a6 /drivers/video
parent28f98858759f546afc21f852f556ac648c08089f (diff)
downloadu-boot-7981394e550094bbbb2eb5e62065fa14c2ca77b0.tar.xz
video: Use cache-alignment in video_sync()
Sometimes the frame buffer is not a multiple of the cache line size. Adjust the cache-flushing code to avoid cache warnings/errors in this case. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/video-uclass.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 11ca793..3036e3a 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -117,7 +117,8 @@ void video_sync(struct udevice *vid)
if (priv->flush_dcache) {
flush_dcache_range((ulong)priv->fb,
- (ulong)priv->fb + priv->fb_size);
+ ALIGN((ulong)priv->fb + priv->fb_size,
+ CONFIG_SYS_CACHELINE_SIZE));
}
#elif defined(CONFIG_VIDEO_SANDBOX_SDL)
struct video_priv *priv = dev_get_uclass_priv(vid);