Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1357355rwd; Tue, 16 May 2023 16:14:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4yhINxlRUs29Yy9+bXBd2Nsf3RgeF07mqPHzh3cTkGGur7hcFrN8X4w7LlUxCBnC/+EagX X-Received: by 2002:a17:902:f7cd:b0:1aa:fb67:b943 with SMTP id h13-20020a170902f7cd00b001aafb67b943mr39301169plw.62.1684278856568; Tue, 16 May 2023 16:14:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684278856; cv=none; d=google.com; s=arc-20160816; b=v/dlEa6kTL43Rk+63clN6gR9t8/AQJ1Yju7U6wLg0ymcpweEbzVhKFmRHaULFvbdCB qlHzimPf3+1B7JIuJR8H1y2cnF5W2hD+ThLrM4byHEkDNQNKzcj2/p4sPkCXbuER17kz Y1D6Do8IMKFAvqM7uYM10qbUQf16J/aB5WcgAZ+T1pOGzdbfxur5iQlCFGA7Ha3K9ekI 97dS9ykxoFZGvKQt3fYLPHLUtRBsA5tEgRMhlhclZLQMOiZOL1bG1i4yGFQGmE7k2EzN OosGUROpz2EyEXUQNWOQAdc2GGoeMtoJbVZYhLNSzjwLIRys8+2T94xH0IT1t5BaJEgF UyBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :in-reply-to:from:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=YRGn0992OBXzBmJ9QR3PWg3QqGzX3F6VVoT11Q3yzGQ=; b=zRxobRLonj98I8r27nsxFhivLM0xlFYL4fPeUc+Cz+gP00gGijF2vGygvKHCZ3oUR5 nWnTMorr5Y9/gvl8UckyKE+kmCfbAqnHi4iJJpvsx4DEpbhtEfgbgOU8zY5p6NIyqrR2 cV6EMiOiLAIjYw+cdNeEW6VtvVlD/bN9AN4JJS6E0IMW4ivw/G3gpxzbCPTQL49yCyNU RXh7YnDafrUpMYjMpzVZ3TkCfFmpTX47bG9IXRGDN9jw3grn+WQFF2vVTDkldlri+3FV bezl6F5C21Gm+ToeBC2OMlKr7JlMKBmZkE3Y9y25krKl99uq9U4xP+jRMJLriap10M10 ZrYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=kagLuYrV; 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=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w10-20020a170902904a00b001a63a7b7025si19049941plz.30.2023.05.16.16.14.02; Tue, 16 May 2023 16:14:16 -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=@samsung.com header.s=mail20170921 header.b=kagLuYrV; 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=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231144AbjEPW6A (ORCPT + 99 others); Tue, 16 May 2023 18:58:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230526AbjEPW57 (ORCPT ); Tue, 16 May 2023 18:57:59 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14378189 for ; Tue, 16 May 2023 15:57:56 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230516225754euoutp013ab140b8f96beb54892acd0c32c59f4a~fwc2Wg6lW2586425864euoutp01S for ; Tue, 16 May 2023 22:57:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230516225754euoutp013ab140b8f96beb54892acd0c32c59f4a~fwc2Wg6lW2586425864euoutp01S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1684277874; bh=YRGn0992OBXzBmJ9QR3PWg3QqGzX3F6VVoT11Q3yzGQ=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=kagLuYrVNhLXLWEsR7HbUCbcjHZE0Z/sg94Xr54nv8tHqf8eWE/xBdJ2YGH9NKmxZ oCn3uizOBuwJV5mAHvRinQQq4BqmGO/ofR2K5JA4c/W+TuyOA2n4Hog8Ba/CkXpy25 nKoXCkvJC2YQh3NWHW9leDSibemTh9YCC+oQNurk= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230516225753eucas1p217e16ffb9b04840c813a8433f246f4f3~fwc137RSo0386703867eucas1p2B; Tue, 16 May 2023 22:57:53 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id DB.02.35386.17A04646; Tue, 16 May 2023 23:57:53 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230516225753eucas1p2939f9bd8615f613ef5dc1c16ea22da9d~fwc1RngX32241322413eucas1p2V; Tue, 16 May 2023 22:57:53 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230516225753eusmtrp17059f5d9c9efe1666bdcce49c2e5661c~fwc1RAz9l0287302873eusmtrp11; Tue, 16 May 2023 22:57:53 +0000 (GMT) X-AuditID: cbfec7f4-cdfff70000028a3a-4e-64640a71cb74 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E9.50.14344.17A04646; Tue, 16 May 2023 23:57:53 +0100 (BST) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230516225752eusmtip2f93b0df32b5674eb55ec27196e93b10c~fwc0j_zpl2599625996eusmtip2M; Tue, 16 May 2023 22:57:52 +0000 (GMT) Message-ID: <9ea571ea-2252-d550-830c-861bbb94a4ba@samsung.com> Date: Wed, 17 May 2023 00:57:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH V6 0/6] drm: bridge: samsung-dsim: Support variable clocking Content-Language: en-US To: Adam Ford , dri-devel@lists.freedesktop.org Cc: aford@beaconembedded.com, Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Inki Dae , Jagan Teki , Frieder Schrempf , linux-kernel@vger.kernel.org From: Marek Szyprowski In-Reply-To: <20230515235713.232939-1-aford173@gmail.com> Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPKsWRmVeSWpSXmKPExsWy7djP87qFXCkpBi8n61vcuX2a2WL31W52 ixPXFzFZ3F/8mcXi/7aJzBZXvr5ns+hdeo7VYtL9CSwWXzZNYLN4Pn8do8XJN1dZLDonLmG3 uLxrDpvF+523GC0mzbvJ6sDvsfbjfVaPl8sbmD32flvA4rFz1l12j9kdM1k9Fu95yeSxaVUn m8eRq4tZPU5MuMTkcefaHjaP+93HmTz6tqxi9Pi8SS6AN4rLJiU1J7MstUjfLoErY8H9fvaC y3IVK36nNDDOFe9i5OSQEDCRWHShl7GLkYtDSGAFo8Szzi0sEM4XRokHH18wQzifGSWeHu1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B57vy1g8dg56y67x+yOmawei/e8ZPLYtKqT zePI1cWsHicmXGLyuHNtD5vH/e7jTB59W1YxenzeJBfAG6VnU5RfWpKqkJFfXGKrFG1oYaRn aGmhZ2RiqWdobB5rZWSqpG9nk5Kak1mWWqRvl6CXseB+P3vBZbmKFb9TGhjnincxcnJICJhI HJvdxdrFyMUhJLCUUWLq2eeMEAkZiZPTGlghbGGJP9e62CCK3jNK7FlwByzBK2AnMXHqN7AG FgFViaPrvrFBxAUlTs58wgJiiwqkSpxcegPMFhYIkrjVuJQdxGYWEJe49WQ+E4gtIuAscfLv NyaQBcwCv5gljux8xw6xrYdR4vv8+2BVbAKGEl1vu8A2cApYSiz69QlqkplE19YuRghbXmL7 2znMExiFZiE5ZBaShbOQtMxC0rKAkWUVo0hqaXFuem6xkV5xYm5xaV66XnJ+7iZGYFrYduzn lh2MK1991DvEyMTBeIhRgoNZSYQ3sC85RYg3JbGyKrUoP76oNCe1+BCjKTA0JjJLiSbnAxNT Xkm8oZmBqaGJmaWBqaWZsZI4r2dBR6KQQHpiSWp2ampBahFMHxMHp1QDk5zZfKFSsUQ9vq0y XK8KfrA+n/MngV9VKd2Q8e2Fs0obnioKv80wYP5+Q+24Dq/Zdef5x2L1OkoTOE2jvSOC7Ka8 P719ZQ+P9aHnlxwSlxZvNv3xbNnB11OPbhdZkFz/mqur6AvLmmL5m65v/TZd/vB07g5X6/dT D33Vzl9iZ1K++xtfoUpKobuWwvRDN43PBatpZ4Zc5Dz83vv7lzm8TzT05y1cy8kW1ZJqeGPa c+vUdpZQc/E5j43SP/xR0Zx+Zne5xOsFahysa6LiapK4Excs6b548ul6+0C+8E3RXB48vNMY KyeuXs7VW8/4aeo06bOcxXlqD148fLZpUkbn3/mm+b/3nEu/Wp4Tr7bBX4mlOCPRUIu5qDgR AKMespOUAwAA X-CMS-MailID: 20230516225753eucas1p2939f9bd8615f613ef5dc1c16ea22da9d X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20230515235729eucas1p2c5a85ead90e0fc033e41dc81b67d6922 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230515235729eucas1p2c5a85ead90e0fc033e41dc81b67d6922 References: <20230515235713.232939-1-aford173@gmail.com> X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 16.05.2023 01:57, Adam Ford wrote: > This series fixes the blanking pack size and the PMS calculation. It then > adds support to allows the DSIM to dynamically DPHY clocks, and support > non-burst mode while allowing the removal of the hard-coded clock values > for the PLL for imx8m mini/nano/plus, and it allows the removal of the > burst-clock device tree entry when burst-mode isn't supported by connected > devices like an HDMI brige. In that event, the HS clock is set to the > value requested by the bridge chip. > > This has been tested on both an i.MX8M Nano and i.MX8M Plus, and should > work on i.MX8M Mini as well. Marek Szyprowski has tested it on various > Exynos boards. > > Adam Ford (5): > drm: bridge: samsung-dsim: Fix PMS Calculator on imx8m[mnp] > drm: bridge: samsung-dsim: Fetch pll-clock-frequency automatically > drm: bridge: samsung-dsim: Select GENERIC_PHY_MIPI_DPHY > drm: bridge: samsung-dsim: Dynamically configure DPHY timing > drm: bridge: samsung-dsim: Support non-burst mode > > Lucas Stach (1): > drm: bridge: samsung-dsim: fix blanking packet size calculation > > drivers/gpu/drm/bridge/Kconfig | 1 + > drivers/gpu/drm/bridge/samsung-dsim.c | 143 +++++++++++++++++++++----- > include/drm/bridge/samsung-dsim.h | 4 + > 3 files changed, 125 insertions(+), 23 deletions(-) Feel free to add to all patches: Tested-by: Marek Szyprowski > V6: Squash-in an additional error fix from Lucas Stach regarding the > DPHY calcuations. Remove the dynamic_dphy variable and let > everyone use the new calculations. Move the hs_clock caching > from patch 6 to patch 5 to go along with the DPHY calcuations > since they are now based on the recorded hs_clock rate. > > V5: Update error message to dev_info and change them to indicate > what is happening without sounding like an error when optional > device tree entries are missing. > > V4: Undo some accidental whitespace changes, rename PS_TO_CYCLE > variables to ps and hz from PS and MHz. Remove if check > before the samsung_dsim_set_phy_ctrl call since it's > unnecessary. > Added additional tested-by and reviewed-by comments. > Squash patches 6 and 7 together since the supporting > non-burst (patch 6) mode doesn't really work until > patch 7 was applied. > > V3: When checking if the bust-clock is present, only check for it > in the device tree, and don't check the presence of the > MIPI_DSI_MODE_VIDEO_BURST flag as it breaks an existing Exynos > board. > > Add a new patch to the series to select GENERIC_PHY_MIPI_DPHY in > Kconfig otherwise the build breaks on the 32-bit Exynos. > > Change vco_min variable name to min_freq > > Added tested-by from Chen-Yu Tsai > > V2: Instead of using my packet blanking calculation, this integrates > on from Lucas Stach which gets modified later in the series to > cache the value of the HS-clock instead of having to do the > calucations again. > > Instead of completely eliminating the PLL clock frequency from > the device tree, this makes it optional to avoid breaking some > Samsung devices. When the samsung,pll-clock-frequency is not > found, it reads the value of the clock named "sclk_mipi" > This also maintains backwards compatibility with older device > trees. > > This also changes the DPHY calcuation from a Look-up table, > a reverse engineered algorithm which uses > phy_mipi_dphy_get_default_config to determine the standard > nominal values and calculates the cycles necessary to update > the DPHY timings accordingly. > Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland