From: Alexander Graf Date: Thu, 9 Jun 2022 22:59:16 +0000 (+0200) Subject: dm: video: Add damage notification on display fills X-Git-Tag: v2025.07-rc2~45^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5ffd6bdb42748ca43d9fe6adc0d808cec3986dc;p=pandora-u-boot.git dm: video: Add damage notification on display fills 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 Reported-by: Da Xue [Alper: Move from video_clear() to video_fill(), video_fill_part()] Signed-off-by: Alper Nebi Yasak Reviewed-by: Simon Glass Link: https://lore.kernel.org/u-boot/20230821135111.3558478-6-alpernebiyasak@gmail.com/ --- diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 8e2edd7ec49..3933aeb9de4 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -214,6 +214,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; } @@ -264,6 +266,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); }