[PATCH v5 05/13] dm: video: Add damage notification on display fills

Alper Nebi Yasak alpernebiyasak at gmail.com
Mon Aug 21 15:51:02 CEST 2023


From: Alexander Graf <agraf at csgraf.de>

Let's report the video damage when we fill parts of the screen. This
way we can later lazily flush only relevant regions to hardware.

Signed-off-by: Alexander Graf <agraf at csgraf.de>
Reported-by: Da Xue <da at libre.computer>
[Alper: Call video_damage() in video_fill_part(), edit commit message]
Signed-off-by: Alper Nebi Yasak <alpernebiyasak at gmail.com>
---
Does video_fill_part() need a video_sync(dev, false) here?

Changes in v5:
- Call video_damage() also in video_fill_part()

 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 447689581668..ebf409d839f0 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -203,6 +203,8 @@ int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend,
 	if (ret)
 		return ret;
 
+	video_damage(dev, xstart, ystart, xend - xstart, yend - ystart);
+
 	return 0;
 }
 
@@ -249,6 +251,8 @@ int video_fill(struct udevice *dev, u32 colour)
 	if (ret)
 		return ret;
 
+	video_damage(dev, 0, 0, priv->xsize, priv->ysize);
+
 	return video_sync(dev, false);
 }
 
-- 
2.40.1



More information about the U-Boot mailing list