From patchwork Mon May 25 01:48:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 246415 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Sun, 24 May 2020 19:48:48 -0600 Subject: [PATCH v2 11/26] video: Clear the copy framebuffer when clearing the screen In-Reply-To: <20200525014904.115621-1-sjg@chromium.org> References: <20200525014904.115621-1-sjg@chromium.org> Message-ID: <20200524194852.v2.11.Idb93182c5620fa4a55ad25cd4ef796bb8ce2241d@changeid> Update video_clear() to also sync to the copy framebuffer. Signed-off-by: Simon Glass Reviewed-by: Anatolij Gustschin --- Changes in v2: None drivers/video/video-uclass.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 0c97377ea9..4d6f950eab 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -94,6 +94,7 @@ int video_reserve(ulong *addrp) int video_clear(struct udevice *dev) { struct video_priv *priv = dev_get_uclass_priv(dev); + int ret; switch (priv->bpix) { case VIDEO_BPP16: @@ -118,6 +119,9 @@ int video_clear(struct udevice *dev) memset(priv->fb, priv->colour_bg, priv->fb_size); break; } + ret = video_sync_copy(dev, priv->fb, priv->fb + priv->fb_size); + if (ret) + return ret; return 0; }