From patchwork Mon Jun 19 16:55:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13284833 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B8B22EB64DA for ; Mon, 19 Jun 2023 16:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dO5pqlWjDNcMVLa94QY4DYffVMTb9X274dv6dLysfO4=; b=xJjnHNA/6a9hqP ntM9ENNttkudT+Nm+IXUxNunU6t9f+jsXI5lezrDR8QQ0NSntmC//HhJoGuuvw4tdyXst8GxhmJuI fQdYtzHgWv0HgZ7OuNXC7wVpvYkMJekRwxU4J/riB3630aHE7uF9qzBdFMcW6CAlgbQCZJuGz1xGX sVfUZawdSPJ84DI25GtRV0M6xyOLePtb61YBZR/msMAJ8YZh7WCq5LzeBBE2Pza2B4AqD5B9EiBoY uIpeiAAucEqfaB7CJo8HRAAJmsx+iQbf8XguAD9GETb/lSAX9zsOqrC0KAgW72LFWSb+1C/ZJ6fa8 QjK5eZai9IO/QLsu67pQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qBIAq-0090aG-3C; Mon, 19 Jun 2023 16:56:17 +0000 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qBIAa-0090Q4-2K for linux-arm-kernel@lists.infradead.org; Mon, 19 Jun 2023 16:56:02 +0000 Received: by mail-qk1-x735.google.com with SMTP id af79cd13be357-76242a24e3aso187775885a.1 for ; Mon, 19 Jun 2023 09:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1687193757; x=1689785757; 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=KnZNU/I8hVx/txQg+gZcbNdILNkL1d9QJiWI/0DW9wI=; b=FZytthrbCYDv3RZOtaTdlEZCVgoapIc+1yj309YHwRqE+CagPIrZRG0F4niNuuyc3M wLe5zF+7iiwSyXRnaT6Y7CPeQqeymyE9pCTfaXwRIDGwIf5wx1u+z2L4eWJQ3cpboG1I Ho3OM31KAsV2ZJtI2AE5AiRcYIozPpNICyWts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687193757; x=1689785757; 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=KnZNU/I8hVx/txQg+gZcbNdILNkL1d9QJiWI/0DW9wI=; b=dOAF8S+BU3ZYQERkOZrLbOmb9gzxduMyz5NlUV0xqqmlqVPdznfr8vvlCbt6ObO82A avg1acKDgNRrt7UrE74JDQbLmrmnDAAO719FAcpxrH2cjdCWH+Df44CHi7CN6DsgtElx IkiRj2Ex64XTb0aPwU4WK2L2lJKzRx7lMldHlwtirGKvokVL78LeCJFSWBWQ2zJJiNoa nRNzGFXnVrEy0Nbi7gvMxOevjtM02nsbW+avzsuyc4LR9H6WkJy0c8wiMieyq+7x2Mf4 8cDnhOiv/Vm8Pp4UJycQRqJyOp1jia4qLAHYDtHj4nDxRg8a+zlCXmMEnEij+DOM1Eao 5nrg== X-Gm-Message-State: AC+VfDxeJdDdb3hqzVO3yjZGJQG7qli7mt0MXM89LCP3tsvSgFKQ35k3 bvCXMAXx1+1IPvn1ShSVzzo24g== X-Google-Smtp-Source: ACHHUZ4seV5vQMD1B3+dqGuDxNBwJBs85xEpHLWIbXaIhwEvDfAjEJU/sT7OAfJwkc2qH0vO0JafgQ== X-Received: by 2002:a05:620a:4397:b0:762:39c:7fb3 with SMTP id a23-20020a05620a439700b00762039c7fb3mr11634709qkp.60.1687193757326; Mon, 19 Jun 2023 09:55:57 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-79-25-27-4.retail.telecomitalia.it. [79.25.27.4]) by smtp.gmail.com with ESMTPSA id p23-20020a05620a15f700b0075d49ce31c3sm109103qkm.91.2023.06.19.09.55.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 09:55:57 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Philippe Cornu , Raphael Gallais-Pou , Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Alexandre Torgue , Daniel Vetter , David Airlie , Maxime Coquelin , Yannick Fertre , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v4 6/6] drm/stm: set framebuffer bit depth through DTS property Date: Mon, 19 Jun 2023 18:55:25 +0200 Message-Id: <20230619165525.1035243-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230619165525.1035243-1-dario.binacchi@amarulasolutions.com> References: <20230619165525.1035243-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230619_095600_761470_74647DB6 X-CRM114-Status: GOOD ( 14.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The patch, which is backwards compatible, sets the bit depth of the framebuffer using the optional property 'st,fb-bpp' in the DTS. Signed-off-by: Dario Binacchi --- Changes in v4: - Use DTS property instead of module parameter to set the framebuffer bit depth. 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=c42a37a27c777d63961dd634a30f7c887949491a - 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=13cdd12a9f934158f4ec817cf048fcb4384aa9dc drivers/gpu/drm/stm/drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c index 422220df7d8c..7a61a3c63469 100644 --- a/drivers/gpu/drm/stm/drv.c +++ b/drivers/gpu/drm/stm/drv.c @@ -180,7 +180,9 @@ static const struct dev_pm_ops drv_pm_ops = { static int stm_drm_platform_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; + struct device_node *np = pdev->dev.of_node; struct drm_device *ddev; + u32 fb_bpp = 16; int ret; DRM_DEBUG("%s\n", __func__); @@ -203,7 +205,9 @@ static int stm_drm_platform_probe(struct platform_device *pdev) if (ret) goto err_put; - drm_fbdev_dma_setup(ddev, 16); + of_property_read_u32(np, "st,fb-bpp", &fb_bpp); + + drm_fbdev_dma_setup(ddev, fb_bpp); return 0;