From nobody Mon Feb 9 13:58:27 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AB89C7EE2E for ; Fri, 9 Jun 2023 06:21:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237478AbjFIGV0 (ORCPT ); Fri, 9 Jun 2023 02:21:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237720AbjFIGVL (ORCPT ); Fri, 9 Jun 2023 02:21:11 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 656A92119 for ; Thu, 8 Jun 2023 23:21:09 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-51492ae66a4so2133471a12.1 for ; Thu, 08 Jun 2023 23:21:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1686291667; x=1688883667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iGNFX6HEdIKRiw8NKvPwhXc8R+GQd9GHBG/7VCCQih4=; b=M/5/NpTFFGCRpQ6Zin9qb9E+Y65G+15U8vBcdXBhKs2ziuqY9ne2OMuK1rKdp1YynY oa6vtGFNCboTCqlpxK6MP3hC0Z8+ZlqlWgCvLTrWhND0vLpGIyWQJmPWuF6cogAOP2js EClF5qAkMaZyWVM7yJWgvLRRy9WQ+t2GO8J3c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686291667; x=1688883667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iGNFX6HEdIKRiw8NKvPwhXc8R+GQd9GHBG/7VCCQih4=; b=J9tSJFVoorGsisBpJUdlS3g4rZ+DSV24NCNewIKYjfvyqO+Dr89g6tQgz4iDfYdwHz OeeL1nHp6Dq5ZSKxuLfdHGUr0jgdNJACD4vMq/OGeVazN+qaZHQKfE+KSqwBu7D2piXa KK9e3sTa5KvAso9cW2jEXWKjnL2VsSyn4jcd8FVqdVnksQltI/wluK7MJb7jPLaiGIIG 1DKQ1XQzCW7gOvwKDaX7OSTmdJFBICZF7XNn0OVBkUhIezD7v8uncBZixZcAb10RrrBS UhcShy2DJ8kxQShAnBk8F20jn2AOQZbu0uIgXQ1QVdfKouhgGNGW51Tmhbx/mRuOk1F2 FdxA== X-Gm-Message-State: AC+VfDy5K83GOV2OShSl60chIdIWvZpQ+BCP1fRTONxfKYc/ITYndCtG /H7GWw1X/UQTLr2sggJrKiJVhPFtooWz+fzhqkm26w== X-Google-Smtp-Source: ACHHUZ6XFmSe2W3rNoo+VrpWUwTaMcErolR4cjDWNXAD6nl5w7ToPb4VYcUVV/18CrO8h0BLGMsYWg== X-Received: by 2002:aa7:c40b:0:b0:517:6ed9:6629 with SMTP id j11-20020aa7c40b000000b005176ed96629mr416496edq.21.1686291667668; Thu, 08 Jun 2023 23:21:07 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-248-31-20.retail.telecomitalia.it. [95.248.31.20]) by smtp.gmail.com with ESMTPSA id m7-20020aa7d347000000b005149461b1e0sm1380058edr.25.2023.06.08.23.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 23:21:07 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Dario Binacchi , Alexandre Torgue , Daniel Vetter , David Airlie , Maxime Coquelin , Philippe Cornu , Raphael Gallais-Pou , Yannick Fertre , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v3 4/4] drm/stm: add an option to change FB bpp Date: Fri, 9 Jun 2023 08:20:50 +0200 Message-Id: <20230609062050.2107143-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230609062050.2107143-1-dario.binacchi@amarulasolutions.com> References: <20230609062050.2107143-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Boards that use the STM32F{4,7} series have limited amounts of RAM. The added parameter allows users to size, within certain limits, the memory footprint required by the framebuffer. Signed-off-by: Dario Binacchi Acked-by: Philippe Cornu --- Changes in v3: - drop [4/6] dt-bindings: display: simple: add Rocktech RK043FN48H Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc= -next): https://cgit.freedesktop.org/drm/drm-misc/commit/?id=3Dc42a37a27c777d6396= 1dd634a30f7c887949491a - drop [5/6] drm/panel: simple: add support for Rocktech RK043FN48H panel Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc= -next) https://cgit.freedesktop.org/drm/drm-misc/commit/?id=3D13cdd12a9f934158f4= ec817cf048fcb4384aa9dc drivers/gpu/drm/stm/drv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c index 422220df7d8c..65be2b442a6a 100644 --- a/drivers/gpu/drm/stm/drv.c +++ b/drivers/gpu/drm/stm/drv.c @@ -30,6 +30,11 @@ #define STM_MAX_FB_WIDTH 2048 #define STM_MAX_FB_HEIGHT 2048 /* same as width to handle orientation */ =20 +static uint stm_bpp =3D 16; + +MODULE_PARM_DESC(bpp, "bits-per-pixel (default: 16)"); +module_param_named(bpp, stm_bpp, uint, 0644); + static const struct drm_mode_config_funcs drv_mode_config_funcs =3D { .fb_create =3D drm_gem_fb_create, .atomic_check =3D drm_atomic_helper_check, @@ -93,6 +98,7 @@ static int drv_load(struct drm_device *ddev) ddev->mode_config.min_height =3D 0; ddev->mode_config.max_width =3D STM_MAX_FB_WIDTH; ddev->mode_config.max_height =3D STM_MAX_FB_HEIGHT; + ddev->mode_config.preferred_depth =3D stm_bpp; ddev->mode_config.funcs =3D &drv_mode_config_funcs; ddev->mode_config.normalize_zpos =3D true; =20 @@ -203,7 +209,7 @@ static int stm_drm_platform_probe(struct platform_devic= e *pdev) if (ret) goto err_put; =20 - drm_fbdev_dma_setup(ddev, 16); + drm_fbdev_dma_setup(ddev, stm_bpp); =20 return 0; =20 --=20 2.32.0