Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp994063rwr; Wed, 3 May 2023 08:51:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5puDpfm0ba96VfBHfNzvjT7lL4s3ML9gyyR6RTim8DWuxIHhd2ss/k92qDSBp30MY1Boat X-Received: by 2002:a17:90a:1a07:b0:242:d8e6:7b68 with SMTP id 7-20020a17090a1a0700b00242d8e67b68mr16305537pjk.1.1683129113160; Wed, 03 May 2023 08:51:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683129113; cv=pass; d=google.com; s=arc-20160816; b=RJmj+8Rh4+6gKuZWVH8QcqoFHmykCbkD5wDTWX4bfC8eTOdiJaz2NGZGEEGhLNKOQp fHsEo9GWpnU/CE/ojYZAu0d0fZUDswbr3otN7zY8zuC7spvxbyKe98+IirFnc08Fc14z KqqIs0V1zSvnkDXdbA8Btcny8TtUabhVimgN+YCuxlZGmupyYovrpK6XKycs+j1P7cin RKdlOUm1mDaV1cvlsOMUgeBOESjYPipdwsI/rQ606ZngEnnPXqzZZJTaTVMZO+gjSCVE 27ugZyNJTdEpiNosmUpa+FbfkEBO7efEBksPtmbHU/tIacE2RcEsnndzYO++LIspNLEQ hXvQ== 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=iDXVNOLNsQZfg8J0xy47IhFK/gbQ5SDlpTmyhqwh1wo=; b=yW2OxvHcZYjRMoySl3dESY/Pt6DJflquCFLwDxsoMyTrxRiUnz0s4Tfmp5eoJP05rV Vg5K+R1z4p7eYlcw/6mRdbM8316YecPESDLiZcgVgEXOcpRr2yPyC/fri+PwM1f05P3A 6K2yM6z0FAD2qmqbYwz7JxvvGbSkXkFkovsCSZHazLdDlqfZ8xqUHGQgwutNLBuR9OPV 2OJ1JdoZBl/u2AzbXZUcFW6fdVshbXwclTTtSRXmWg4wUqQ4SzCA1s3syx+o99TgFtpI s+VVAH6rdf7clTb2nLqdlL8IqFezZdbp6y+KBwn73OcGhq72lG1IuDYzqhy274ueX64A /B1Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mysnt.onmicrosoft.com header.s=selector2-mysnt-onmicrosoft-com header.b=JKpnDYsc; arc=pass (i=1 spf=pass spfdomain=kontron.de dkim=pass dkdomain=kontron.de dmarc=pass fromdomain=kontron.de); 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q9-20020a170902a3c900b001a67a19331dsi31687766plb.202.2023.05.03.08.51.39; Wed, 03 May 2023 08:51:53 -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=@mysnt.onmicrosoft.com header.s=selector2-mysnt-onmicrosoft-com header.b=JKpnDYsc; arc=pass (i=1 spf=pass spfdomain=kontron.de dkim=pass dkdomain=kontron.de dmarc=pass fromdomain=kontron.de); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230500AbjECPj7 (ORCPT + 99 others); Wed, 3 May 2023 11:39:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230316AbjECPjz (ORCPT ); Wed, 3 May 2023 11:39:55 -0400 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2136.outbound.protection.outlook.com [40.107.249.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BAAA1997 for ; Wed, 3 May 2023 08:39:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xy8gHBThQkafBkRZf6I/lcuLFsIhvugk8ZLLLKZnTOpclCTJjS75YYNpY9KpaE43TEPm/nST98x1hpR1V6iTp90lmXDDoxN5CuSCotjSadKQwQ4Wx1bWyGikwAlxRG56Algew1A/Ix4VRM0bLpHcI7eY72y34JtJ27zwabt/oaEUprfEanN2pU37RyE3sZIBVW3q2xxAVAdLEr26rv/UlavSfGVxC51XhY0sRfxPjRQnbCqn4kHWZZFSMEj7ajIrX+b9lbshl67AnCVnoVsRXGe/Fm3e1KTb64TUE+eYNSkZdJ2ogh9urXszUnNoDG3O7a/uQGIswdnbnAPN5nBIqA== 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=iDXVNOLNsQZfg8J0xy47IhFK/gbQ5SDlpTmyhqwh1wo=; b=X+HHpF4IkJKO+FiEUzg9Y7wVb18+WRpPVDUCc7gLcdXsAJBKNGqFdIQVJZS6uvNJkc0w4ODYjyxLOokPB2/3shDK1TrlEOGGapAmi/zOmO7QePrOio9ZPw9rfdxuCFLqToR0HhnN7BrJaY+uU6RBljBez4npOOcFnLsOlnET30gsqDigG/vGd/JbxgmEYI22evYg3jqF9C/nN9BcDq7Moe/YNaiOQZpVGWhaQIbyngj5nf9OEJGxc+tvswK4qbHoQoNHhZW4urkWeuIUL5158L378R+8fFXSuaVheUqxusm+BRO6t8dLGzYY63O6/EHsbHQfT2xBBBXgfQTZxqNK3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kontron.de; dmarc=pass action=none header.from=kontron.de; dkim=pass header.d=kontron.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mysnt.onmicrosoft.com; s=selector2-mysnt-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iDXVNOLNsQZfg8J0xy47IhFK/gbQ5SDlpTmyhqwh1wo=; b=JKpnDYsc1jGBFJPCTKP2PnkXuDDFwNplUCTjjjp40rC3eda67i5YAF/3Yw//TOadqdRrxVUacA2Sjq/p8XzW+2sJhhBAhvyPSU1fyEYOltmsSteio2UvA2PS+YM1pK6oE5udFkTQ81JBWzdIOYdQR+zmyAh1m56M6uIlb3llBsw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=kontron.de; Received: from PA4PR10MB5681.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:263::10) by DB9PR10MB5258.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:33c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.21; Wed, 3 May 2023 15:39:50 +0000 Received: from PA4PR10MB5681.EURPRD10.PROD.OUTLOOK.COM ([fe80::e6fd:d174:5710:fb3a]) by PA4PR10MB5681.EURPRD10.PROD.OUTLOOK.COM ([fe80::e6fd:d174:5710:fb3a%2]) with mapi id 15.20.6340.031; Wed, 3 May 2023 15:39:50 +0000 Message-ID: <3f6be15d-24b2-5608-831c-f15cb7d7cdd2@kontron.de> Date: Wed, 3 May 2023 17:39:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH V3 5/7] drm: bridge: samsung-dsim: Dynamically configure DPHY timing Content-Language: en-US, de-DE To: Adam Ford , dri-devel@lists.freedesktop.org Cc: marex@denx.de, aford@beaconembedded.com, Chen-Yu Tsai , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Inki Dae , Jagan Teki , Marek Szyprowski , linux-kernel@vger.kernel.org References: <20230502010759.17282-1-aford173@gmail.com> <20230502010759.17282-6-aford173@gmail.com> From: Frieder Schrempf In-Reply-To: <20230502010759.17282-6-aford173@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BE1P281CA0039.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:22::10) To PA4PR10MB5681.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:263::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PA4PR10MB5681:EE_|DB9PR10MB5258:EE_ X-MS-Office365-Filtering-Correlation-Id: 06279892-5743-4ebf-2a6c-08db4beca1ea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3uqZewQB/V5rwlAm+atNC8vkQkqsHCvYYFNcv1xrJU3RDefeUpuRMX3mBURjm7Qf6tOIRLMkqBWq09DHbgUx1iozipHMSgJTS+gT9m5jHaroWX52nwo9dRGieaeIM0fo8Lozaz5ozgq1ndDCDltVa62n9idWwai6EjY29+9PRTkRk68Z2Tc6KcNmUUULZc6BwQnVlmIeiM6pyQwqruWvINe3+EgyjCM+dYwSn0Ggnc1q1RiKJFm2z7Ee5I+fgjFfzvkEp/T/R3QO2qnKBP/uO6aO+w1izI5bUub3CLGzajdZakiyFciMAeB9s5SJbatTd4w58DjcFW1z3aBn7pqSkF1wEaX7vP2KcYJ/FpXYELi25tJ0Gf3t+VJMphhylvt+LlNGEMM+5BGkqOKIESZrLMVJaHI+VIMh1KjTCItl0KdIlrEmZSAeNxbiSZNgd+NWDqL8eiUdoUUUUusxbzmVroA4BSuldv01BqMY/iCh4SlAM31MTjqx67FgIRN2csWWrJexO513AMhIzXO21nRyI6AZdTF3NxS6t4GwRYrwmk2ZXBPyKvIkxSU8qLUSFhSL53XTDL8opiHjK7iQCnEYrrkuaC93FzC44A5M+1znyRzTOX05zvMqH/PHMfB21lAyA9rFwIGdfYjewqHEJ32asg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR10MB5681.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(346002)(366004)(39860400002)(136003)(396003)(451199021)(31686004)(31696002)(86362001)(36756003)(38100700002)(83380400001)(26005)(6486002)(6512007)(54906003)(186003)(2616005)(6666004)(478600001)(53546011)(6506007)(8676002)(41300700001)(66946007)(66476007)(66556008)(4326008)(316002)(8936002)(44832011)(5660300002)(2906002)(7416002)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?R2FWY0crTW9sVjk1RlBNT1lINFlHTWtCbmhSVCt1S01qYnN6a3o4cEY5bURo?= =?utf-8?B?dHI2KzRaUVE5RFl6eEg4R284c2VZblRMTmFLVGZxZVZaVzZDQjF5WlZkMGNK?= =?utf-8?B?QzB6T21Hc0w4OHpBYmpBZm9EY1ZHUTJveThhcjlyNTFwMk44Sm1wMXlSaXl1?= =?utf-8?B?YWp4ekFoWjk4MDNqeStKSjhGWGtGS0VhbnUxVHZmQkNWWmptK2xSSFNMME9U?= =?utf-8?B?bWxTM1hIOUwzWE01eXoxY0pmZzBhbEhGeldJWXFuRVhsYmFOUFh1VUlFZEQz?= =?utf-8?B?Qkt5cFpVSnBjQTdEWEh1V3RSdGNsTnlxeUEzUVo3Rko2M1lpejJKc1ZuSUdt?= =?utf-8?B?SCtJSjRtdVBBR3ZPdi9MdjdGVVdKaHJkNWlUUHhTd3hyT2FoY2IvNVQvVUYy?= =?utf-8?B?S1BmUW5ZZTBGM2wzOGR3ZmtwNVlrb0tjZW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892-5743-4ebf-2a6c-08db4beca1ea X-MS-Exchange-CrossTenant-AuthSource: PA4PR10MB5681.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2023 15:39:50.4940 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8c9d3c97-3fd9-41c8-a2b1-646f3942daf1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gQ/hUx4+FtZVc6KWuIdtw/5hGhcLCOtqUAzHJUi8JKyHrq5s/UUNm6dXNJrXMF5J54WZsQw5byYcUrmX4tWkZ0HTyuiC5Bp9y8C5f9ABrx0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR10MB5258 X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 02.05.23 03:07, Adam Ford wrote: > The DPHY timings are currently hard coded. Since the input > clock can be variable, the phy timings need to be variable > too. Add an additional variable to the driver data to enable > this feature to prevent breaking boards that don't support it. > > The phy_mipi_dphy_get_default_config function configures the > DPHY timings in pico-seconds, and a small macro converts those > timings into clock cycles based on the pixel clock rate. > > Signed-off-by: Adam Ford > Tested-by: Chen-Yu Tsai A few nitpicks below, otherwise: Tested on Kontron BL i.MX8MM with SN65DSI84 and ADV7535 bridges. Tested-by: Frieder Schrempf Reviewed-by: Frieder Schrempf > --- > drivers/gpu/drm/bridge/samsung-dsim.c | 79 +++++++++++++++++++++++---- > include/drm/bridge/samsung-dsim.h | 1 + > 2 files changed, 70 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c > index 2dc02a9e37c0..99642230a54a 100644 > --- a/drivers/gpu/drm/bridge/samsung-dsim.c > +++ b/drivers/gpu/drm/bridge/samsung-dsim.c > @@ -18,9 +18,7 @@ > #include > #include > #include > - > #include