From nobody Sat Feb 7 17:13:59 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 2A0ADC001DF for ; Fri, 14 Jul 2023 01:38:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232862AbjGNBiH (ORCPT ); Thu, 13 Jul 2023 21:38:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232120AbjGNBiD (ORCPT ); Thu, 13 Jul 2023 21:38:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 153012D60; Thu, 13 Jul 2023 18:38:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7C1AD61BA2; Fri, 14 Jul 2023 01:38:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A59EBC433C9; Fri, 14 Jul 2023 01:38:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689298681; bh=LPOwEiLDba7WqkS5e6PMVWcf9bxL4V+UFMcte4xKN7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ENVvj5nN3emsfKqKyx1iWqHLTmxPBlBu+UBlk0CVbM6eJB/AHK4ulqq1AzPz8MdzK uaG9auED1JyG44KGnoZ6PwzjBU5bhT7wEnGxyzqy3mm0eH1y/sEdtVTervd51DMX+C uUKloTsfhMRbg56oFkfgCIO6cbtDj/Bg/EsDQxp/JavFzFKXqbbN2zyV+qZzclTz5t XusvMJVYrSr8P09hBrOAwGVbaArjdEeGiri2m2oEkgrEA0HzOKGkjAQFtr44HLiaOQ 7Z14321ihJoc6BmI6UFH9OVI5Oi19HRB2dScVTqP7ByUhvUVoW26YyiaxYhfwBb4Z5 SJBtmL7mSEzbA== Received: by mercury (Postfix, from userid 1000) id CAE161067666; Fri, 14 Jul 2023 03:37:58 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel Cc: Gerald Loacker , Michael Riesch , Miquel Raynal , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH v3 01/19] dt-bindings: vendor-prefixes: add Inanbo Date: Fri, 14 Jul 2023 03:37:38 +0200 Message-Id: <20230714013756.1546769-2-sre@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230714013756.1546769-1-sre@kernel.org> References: <20230714013756.1546769-1-sre@kernel.org> 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" Shenzhen INANBO Electronic Technology Co., Ltd. manufacturers TFT/OLED LCD panels. Reviewed-by: Michael Riesch Acked-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Docum= entation/devicetree/bindings/vendor-prefixes.yaml index af60bf1a6664..1e2e51401dc5 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -617,6 +617,8 @@ patternProperties: description: Imagination Technologies Ltd. "^imi,.*": description: Integrated Micro-Electronics Inc. + "^inanbo,.*": + description: Shenzhen INANBO Electronic Technology Co., Ltd. "^incircuit,.*": description: In-Circuit GmbH "^indiedroid,.*": --=20 2.40.1 From nobody Sat Feb 7 17:13:59 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 80D05C0015E for ; Fri, 14 Jul 2023 01:38:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233972AbjGNBiN (ORCPT ); Thu, 13 Jul 2023 21:38:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232372AbjGNBiE (ORCPT ); Thu, 13 Jul 2023 21:38:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17D872D61; Thu, 13 Jul 2023 18:38:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8529F61BB8; Fri, 14 Jul 2023 01:38:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA4F8C433CA; Fri, 14 Jul 2023 01:38:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689298681; bh=ZCtk/JiU9swJ+bePtmvtWrQdxyBhpSeCtAN3ecv4HUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A0K+HtJDDCdq80eVoRo+GkyLE+/9F6xazEDDQC2KTgSI7y2DWuOi7c/y3FAz0g8A8 kLPIeeyFWCAv8DzyjQENzBj0jH5InVUpWg/d+sC/8Qjc+dYnT+3EjOtivMZrvheFkG e/snkUhNmISUVLLUUIAslN/CGdwcAPI4a4DJ/B9HuC/K0hzoSVem9Au6ctjdgGPOsZ 6rH6J2Sg4m/70vWF6wiUNd3erF7w8EGF2Ipt8/pcav6VQjzcpS5Sz97aUdN5vt6ouI 5lfWHL8Ba6YwdZe8RvioFzhBq8R25nk86SivsZtR9wS28qJcMnYdXnQorjCJhjsw5s kkqyhECfAng0w== Received: by mercury (Postfix, from userid 1000) id CDBC61067680; Fri, 14 Jul 2023 03:37:58 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel Cc: Gerald Loacker , Michael Riesch , Miquel Raynal , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Rob Herring Subject: [PATCH v3 02/19] dt-bindings: display: st7789v: add Inanbo T28CP45TN89 Date: Fri, 14 Jul 2023 03:37:39 +0200 Message-Id: <20230714013756.1546769-3-sre@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230714013756.1546769-1-sre@kernel.org> References: <20230714013756.1546769-1-sre@kernel.org> 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" Add compatible value for Inanbo t28cp45tn89 and make reset GPIO non mandatory, since it might not be connected to the CPU. Reviewed-by: Michael Riesch Acked-by: Rob Herring Signed-off-by: Sebastian Reichel --- .../devicetree/bindings/display/panel/sitronix,st7789v.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/panel/sitronix,st778= 9v.yaml b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.= yaml index fa6556363cca..75e935f0547b 100644 --- a/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml +++ b/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml @@ -15,7 +15,9 @@ allOf: =20 properties: compatible: - const: sitronix,st7789v + enum: + - inanbo,t28cp45tn89-v17 + - sitronix,st7789v =20 reg: true reset-gpios: true @@ -33,7 +35,6 @@ properties: required: - compatible - reg - - reset-gpios - power-supply =20 unevaluatedProperties: false --=20 2.40.1 From nobody Sat Feb 7 17:13:59 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 1904AC0015E for ; Fri, 14 Jul 2023 01:38:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234347AbjGNBiP (ORCPT ); Thu, 13 Jul 2023 21:38:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232845AbjGNBiE (ORCPT ); Thu, 13 Jul 2023 21:38:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 473662D63; Thu, 13 Jul 2023 18:38:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 87E2F61BB9; Fri, 14 Jul 2023 01:38:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC4B0C433CB; Fri, 14 Jul 2023 01:38:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689298681; bh=4DZEdPQyybkjFKpYx7JH1MF+hEoS/Ylm1gHH8AEdVbk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=liu/NMt3SYEYvgfv+ioHuHjSrql38lpoNaOr3m7FAeLxqLO7Q7JxPIHcj8vRe3xdC CNKGVyUE2/Wfvb7qEzfugxeXHKpeBRZRRLmoNjC2Y3EO9i3mvEjctAPMpJhc3L5cSw bBjFKAwu/ULMxmLO7lkmH+SwIyxvvge+MURbw1F2W2x26kqSgvL7lO9evxp+PFsTxg vtTe7OFcQXjzZr/F9nU6YSYg+EicDDGD0TKaBh/SBAedlCVRWUDfFF/rS9j8E6BvBH llk8N9PxQJdbW0I/B7DrJQzF/iX7/AyIiyrrdB/CADE0dAPnguULEVmjLTV9BCSACt yI9W20pZLRUuw== Received: by mercury (Postfix, from userid 1000) id D04991067687; Fri, 14 Jul 2023 03:37:58 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel Cc: Gerald Loacker , Michael Riesch , Miquel Raynal , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v3 03/19] drm/panel: sitronix-st7789v: add SPI ID table Date: Fri, 14 Jul 2023 03:37:40 +0200 Message-Id: <20230714013756.1546769-4-sre@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230714013756.1546769-1-sre@kernel.org> References: <20230714013756.1546769-1-sre@kernel.org> 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" SPI device drivers should also have a SPI ID table. Reviewed-by: Michael Riesch Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/d= rm/panel/panel-sitronix-st7789v.c index bbc4569cbcdc..e4d8dea1db36 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c @@ -394,6 +394,12 @@ static void st7789v_remove(struct spi_device *spi) drm_panel_remove(&ctx->panel); } =20 +static const struct spi_device_id st7789v_spi_id[] =3D { + { "st7789v" }, + { } +}; +MODULE_DEVICE_TABLE(spi, st7789v_spi_id); + static const struct of_device_id st7789v_of_match[] =3D { { .compatible =3D "sitronix,st7789v" }, { } @@ -403,6 +409,7 @@ MODULE_DEVICE_TABLE(of, st7789v_of_match); static struct spi_driver st7789v_driver =3D { .probe =3D st7789v_probe, .remove =3D st7789v_remove, + .id_table =3D st7789v_spi_id, .driver =3D { .name =3D "st7789v", .of_match_table =3D st7789v_of_match, --=20 2.40.1 From nobody Sat Feb 7 17:13:59 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 B1998C001DD for ; Fri, 14 Jul 2023 01:38:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233731AbjGNBiF (ORCPT ); Thu, 13 Jul 2023 21:38:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231604AbjGNBiD (ORCPT ); Thu, 13 Jul 2023 21:38:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE5542D50; Thu, 13 Jul 2023 18:38:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6D29061B9C; Fri, 14 Jul 2023 01:38:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3ACCC433C8; Fri, 14 Jul 2023 01:38:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689298681; bh=VliKl8yRFl/vxHPSCbMcCRDElBFtRJGleu5OKQBvOiY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kgVwOrcINvGcwjIf2mECWMFJg6P/gWNuuZRLGQxB/xJYE76Sqo8bdcPi9FxasDtSh JjtiuQeRFj951kk7RXJfFBcPKkEKut5rRwP0qprsGB82sjPrWivTTdy6XUdGzcx0se GCsqPjF/OzktqndI4WUbBmqTpstc8Ur4vDQfL31B8XQlziOtyrXGBTbxuK/WomV/WO +LLzzwVLsNYiRnnZ8OvtRdQu8+4wN6ZC7sk7ZQ6Y+GdXXLu3dB+Esj9cyFu2b2ZmpR aStiUMWSfnw2/qXH8s72QaDxqw+ctMTHnZ5H5ksCxAH2P2DnR+8y9N953HgRcYg17h fQsAo0sTi2HTA== Received: by mercury (Postfix, from userid 1000) id D2BB01067694; Fri, 14 Jul 2023 03:37:58 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel Cc: Gerald Loacker , Michael Riesch , Miquel Raynal , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v3 04/19] drm/panel: sitronix-st7789v: remove unused constants Date: Fri, 14 Jul 2023 03:37:41 +0200 Message-Id: <20230714013756.1546769-5-sre@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230714013756.1546769-1-sre@kernel.org> References: <20230714013756.1546769-1-sre@kernel.org> 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" ST7789V_COLMOD_RGB_FMT_18BITS and ST7789V_COLMOD_CTRL_FMT_18BITS are unused in favour of MIPI_DCS_PIXEL_FMT_18BIT, remove them. Reviewed-by: Michael Riesch Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/d= rm/panel/panel-sitronix-st7789v.c index e4d8dea1db36..f7566551b5e2 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c @@ -15,9 +15,6 @@ #include #include =20 -#define ST7789V_COLMOD_RGB_FMT_18BITS (6 << 4) -#define ST7789V_COLMOD_CTRL_FMT_18BITS (6 << 0) - #define ST7789V_RAMCTRL_CMD 0xb0 #define ST7789V_RAMCTRL_RM_RGB BIT(4) #define ST7789V_RAMCTRL_DM_RGB BIT(0) --=20 2.40.1 From nobody Sat Feb 7 17:13:59 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 D6401C001DF for ; Fri, 14 Jul 2023 01:38:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234383AbjGNBii (ORCPT ); Thu, 13 Jul 2023 21:38:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233976AbjGNBiN (ORCPT ); Thu, 13 Jul 2023 21:38:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28C792D50; Thu, 13 Jul 2023 18:38:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BFE4661BD2; Fri, 14 Jul 2023 01:38:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E25CC43391; Fri, 14 Jul 2023 01:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689298684; bh=Yz2WLdihy2cH3NLgwzal4tjdyU5OuV1nw3L8ogj7TNI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ElmvuO0AzQAHTExm1eL3Pr0z3ijuwCOvIz3Wso7OgiIp4JteopEROMpZ1ysINuHjx d4tBmsHove9QJEAjJA3rJzIF3t5wwRjaadgAgMdfsoJfSjhkTDEv+81FAGqTS2nt0w DBCMDnKaJnSjH835aAow1Mdyf98wtOj3lVdoIfLPXdrnKasyfNkTvbJmTTIE0gJndg kaW+hZZgK470Od+3X5YB5tMsG+/q8WBCjv/lDYVPrRy4BTg1/f8ML9tv1IZ7wTJCtE Hcr8SBEkvJS338SFyaEisMDm7UXqKAXRSBnvuR8viair8BTjvaRLLOhCc2iaeZgSZt plus0XsmLz5Vw== Received: by mercury (Postfix, from userid 1000) id D58DE1067695; Fri, 14 Jul 2023 03:37:58 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel Cc: Gerald Loacker , Michael Riesch , Miquel Raynal , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v3 05/19] drm/panel: sitronix-st7789v: make reset GPIO optional Date: Fri, 14 Jul 2023 03:37:42 +0200 Message-Id: <20230714013756.1546769-6-sre@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230714013756.1546769-1-sre@kernel.org> References: <20230714013756.1546769-1-sre@kernel.org> 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" The reset pin might not be software controllable from the SoC, so make it optional. Reviewed-by: Michael Riesch Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/d= rm/panel/panel-sitronix-st7789v.c index f7566551b5e2..1d43b8cc1647 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c @@ -369,7 +369,7 @@ static int st7789v_probe(struct spi_device *spi) if (IS_ERR(ctx->power)) return PTR_ERR(ctx->power); =20 - ctx->reset =3D devm_gpiod_get(&spi->dev, "reset", GPIOD_OUT_LOW); + ctx->reset =3D devm_gpiod_get_optional(&spi->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ctx->reset)) { dev_err(&spi->dev, "Couldn't get our reset line\n"); return PTR_ERR(ctx->reset); --=20 2.40.1 From nobody Sat Feb 7 17:13:59 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 14E18C001DF for ; Fri, 14 Jul 2023 01:38:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234680AbjGNBif (ORCPT ); Thu, 13 Jul 2023 21:38:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233951AbjGNBiN (ORCPT ); Thu, 13 Jul 2023 21:38:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3A6F2D6B; Thu, 13 Jul 2023 18:38:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B407761BBD; Fri, 14 Jul 2023 01:38:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58042C433CA; Fri, 14 Jul 2023 01:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689298684; bh=BWX8AXPfJ5gQEAV6Gfsqwd1FF8WXCoKoYTywoJ22YAI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JQzQ13H+HlDBwkhGckSx6+UVsUTgf01rN2VxwEfLMhsxfJGPZLGnBuvfOxvWSxQks wt91ai0vjK/Pr0I7lWxhituUXXkHgRO12rL0GZn9l+Tlj67Osv4QOkuKXGO9dEUWVG A3vJGVPYi1pHSnDFHLxRxYUCMRAJcAYdGvbveGn1ENNQNNxlWqV+w1fRvE8cR4SVaU UxMc/R6KmA1KYHwtLhDuWXj1J3bAywXFGfyW9wbBfnEbKnDQV81wRveWWhOqXyQB8/ Mue7M4xbPx9oH0g5OLt671GIFyUpkCXnxMpWP7g8yRoCinZ7hLT6D2s5w1ltqRlwVq r6NojQosdpfMA== Received: by mercury (Postfix, from userid 1000) id D82FB1067696; Fri, 14 Jul 2023 03:37:58 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel Cc: Gerald Loacker , Michael Riesch , Miquel Raynal , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v3 06/19] drm/panel: sitronix-st7789v: simplify st7789v_spi_write Date: Fri, 14 Jul 2023 03:37:43 +0200 Message-Id: <20230714013756.1546769-7-sre@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230714013756.1546769-1-sre@kernel.org> References: <20230714013756.1546769-1-sre@kernel.org> 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" st7789v_spi_write initializes a message with just a single transfer, spi_sync_transfer can be used for that. Reviewed-by: Michael Riesch Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/d= rm/panel/panel-sitronix-st7789v.c index 1d43b8cc1647..6290bd49d055 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c @@ -129,17 +129,13 @@ static int st7789v_spi_write(struct st7789v *ctx, enu= m st7789v_prefix prefix, u8 data) { struct spi_transfer xfer =3D { }; - struct spi_message msg; u16 txbuf =3D ((prefix & 1) << 8) | data; =20 - spi_message_init(&msg); - xfer.tx_buf =3D &txbuf; xfer.bits_per_word =3D 9; xfer.len =3D sizeof(txbuf); =20 - spi_message_add_tail(&xfer, &msg); - return spi_sync(ctx->spi, &msg); + return spi_sync_transfer(ctx->spi, &xfer, 1); } =20 static int st7789v_write_command(struct st7789v *ctx, u8 cmd) --=20 2.40.1 From nobody Sat Feb 7 17:13:59 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 5F4B0C0015E for ; Fri, 14 Jul 2023 01:38:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234642AbjGNBic (ORCPT ); Thu, 13 Jul 2023 21:38:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233960AbjGNBiN (ORCPT ); Thu, 13 Jul 2023 21:38:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C39CA2D61; Thu, 13 Jul 2023 18:38:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B230D61BBB; Fri, 14 Jul 2023 01:38:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F6E6C433D9; Fri, 14 Jul 2023 01:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689298684; bh=EyFDzV4ddqw1sjwHBTSR4kWEp2hOqnAjhUV748qVmZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HysJGfs/dIwxuKwN3vBYM0JpBWVvtSNxLGpwu9TNJpI3Ie6yITYRQ5ZlzvdRFhAV1 sm0BCuMYOalW0M3sx5jvgtizhq9QiQYD1KBjGWpnJvah4OAPEUrnCWSo+FZrM8eHtt mxDXBSfDJvl9+GWOBH34u+2mo7sJMRHvPyDI8DlQ37YPjm1AxXoIxejrxJ0sCcjZNN u1TMZUeL6nmsrSwibZ/p6SqMifWqJ+L2YO4lQliO9ludKlt/vbAUvZjpB+VuWnFT87 TDW/iTkCWoikzVAeaLfzkVCAOoFRm6YF6+0jqyp21w+zYH/UQ0snemsabIGtoR1NVx kSZvCf/n4GTSg== Received: by mercury (Postfix, from userid 1000) id DAB131067697; Fri, 14 Jul 2023 03:37:58 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel Cc: Gerald Loacker , Michael Riesch , Miquel Raynal , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v3 07/19] drm/panel: sitronix-st7789v: improve error handling Date: Fri, 14 Jul 2023 03:37:44 +0200 Message-Id: <20230714013756.1546769-8-sre@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230714013756.1546769-1-sre@kernel.org> References: <20230714013756.1546769-1-sre@kernel.org> 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" Improve error handling in the probe routine, so that probe defer errors are captured in /sys/kernel/debug/devices_deferred Reviewed-by: Michael Riesch Signed-off-by: Sebastian Reichel --- .../gpu/drm/panel/panel-sitronix-st7789v.c | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/d= rm/panel/panel-sitronix-st7789v.c index 6290bd49d055..a6d6155ef45c 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c @@ -348,32 +348,33 @@ static const struct drm_panel_funcs st7789v_drm_funcs= =3D { =20 static int st7789v_probe(struct spi_device *spi) { + struct device *dev =3D &spi->dev; struct st7789v *ctx; int ret; =20 - ctx =3D devm_kzalloc(&spi->dev, sizeof(*ctx), GFP_KERNEL); + ctx =3D devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); if (!ctx) return -ENOMEM; =20 spi_set_drvdata(spi, ctx); ctx->spi =3D spi; =20 - drm_panel_init(&ctx->panel, &spi->dev, &st7789v_drm_funcs, + drm_panel_init(&ctx->panel, dev, &st7789v_drm_funcs, DRM_MODE_CONNECTOR_DPI); =20 - ctx->power =3D devm_regulator_get(&spi->dev, "power"); - if (IS_ERR(ctx->power)) - return PTR_ERR(ctx->power); + ctx->power =3D devm_regulator_get(dev, "power"); + ret =3D PTR_ERR_OR_ZERO(ctx->power); + if (ret) + return dev_err_probe(dev, ret, "Failed to get regulator\n"); =20 - ctx->reset =3D devm_gpiod_get_optional(&spi->dev, "reset", GPIOD_OUT_LOW); - if (IS_ERR(ctx->reset)) { - dev_err(&spi->dev, "Couldn't get our reset line\n"); - return PTR_ERR(ctx->reset); - } + ctx->reset =3D devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); + ret =3D PTR_ERR_OR_ZERO(ctx->reset); + if (ret) + return dev_err_probe(dev, ret, "Failed to get reset line\n"); =20 ret =3D drm_panel_of_backlight(&ctx->panel); if (ret) - return ret; + return dev_err_probe(dev, ret, "Failed to get backlight\n"); =20 drm_panel_add(&ctx->panel); =20 --=20 2.40.1 From nobody Sat Feb 7 17:13:59 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 45311C001E0 for ; Fri, 14 Jul 2023 01:38:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234569AbjGNBi0 (ORCPT ); Thu, 13 Jul 2023 21:38:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233787AbjGNBiH (ORCPT ); Thu, 13 Jul 2023 21:38:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0C0B2D64; Thu, 13 Jul 2023 18:38:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3535961BB8; Fri, 14 Jul 2023 01:38:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 583B5C433CC; Fri, 14 Jul 2023 01:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689298684; bh=i3ZrSSDxreDrHnbdzjRZb/TFVdFo15zQGfDgEtGHAcw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P/KHAdAtEeObqX6VWEDk0ol/pRePLLW+O8wxczMFSV9tDyruFPRh8YIAYg/BOBWMm zQZoMi7hqMriC9HuMMsg4zqjCgcE1JLo2PzoXW17KBWwcTa6aTbKxbd2Kp3nst/n7y TYQlDs8Ih5PVu2M0hMXxZQ67BDEt2yF/mdtXL9fpq4CFSH5RkE7HUNRFj3Hx+lP5U4 IQJVkYeTWW8FCHKSwVZV1vl81N+kRGL9ktzm3u9Kb1YsaxLzPqrF9egRnkDlmbAcXM KE66/6bAfqQZNYB63TLXcat4LNM5OvgQqbh89l2EZrWHRLqybOUOdf8Y4yADPY7hU2 YClOTMMf8/wHQ== Received: by mercury (Postfix, from userid 1000) id DD676106769A; Fri, 14 Jul 2023 03:37:58 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel Cc: Gerald Loacker , Michael Riesch , Miquel Raynal , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v3 08/19] drm/panel: sitronix-st7789v: avoid hardcoding mode info Date: Fri, 14 Jul 2023 03:37:45 +0200 Message-Id: <20230714013756.1546769-9-sre@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230714013756.1546769-1-sre@kernel.org> References: <20230714013756.1546769-1-sre@kernel.org> 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" Avoid hard-coding the default_mode and supply it from match data. One additional layer of abstraction has been introduced, which will be needed for specifying other panel information (e.g. bus flags) in the next steps. Reviewed-by: Michael Riesch Signed-off-by: Sebastian Reichel --- .../gpu/drm/panel/panel-sitronix-st7789v.c | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/d= rm/panel/panel-sitronix-st7789v.c index a6d6155ef45c..24c5bec6ce31 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c @@ -108,8 +108,13 @@ return val; \ } while (0) =20 +struct st7789_panel_info { + const struct drm_display_mode *mode; +}; + struct st7789v { struct drm_panel panel; + const struct st7789_panel_info *info; struct spi_device *spi; struct gpio_desc *reset; struct regulator *power; @@ -160,16 +165,21 @@ static const struct drm_display_mode default_mode =3D= { .vtotal =3D 320 + 8 + 4 + 4, }; =20 +static const struct st7789_panel_info default_panel =3D { + .mode =3D &default_mode, +}; + static int st7789v_get_modes(struct drm_panel *panel, struct drm_connector *connector) { + struct st7789v *ctx =3D panel_to_st7789v(panel); struct drm_display_mode *mode; =20 - mode =3D drm_mode_duplicate(connector->dev, &default_mode); + mode =3D drm_mode_duplicate(connector->dev, ctx->info->mode); if (!mode) { - dev_err(panel->dev, "failed to add mode %ux%ux@%u\n", - default_mode.hdisplay, default_mode.vdisplay, - drm_mode_vrefresh(&default_mode)); + dev_err(panel->dev, "failed to add mode %ux%u@%u\n", + ctx->info->mode->hdisplay, ctx->info->mode->vdisplay, + drm_mode_vrefresh(ctx->info->mode)); return -ENOMEM; } =20 @@ -359,6 +369,8 @@ static int st7789v_probe(struct spi_device *spi) spi_set_drvdata(spi, ctx); ctx->spi =3D spi; =20 + ctx->info =3D device_get_match_data(&spi->dev); + drm_panel_init(&ctx->panel, dev, &st7789v_drm_funcs, DRM_MODE_CONNECTOR_DPI); =20 @@ -389,13 +401,13 @@ static void st7789v_remove(struct spi_device *spi) } =20 static const struct spi_device_id st7789v_spi_id[] =3D { - { "st7789v" }, + { "st7789v", (unsigned long) &default_panel }, { } }; MODULE_DEVICE_TABLE(spi, st7789v_spi_id); =20 static const struct of_device_id st7789v_of_match[] =3D { - { .compatible =3D "sitronix,st7789v" }, + { .compatible =3D "sitronix,st7789v", .data =3D &default_panel }, { } }; MODULE_DEVICE_TABLE(of, st7789v_of_match); --=20 2.40.1 From nobody Sat Feb 7 17:13:59 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 9D9EEC001DF for ; Fri, 14 Jul 2023 01:38:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234484AbjGNBiU (ORCPT ); Thu, 13 Jul 2023 21:38:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233757AbjGNBiG (ORCPT ); Thu, 13 Jul 2023 21:38:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0B522D63; Thu, 13 Jul 2023 18:38:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 34BC161BB2; Fri, 14 Jul 2023 01:38:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57E31C433C8; Fri, 14 Jul 2023 01:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689298684; bh=9ICj2srZUkHSM8Oenv3/OJ/dpUwH5604BWTzaI6ATYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dIch2TxBnNHsz+EJC/0LWNpKTydIiP8kB+DqKl4Jhc0oaYZRA2/2p5hqGrB3Wb/Yw rrzK/1MLSqstwk+3l6N3BYx9AgeHDM5vbm+7ktU1Sgz6FbTTcYxGEsydMWKDozWkbr lpmafKMRSdARDvcQlVYGPY0pBjHJ0a7xe81Sv2W0bN1ZviC6ZaHzG27YeDN7eDVFQn /3f5G8E2XJXYAU9WMylKRqQBekReQM3ot5/x6ZYByhCyG4veVzKZo/ennEDWVvkYAU xp2dSWjOcKA9GBfAhRGnd6RGyKc5vxsYJ+/PyWEV7miJhtT5MQtobAqhWJ7wKFukq4 mR19+FbLKrxoA== Received: by mercury (Postfix, from userid 1000) id DFC3110676F1; Fri, 14 Jul 2023 03:37:58 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel Cc: Gerald Loacker , Michael Riesch , Miquel Raynal , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v3 09/19] drm/panel: sitronix-st7789v: avoid hardcoding panel size Date: Fri, 14 Jul 2023 03:37:46 +0200 Message-Id: <20230714013756.1546769-10-sre@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230714013756.1546769-1-sre@kernel.org> References: <20230714013756.1546769-1-sre@kernel.org> 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" Move the panel size information to the mode struct, so that different panel sizes can be specified depending on the panel type. Reviewed-by: Michael Riesch Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/d= rm/panel/panel-sitronix-st7789v.c index 24c5bec6ce31..aa11a1dc0752 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c @@ -163,6 +163,8 @@ static const struct drm_display_mode default_mode =3D { .vsync_start =3D 320 + 8, .vsync_end =3D 320 + 8 + 4, .vtotal =3D 320 + 8 + 4 + 4, + .width_mm =3D 61, + .height_mm =3D 103, }; =20 static const struct st7789_panel_info default_panel =3D { @@ -188,8 +190,8 @@ static int st7789v_get_modes(struct drm_panel *panel, mode->type =3D DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; drm_mode_probed_add(connector, mode); =20 - connector->display_info.width_mm =3D 61; - connector->display_info.height_mm =3D 103; + connector->display_info.width_mm =3D ctx->info->mode->width_mm; + connector->display_info.height_mm =3D ctx->info->mode->height_mm; =20 return 1; } --=20 2.40.1 From nobody Sat Feb 7 17:13:59 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 D5C59C001DF for ; Fri, 14 Jul 2023 01:38:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234617AbjGNBi3 (ORCPT ); Thu, 13 Jul 2023 21:38:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233799AbjGNBiH (ORCPT ); Thu, 13 Jul 2023 21:38:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC2782D66; Thu, 13 Jul 2023 18:38:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 353D161BB9; Fri, 14 Jul 2023 01:38:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 581D1C433CB; Fri, 14 Jul 2023 01:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689298684; bh=pHG+mTF3Sqq4Dyhp7e3fM2xvT8KCo3Hc4liBMTVZVOg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jcobtyHoeNyuILr2XEO5I4hFwKoTCvji/RQFFN4rJXcJn8ldgZrRtumRdxsmLzDAl TF3fWQFpUhlCtRfrI8NSYv7VHedxNEz6gAHWN5o7A2XFWwrckHcIctWvEhXjDGHfhR P/l1czEkG1foF2ESTVmjPtnLrbetDqZ1d3fmBPgb2w6ZUTbS4UqibPz25ye8E/27rj 87CAO8XzMhJUo/yciroYpWw3s16fQO+VRNlBe7CHLDtedEciSv+Xx9Lbmb0pD3z9Yg sj4+cTkOpOcbQAHgsms06lQ4praeRHvGBVCPWXDc6+JyhyWi2bMslRc7Aisrm5YQhF 8Rnho0zq6hUlg== Received: by mercury (Postfix, from userid 1000) id E249B10676F2; Fri, 14 Jul 2023 03:37:58 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel Cc: Gerald Loacker , Michael Riesch , Miquel Raynal , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v3 10/19] drm/panel: sitronix-st7789v: add media bus format Date: Fri, 14 Jul 2023 03:37:47 +0200 Message-Id: <20230714013756.1546769-11-sre@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230714013756.1546769-1-sre@kernel.org> References: <20230714013756.1546769-1-sre@kernel.org> 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" Add support for describing the media bus format in the panel configuration and expose that to userspace. Since both supported formats (RGB565 and RGB666) are using 6 bits per color also hardcode that information. Reviewed-by: Michael Riesch Signed-off-by: Sebastian Reichel --- .../gpu/drm/panel/panel-sitronix-st7789v.c | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/d= rm/panel/panel-sitronix-st7789v.c index aa11a1dc0752..d05d7a9caefc 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c @@ -10,6 +10,7 @@ #include =20 #include