video: Only dcache flush damaged lines
authorAlexander Graf <agraf@csgraf.de>
Thu, 9 Jun 2022 22:59:20 +0000 (00:59 +0200)
committerSimon Glass <sjg@chromium.org>
Thu, 1 May 2025 10:32:07 +0000 (04:32 -0600)
commit4aaa19bd181adf9556b31c3dcd66635ae6594c70
tree478271eafeff555855510c2dab013e3ecd7d1e04
parent459dbcb24837bb57750e854ad3ec6e49e11171ec
video: Only dcache flush damaged lines

Now that we have a damage area tells us which parts of the frame buffer
actually need updating, let's only dcache flush those on video_sync()
calls. With this optimization in place, frame buffer updates - especially
on large screen such as 4k displays - speed up significantly.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
Reported-by: Da Xue <da@libre.computer>
[Alper: Use damage.xstart/yend, IS_ENABLED()]
Co-developed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Link: https://lore.kernel.org/u-boot/20230821135111.3558478-11-alpernebiyasak@gmail.com/
drivers/video/video-uclass.c