]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
video: Add a function to control cache flushing
authorSimon Glass <sjg@chromium.org>
Fri, 22 Jan 2016 02:44:52 +0000 (19:44 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 22 Jan 2016 03:42:36 +0000 (20:42 -0700)
Allow the cache-flushing function of a video device to be controlled.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/video/video-uclass.c
include/video.h

index 63d0d9d7d3f5586f41b06f288db51e58295c8d29..24d537e6c44ff37236e1b8b41049417c8f13147f 100644 (file)
  */
 DECLARE_GLOBAL_DATA_PTR;
 
+void video_set_flush_dcache(struct udevice *dev, bool flush)
+{
+       struct video_priv *priv = dev_get_uclass_priv(dev);
+
+       priv->flush_dcache = flush;
+}
+
 static ulong alloc_fb(struct udevice *dev, ulong *addrp)
 {
        struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
index b20f06f335d0d93eeeea260c2cc8513201490e9f..fa643ca5ab0219e3964c28d198db8605be0b9eaf 100644 (file)
@@ -158,6 +158,14 @@ int video_get_xsize(struct udevice *dev);
  */
 int video_get_ysize(struct udevice *dev);
 
+/**
+ * Set whether we need to flush the dcache when changing the image. This
+ * defaults to off.
+ *
+ * @param flush                non-zero to flush cache after update, 0 to skip
+ */
+void video_set_flush_dcache(struct udevice *dev, bool flush);
+
 #endif /* CONFIG_DM_VIDEO */
 
 #ifndef CONFIG_DM_VIDEO