Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp973518rwl; Fri, 31 Mar 2023 05:13:03 -0700 (PDT) X-Google-Smtp-Source: AKy350a3R37fyY0orTl30vYXyhdRBLweHXVttnOOD/mIP+6IyC7xbg+r4oH3zbrcL6qhltI6oRZu X-Received: by 2002:a05:6402:42c2:b0:502:ffd:74a1 with SMTP id i2-20020a05640242c200b005020ffd74a1mr27984661edc.2.1680264782765; Fri, 31 Mar 2023 05:13:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680264782; cv=pass; d=google.com; s=arc-20160816; b=yiiPnHK1mDH58rOvfoHojuPRHdhOL6AlITGBqWdy2SDZnc027GpsoaIRwtQIxSM1T6 Ykp1zOYWw565YZVc4ZSKXNEGCRybdRXZ3mfu9A7PIglPHV/s1lCpFY4iaCWWUvNpojoT MQ9ptGA5U8mRuSgLHDrIUqytY33oJuvDi4w6hyPf1AW8nm3gsySOzTUj2jhK4kN4x74E HNCGXb2lmnUlOnvB1l4C8H8cD/GvcnvGtp9tNA6m4dlvz54HfAk+Tp5YDAVBl7t5WX8i u60P4nNkqlx5O0n76gLHikMDFiZuSSvZlK5W5ihauz3vki8wF+WUVZj3BFlu+svvi+Df Q4oA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=VXwFKwvQiZWliMwsPFpebMPGK3PnDkp+NK0aisiyC4s=; b=rdI8he/n+dEDQxvfpJS8OjMAdEgSmWJcCmaEkZ/vuVtNamNm2XpeaOw70/M5Rox+1R jJfIcwu2IuHFshLupVdFm2No+RUbohzV6BIIst7ods9FSZpeFrZK/c2zrLMw23Mi89e5 GKq/BEojwbAEwodcwE5lSetGGz9+uNG18blvbuoQaoOjUEX0VZAZLD3Pza7ebanbNG4/ aWKNqE0evfdbvIimc5e0qxX0P9ketrpbP42fZWMJZmqMfvGbY6X+lZOiC4k+5RA22XRu bOFVq0GRR+CHEUkTz3XUm3JFPQoTYd8ig7dgWcIgOJHkzCp/jlz+1zlJM32cIvBWRyaT yveg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b="qAI/OwEi"; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j3-20020aa7c0c3000000b004acd46cc71esi1148925edp.131.2023.03.31.05.12.21; Fri, 31 Mar 2023 05:13:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b="qAI/OwEi"; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229939AbjCaMGA (ORCPT + 99 others); Fri, 31 Mar 2023 08:06:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbjCaMF7 (ORCPT ); Fri, 31 Mar 2023 08:05:59 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2084.outbound.protection.outlook.com [40.107.20.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAF811D2C0; Fri, 31 Mar 2023 05:05:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bdkv2KlymcrVeFsRsQzCfhxo8jIgZzH6AKPJGVIL2627DU3mG/HMVQWwVKoBUKvyNkP2/KMD/o2LVJR/4RO+T1TCc8rnWQYlQLpMlzSXhFtABZrGoyu8Pyfajbigevgvkpa9VzUIYtBFEJectREgpJoKq9M/5nmoMrpYkbbY2YzAhjSx/GloBr2TJnunVlNeKEkJLXrzilnRmDgEHWl3nVv1hyng2rvE0eam5B3hwdDvr8Gk+C/kD6N6WZ4oqCOtPP17H3nzkJKlwMYoV2AG8+vj4kxQssnjXss73AvysBafh5jqmDOk7g0GBL+igwzXsQ4iZTiMFDqyJ1IB8I7GGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VXwFKwvQiZWliMwsPFpebMPGK3PnDkp+NK0aisiyC4s=; b=H0BzthWWtdlgFGj1T1JHcPDxm1ty9H5cicE4hZ9dQ+mepd6silA2+wGjsGT+Mz+AI9WNb6jU/vWfQzAehjVbHt4JddfJqH9ncnx0X71bhMPDIH/ND5pdNX47FcmLlbRNje1nVRdP5IEY+HSkf9CB+b6vIRQ/Q6tXgu0OR5QxLxGGue+BlxqNrBrr1OrPqqnHLgedW7hB9ZC6xXglHSzvU89B3SzLJqTOVXVK9g+S6HWUpVAuJa0fTuxm9KmrZzGuzIPGe7ZtGtMBqUIHWONrC+uK0zJ9q5XqAh809exgG8A1yiClfsBejmx3C+epTMW2rQLMyNZU3vKXWheqagmWzQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VXwFKwvQiZWliMwsPFpebMPGK3PnDkp+NK0aisiyC4s=; b=qAI/OwEiPwIe5symxiFeA8qP97FACJjLBzX8joNTgG4axgo0zeIse1Q+KdsSntL3pUNewsJgqy9dAB9HmanLAreiU4adcKmyAP3updkorlYD1a3gmdiGlFvTRh2Es5A8pi0xZkLkJyuIGL2DWPNbY9IlOxy0KYm8d5SeUODfNX8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) by DBAPR08MB5669.eurprd08.prod.outlook.com (2603:10a6:10:1ac::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.22; Fri, 31 Mar 2023 12:05:55 +0000 Received: from DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::6f4d:f868:c89:4db1]) by DU0PR08MB9155.eurprd08.prod.outlook.com ([fe80::6f4d:f868:c89:4db1%5]) with mapi id 15.20.6222.033; Fri, 31 Mar 2023 12:05:54 +0000 Message-ID: Date: Fri, 31 Mar 2023 14:05:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCHv1 7/7] drm/panel: sitronix-st7789v: add Inanbo T28CP45TN89 support Content-Language: en-US To: Sebastian Reichel Cc: Gerald Loacker , 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 References: <20230317232355.1554980-1-sre@kernel.org> <20230317232355.1554980-8-sre@kernel.org> From: Michael Riesch In-Reply-To: <20230317232355.1554980-8-sre@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: ZR0P278CA0152.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::10) To DU0PR08MB9155.eurprd08.prod.outlook.com (2603:10a6:10:416::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR08MB9155:EE_|DBAPR08MB5669:EE_ X-MS-Office365-Filtering-Correlation-Id: 8c7597ff-2c80-4b99-ac17-08db31e04783 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t08JU0HpYFUSfwqX1E3S9XmGztbhvIxGhJz/BdjkMUXt4rLC18GJoQrjFRiG+XsC9TKgc0NpCq4t1rqYSPljeB9IEG+DdBLC61bRGjLEJSCope0a4ki5edCHzBGaRce3EMoZnzrKG+6az+zd3mz01RmzErTcbqpV7erKVSDEoY3RUlX9o1Kcun5jF3lCrH/LBGSGUmmICK4f0J9+palY8LrXQIAyulyunboQJo7KkRE4VSVy8t+v7A5UETKrAwvnQGEki2rKRXgV45H/CcrhLKir0d9HvD94jd3ZtHJo64QgG4Lj4dQk+LY33ZtWf1jYx8JJ08wrpZx8R00viRqN6H2hObpbjVCyJ3PrJMN1DeDZWCVUxWLxyiS/x427bjbyUlNZdz8i1k3fG4dNdzI5orziZ7dkkzWSh1aseTe12H2ilffeRmxGmgQ0uV8RWzC5F7wuO9beaEMuvnjol68Ch0Qj8FiGK1oNDYWFiUVj1+XP22kNzb10zIN0584yxYJg3SSXflvpJo8rDq+qqnwSfiXC9OzTxPjIApvQ7k54XxfG57nZE/uO1kkYPN1o4e/lakhcmSMkLr1zm7uYatjQlLIIxbrW6Td+z/Mth7eZmqjOEEYQB52l6naZOjEv5XRxQ9PIPRNUJS9U4VtrqTOkOg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR08MB9155.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39830400003)(376002)(136003)(366004)(346002)(396003)(451199021)(83380400001)(2616005)(6486002)(54906003)(53546011)(478600001)(316002)(186003)(2906002)(6666004)(6512007)(6506007)(5660300002)(8936002)(7416002)(6916009)(38100700002)(44832011)(36756003)(66476007)(66556008)(8676002)(31696002)(4326008)(86362001)(66946007)(41300700001)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eEJWdVJOWVdROUE0eFdaNVFpUDRXT3N5QkVtSlRZcnZGb0hEeURWeHNiRjJk?= =?utf-8?B?TEZXcnJoMW9pWlJDNXJHTHZyN2RsTkd3S2hZbnZnOEl2V0VqeVhlRlJmM2Nu?= =?utf-8?B?QTgvZ1lFMEs3M2RHTk1JUmhBRklCL2RzYytyVkg2NHlIeGpGNjFEc3NKOFdC?= =?utf-8?B?NFgxTWw5ZW5pdExnazBOUW0vdi9UYjBJeU42RkRZR29RUHVDbUUxOElMcHhU?= =?utf-8?B?dTRlYytYamZ0TUNxVHJUWit4TnlNTy9OS1QvWUlYNGxYVUtocThMY3VSTEJT?= =?utf-8?B?d2NNdGM2T1IrYXo3eHdtc2UwMXJHYWxZV3pIK3U5NVNkRkhvcWcxTU01aHYy?= =?utf-8?B?ZjRTMnNRUHNuRlNxL0thQTJLNnp6VTFXazVCRURjRnBBd1RrR0YyVUVyVmdO?= =?utf-8?B?ckhIbkw2K3VFeEhmaFpwbjYrb2MxeEpjWG1XMG53clhrQ01Dd00rVHNPVmRF?= =?utf-8?B?cmdsWnlIWTAzUitxUHM2cnNNNHpWcEl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Exchange-CrossTenant-Network-Message-Id: 8c7597ff-2c80-4b99-ac17-08db31e04783 X-MS-Exchange-CrossTenant-AuthSource: DU0PR08MB9155.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2023 12:05:54.6311 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: s1RPhPz6wm1HyV5ZVmJrr9B3K31w5nFXk4SGtP9bUwkb0I+fY5ogpnQdxperfMj4stjWyC0FCZ6tR/YrA0y05MpwiwFlciC5xsVzADyke9c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5669 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sebastian, Thanks for your work and for the beautiful timing :-) On 3/18/23 00:23, Sebastian Reichel wrote: > UNI-T UTi260b has a Inanbo T28CP45TN89 v17 panel. I could not find > proper documentation for the panel apart from a technical drawing, but > according to the vendor U-Boot it is based on a Sitronix st7789v chip. > I generated the init sequence by modifying the default one until proper > graphics output has been seen on the device. I can spot only a few differences: - bits per pixel: 18 (RGB666) vs. 16 (RGB565) - invert mode - sync/clk signal polarity The init sequences are largely the same, which leads to vast code duplication. Instead, the st7789v_prepare could be adjusted to consider the st7789v_panel_info and apply the required settings accordingly. For example, the polarities could be embedded into the drm_display_mode structure... > Signed-off-by: Sebastian Reichel > --- > .../gpu/drm/panel/panel-sitronix-st7789v.c | 137 ++++++++++++++++++ > 1 file changed, 137 insertions(+) > > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c > index a62a2f5737e4..90f70eb84f11 100644 > --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c > @@ -10,6 +10,7 @@ > #include > > #include