From: Sumit Garg <sumit.garg@kernel.org>
To: Luca Weiss <luca.weiss@fairphone.com>
Cc: u-boot@lists.denx.de, u-boot-qcom@groups.io,
Anatolij Gustschin <ag.dev.uboot@gmail.com>,
Tom Rini <trini@konsulko.com>,
Igor Belwon <igor.belwon@mentallysanemainliners.org>,
Casey Connolly <casey.connolly@linaro.org>,
Neil Armstrong <neil.armstrong@linaro.org>
Subject: Re: [PATCH v2] video: simplefb: Map framebuffer region on probe on ARM64
Date: Mon, 13 Apr 2026 16:45:24 +0530 [thread overview]
Message-ID: <adzQTOUoUXp1Q7pc@sumit-xelite> (raw)
In-Reply-To: <20260408-simplefb-map-v2-1-c0a8dd497582@fairphone.com>
On Wed, Apr 08, 2026 at 02:04:28PM +0200, Luca Weiss wrote:
> The framebuffer buffer might not be mapped on some devices.
>
> This is #ifdef'ed for ARM64 since mmu_map_region() is not defined for
> any other architecture.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> Changes in v2:
> - Use ALIGN(plat->size, SZ_4K) instead of + 0x1000 (Casey)
> - Add log_warning in case framebuffer base is not 4k aligned (Casey)
> - Link to v1: https://lore.kernel.org/r/20260318-simplefb-map-v1-1-edec1ee81df1@fairphone.com
> ---
> drivers/video/simplefb.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
-Sumit
>
> diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
> index 8d0772d4e51..4d238b936ac 100644
> --- a/drivers/video/simplefb.c
> +++ b/drivers/video/simplefb.c
> @@ -9,6 +9,8 @@
> #include <log.h>
> #include <video.h>
> #include <asm/global_data.h>
> +#include <asm/system.h>
> +#include <linux/sizes.h>
>
> static int simple_video_probe(struct udevice *dev)
> {
> @@ -37,6 +39,13 @@ static int simple_video_probe(struct udevice *dev)
> plat->base = base;
> plat->size = size;
>
> +#ifdef CONFIG_ARM64
> + /* The framebuffer buffer might not be mapped on some devices */
> + if (plat->base % SZ_4K)
> + log_warning("Framebuffer base %lx is not 4k aligned!\n", plat->base);
> + mmu_map_region((phys_addr_t)plat->base, (phys_addr_t)ALIGN(plat->size, SZ_4K), false);
> +#endif
> +
> video_set_flush_dcache(dev, true);
>
> debug("%s: Query resolution...\n", __func__);
>
> ---
> base-commit: 88dc2788777babfd6322fa655df549a019aa1e69
> change-id: 20260318-simplefb-map-abb9dba0eed1
>
> Best regards,
> --
> Luca Weiss <luca.weiss@fairphone.com>
>
prev parent reply other threads:[~2026-04-13 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 12:04 [PATCH v2] video: simplefb: Map framebuffer region on probe on ARM64 Luca Weiss
2026-04-13 11:15 ` Sumit Garg [this message]
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=adzQTOUoUXp1Q7pc@sumit-xelite \
--to=sumit.garg@kernel.org \
--cc=ag.dev.uboot@gmail.com \
--cc=casey.connolly@linaro.org \
--cc=igor.belwon@mentallysanemainliners.org \
--cc=luca.weiss@fairphone.com \
--cc=neil.armstrong@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@groups.io \
--cc=u-boot@lists.denx.de \
/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