#include <drm/drm_vblank.h>
#include <drm/vs_drm.h>
+#ifdef CONFIG_SIFIVE_FLUSH
+#include <soc/sifive/sifive_ccache.h>
+#endif
+
#include "vs_crtc.h"
#include "vs_dc_hw.h"
#include "vs_dc.h"
update_format(drm_fb->format->format, drm_fb->modifier, fb);
update_swizzle(drm_fb->format->format, fb);
update_watermark(plane_state->watermark, fb);
+
+#ifdef CONFIG_SIFIVE_FLUSH
+ starfive_flush_dcache(fb->y_address, fb->height * fb->y_stride);
+ if (fb->u_address)
+ starfive_flush_dcache(fb->u_address, fb->height * fb->u_stride);
+ if (fb->v_address)
+ starfive_flush_dcache(fb->v_address, fb->height * fb->v_stride);
+#endif
+
plane_state->status.tile_mode = fb->tile_mode;
}