[{"id":3676654,"web_url":"http://patchwork.ozlabs.org/comment/3676654/","msgid":"<adzQTOUoUXp1Q7pc@sumit-xelite>","list_archive_url":null,"date":"2026-04-13T11:15:24","subject":"Re: [PATCH v2] video: simplefb: Map framebuffer region on probe on\n ARM64","submitter":{"id":90400,"url":"http://patchwork.ozlabs.org/api/people/90400/","name":"Sumit Garg","email":"sumit.garg@kernel.org"},"content":"On Wed, Apr 08, 2026 at 02:04:28PM +0200, Luca Weiss wrote:\n> The framebuffer buffer might not be mapped on some devices.\n> \n> This is #ifdef'ed for ARM64 since mmu_map_region() is not defined for\n> any other architecture.\n> \n> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>\n> ---\n> Changes in v2:\n> - Use ALIGN(plat->size, SZ_4K) instead of + 0x1000 (Casey)\n> - Add log_warning in case framebuffer base is not 4k aligned (Casey)\n> - Link to v1: https://lore.kernel.org/r/20260318-simplefb-map-v1-1-edec1ee81df1@fairphone.com\n> ---\n>  drivers/video/simplefb.c | 9 +++++++++\n>  1 file changed, 9 insertions(+)\n\nAcked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>\n\n-Sumit\n\n> \n> diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c\n> index 8d0772d4e51..4d238b936ac 100644\n> --- a/drivers/video/simplefb.c\n> +++ b/drivers/video/simplefb.c\n> @@ -9,6 +9,8 @@\n>  #include <log.h>\n>  #include <video.h>\n>  #include <asm/global_data.h>\n> +#include <asm/system.h>\n> +#include <linux/sizes.h>\n>  \n>  static int simple_video_probe(struct udevice *dev)\n>  {\n> @@ -37,6 +39,13 @@ static int simple_video_probe(struct udevice *dev)\n>  \tplat->base = base;\n>  \tplat->size = size;\n>  \n> +#ifdef CONFIG_ARM64\n> +\t/* The framebuffer buffer might not be mapped on some devices */\n> +\tif (plat->base % SZ_4K)\n> +\t\tlog_warning(\"Framebuffer base %lx is not 4k aligned!\\n\", plat->base);\n> +\tmmu_map_region((phys_addr_t)plat->base, (phys_addr_t)ALIGN(plat->size, SZ_4K), false);\n> +#endif\n> +\n>  \tvideo_set_flush_dcache(dev, true);\n>  \n>  \tdebug(\"%s: Query resolution...\\n\", __func__);\n> \n> ---\n> base-commit: 88dc2788777babfd6322fa655df549a019aa1e69\n> change-id: 20260318-simplefb-map-abb9dba0eed1\n> \n> Best regards,\n> --  \n> Luca Weiss <luca.weiss@fairphone.com>\n>","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=Qi6lZ5to;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.b=\"Qi6lZ5to\";\n\tdkim-atps=neutral","phobos.denx.de; dmarc=pass (p=quarantine dis=none)\n header.from=kernel.org","phobos.denx.de;\n spf=pass smtp.mailfrom=sumit.garg@kernel.org"],"Received":["from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvPwC5g9Hz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 21:15:39 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 6DB4D839DF;\n\tMon, 13 Apr 2026 13:15:36 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id B01E383EC6; Mon, 13 Apr 2026 13:15:34 +0200 (CEST)","from sea.source.kernel.org (sea.source.kernel.org\n [IPv6:2600:3c0a:e001:78e:0:1991:8:25])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 57F00839D5\n for <u-boot@lists.denx.de>; Mon, 13 Apr 2026 13:15:32 +0200 (CEST)","from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by sea.source.kernel.org (Postfix) with ESMTP id BC78D41866;\n Mon, 13 Apr 2026 11:15:30 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id DA6C1C116C6;\n Mon, 13 Apr 2026 11:15:27 +0000 (UTC)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1776078930;\n bh=zBL/m0Ovr8OZ8DI04mu/byvz7RL14D+vXDvB7uYjZu4=;\n h=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n b=Qi6lZ5toeeTkvtubfgs+S3ZjJHlT5nepJovCeAgq3MsRBM2dgYJOPRgbhpg0QsVjw\n hkWQJ9B3cclGYexvqpKf3E7GaCkvB1aaijq/tANL8TAkMSsH40wifXh3j56ijBsVOc\n +yt3RUGh4pttzzB0Phe0/GmchrgIWHlIccqL719YZp1RxVe4HpMLy1cl6NNrw7j79Z\n bV/2/zriz/zFxD+DDooFzRc7C0+l1jP66iNcWwJONc1+ozLrD0vlnBSSHzScNaba90\n xluuT9g9Hv+CNgtdR2FP3our3Zy2y7JIxhIBZNjvMLFo24SFUDqYf/PW2DsUH1+c1e\n uMEXVjjHa2DCg==","Date":"Mon, 13 Apr 2026 16:45:24 +0530","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,\n Anatolij Gustschin <ag.dev.uboot@gmail.com>, Tom Rini <trini@konsulko.com>,\n Igor Belwon <igor.belwon@mentallysanemainliners.org>,\n Casey Connolly <casey.connolly@linaro.org>,\n Neil Armstrong <neil.armstrong@linaro.org>","Subject":"Re: [PATCH v2] video: simplefb: Map framebuffer region on probe on\n ARM64","Message-ID":"<adzQTOUoUXp1Q7pc@sumit-xelite>","References":"<20260408-simplefb-map-v2-1-c0a8dd497582@fairphone.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260408-simplefb-map-v2-1-c0a8dd497582@fairphone.com>","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"}}]