mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 2/3] video: stm: allocate uncached framebuffer memory as write-combine
Date: Fri,  7 Nov 2025 22:00:30 +0100	[thread overview]
Message-ID: <20251107210033.2229781-2-a.fatoum@barebox.org> (raw)
In-Reply-To: <20251107210033.2229781-1-a.fatoum@barebox.org>

For i.MX23 and i.MX28, this makes no difference as the MMU treats
write-combine and uncached the same on ARMv6 and earlier, but on
ARMv7 and above, use of the write combine buffer allows us to spend less
time pushing pixels.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 drivers/video/stm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/stm.c b/drivers/video/stm.c
index c5dadb823251..da006b7c240f 100644
--- a/drivers/video/stm.c
+++ b/drivers/video/stm.c
@@ -305,8 +305,8 @@ static int stmfb_activate_var(struct fb_info *fb_info)
 		remap_range(fbi->fixed_screen,
 				fbi->fixed_screen_size, MAP_UNCACHED);
 	} else {
-		fb_info->screen_base = dma_alloc_coherent(DMA_DEVICE_BROKEN,
-							  size, DMA_ADDRESS_BROKEN);
+		fb_info->screen_base = dma_alloc_writecombine(DMA_DEVICE_BROKEN,
+							      size, DMA_ADDRESS_BROKEN);
 		if (!fb_info->screen_base)
 			return -ENOMEM;
 		fbi->memory_size = size;
-- 
2.47.3




  reply	other threads:[~2025-11-07 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 21:00 [PATCH 1/3] video: stm: make multi-image compatible Ahmad Fatoum
2025-11-07 21:00 ` Ahmad Fatoum [this message]
2025-11-07 21:00 ` [PATCH 3/3] video: stm: add explicit support for i.MX6SX Ahmad Fatoum
2025-11-10  8:39 ` [PATCH 1/3] video: stm: make multi-image compatible Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251107210033.2229781-2-a.fatoum@barebox.org \
    --to=a.fatoum@barebox.org \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox