Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6533117rwr; Tue, 2 May 2023 01:37:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ42vqJxd5Gkhl6LBi3N0tEg74O4TmMi665JcCHKhC27sYKvV4aAFW2qLgfeZ78ruobSEMcx X-Received: by 2002:a17:90a:a006:b0:247:2300:87d9 with SMTP id q6-20020a17090aa00600b00247230087d9mr17503342pjp.34.1683016676313; Tue, 02 May 2023 01:37:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683016676; cv=none; d=google.com; s=arc-20160816; b=ndnKcmUyfqucvnUqI3U2O/vFswMgExtAEKhAZZ5uFRgWxtE9NJdUFLcR25vOgpILfc 3VzZXEAj/4xqYuh8qlQzBkAaOzSjIPGJk6/sEwvubBoi9FjdNrqYFBLgMXm2ipK/ppkL f7zPzpPr2v6B0w01lhYRziQ6rwbKvcUPGtLyzBwI2iesJbHOFng6N7xqhruIBDBAffcE A8ndLsZB0+dlbg+O0bXShQkpTaRd/geDe34UheG15uq9Ttg57y5/Q8tkOUAudco7XC02 ldjpVwAwfrWHpZyWyMkuRaKyi6r+fQpDWrWrtybvO4CZ8pdBCD98DoxdUei2r9YU5Vc4 viUQ== 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:content-language:cc:to:subject:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=UypFwzmuQcx4hhNNhnyx0XJbjaAixLnh/EMVbuhN5X0=; b=xmFaJNb0Ryu86MP1GueRr55pPVGejug8jMunWnNIW3s4vqe4zGarqz1uG6bRrZ35+q KZE6siUOz2SGn43vk2X+IwttX6DtbkvQEDMZZmBkgQ1STsw6fIuM3SeFM0GiujEjankA M3LYSMmGI27fTKMXJu4w1BBN2g8nITUP+ffGFslWdlVkLlTFmVS/uZFwvasggwNhD9FA OvR8SQf+jgS7vKt8GLjtAsLBFKSHmnIjRolJWvXAYwCU3iiBtdTy5p+dYPSkouR1+Wh3 Seagbw7AV07BreKrWxrU5v+/8mo04at6b9Ddb/lgjli5X7Su/aUZ6ZOMZEcbI/LrtGZ4 6aJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=u2vE7wbZ; 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 a21-20020a63e855000000b0051398fca164si30451907pgk.833.2023.05.02.01.37.42; Tue, 02 May 2023 01:37:56 -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=u2vE7wbZ; 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 S233700AbjEBIgG (ORCPT + 99 others); Tue, 2 May 2023 04:36:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233831AbjEBIf4 (ORCPT ); Tue, 2 May 2023 04:35:56 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28ADD4EE3 for ; Tue, 2 May 2023 01:35:38 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230502083534euoutp02aab302e83722c69d46a03b0eaf8e9789~bRp8J40VW1451614516euoutp02i for ; Tue, 2 May 2023 08:35:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230502083534euoutp02aab302e83722c69d46a03b0eaf8e9789~bRp8J40VW1451614516euoutp02i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1683016534; bh=UypFwzmuQcx4hhNNhnyx0XJbjaAixLnh/EMVbuhN5X0=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=u2vE7wbZz52yRRvoEz/nbZDnTIDnhFurJS3ARex08lG1bflW22+YTHlykua2vlqZs YB3T+74BBrABRXgTy3I1Uhy/HaEax57rdSGF+Ur6tLaRv7r6ORf2upj1yMdrR1mYCY Dw1ZjMqmZj44VCWgp1PHbxFU7W5dBCo7DN3X9LB8= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230502083534eucas1p2391a68c5a44cc0ec3a483adf701baa3b~bRp75c3J10052100521eucas1p2M; Tue, 2 May 2023 08:35:34 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 71.15.42423.65BC0546; Tue, 2 May 2023 09:35:34 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230502083533eucas1p1871845bf64ab28e2035c62e1a6db4399~bRp7QzwfX1553815538eucas1p1H; Tue, 2 May 2023 08:35:33 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230502083533eusmtrp2f17d965bc436245e28ee2948e9833cef~bRp7P-cC21238012380eusmtrp2W; Tue, 2 May 2023 08:35:33 +0000 (GMT) X-AuditID: cbfec7f2-a51ff7000002a5b7-09-6450cb56da3a Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 92.FC.10549.55BC0546; Tue, 2 May 2023 09:35:33 +0100 (BST) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230502083532eusmtip2d1912bb17129c07cee4a2f0b14010cf4~bRp6SXubF2296222962eusmtip2E; Tue, 2 May 2023 08:35:32 +0000 (GMT) Message-ID: <05fb14ea-1083-8efd-dad0-a0e707af8131@samsung.com> Date: Tue, 2 May 2023 10:35:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH V3 0/7] drm: bridge: samsung-dsim: Support variable clocking To: Adam Ford , dri-devel@lists.freedesktop.org Cc: marex@denx.de, aford@beaconembedded.com, Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Inki Dae , Jagan Teki , linux-kernel@vger.kernel.org Content-Language: en-US From: Marek Szyprowski In-Reply-To: <20230502010759.17282-1-aford173@gmail.com> Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA01SfUwTdxjOr3e9XskKx+nsL4ouaabTmfFhmnCRQVymy2V/MDY3s81seoPj Q0vFXoFh1FTcnNTNHY2kegKisuAYoCIWK2VBNLalZvKxomVsJaYgH618tLLoMtiOw43/nvd5 nvf3Pu+bH46QE/KVeJ7eyBr0jE6DRaG2u8/uv7HDk5GV2FBDUoO/eRCqzXtCQbkeXJBR/oth lJq3lSPUr08nMcri51Eq0sxj1ONzTYByB70oVVZeq6D6blZiVPDYEUBN2gcAZan2ybfE0I3T fjk9VmdC6GrBhdLtszUobRd+V9Bnj5+R0xcdYzK6ub4Mo118r4we7HdgtP+EU0afbKkHdLh5 TYbq06g3s1hdXhFrSEjbHZUb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B4rH32wIWj52z7rJ7zO6YyeqxeM9L Jo9NqzrZPE5MuMTkcefaHjaP+93HmTz6tqxi9Pi8SS6AN0rPpii/tCRVISO/uMRWKdrQwkjP 0NJCz8jEUs/Q2DzWyshUSd/OJiU1J7MstUjfLkEv4821tcwFu8UrXjeJNTC+Euxi5OSQEDCR ePrlBVsXIxeHkMBSRonHy1rYIRIyEienNbBC2MISf651QRW9Z5Q4sPUXC0iCV8BOYuvG+8xd jBwcLAIqEstPBUKEBSVOznwCViIqkCpxY88fNpASYYEgiSN7eUDCIgLOEif/fmMCGckscJtZ 4s6mmywQ87sZJaYf2Qy2mFlAXOLWk/lMIDabgKFE11uQIzg5OAUsJNZtm8QOUWMm0bW1ixHC lpfY/nYO8wRGoVlI7piFZNQsJC2zkLQsYGRZxSiSWlqcm55bbKhXnJhbXJqXrpecn7uJEZgS th37uXkH47xXH/UOMTJxMB5ilOBgVhLh/VDolyLEm5JYWZValB9fVJqTWnyI0RQYFhOZpUST 84FJKa8k3tDMwNTQxMzSwNTSzFhJnNezoCNRSCA9sSQ1OzW1ILUIpo+Jg1OqgUn0Zs3Hv7Hc 0hXhaTJN7/YleEhrpi/4/ajVu9Zf3PhHZvk5myLH1btmmrp3cn92r3rbvH1HQubTmwWKH4/H uZY5buvaE9fId+y4x0VGt38am1cfuDVr733zE5Hh5UJ560OaFq/77/V+tfLChS8XG3wMremM ddwrPJ3df+HSFVKh3bUxyqUmrD+e/Th7I//e/VXsTzN3rqi9s9d++fW74pMXNJ/Q8PY27VzL syh5umDp8bVz+bfvi/LXKm9foHmqxnKTreEau7pEoyMbws0+/nsWospfF1Obtq26/Hxt5Nyp d79r8B59Z5I2X/rxpA0cWo9OZp51nGrgsa1ISE/ahKVyR7ScdPw+wYcTox4VnVRiKc5INNRi LipOBAC5hnm9kgMAAA== X-CMS-MailID: 20230502083533eucas1p1871845bf64ab28e2035c62e1a6db4399 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20230502010811eucas1p1df7fcdcb3e3d363d39eb711f19618628 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230502010811eucas1p1df7fcdcb3e3d363d39eb711f19618628 References: <20230502010759.17282-1-aford173@gmail.com> X-Spam-Status: No, score=-8.7 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 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.2023 03:07, 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. > > Adam Ford (6): > 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 > drm: bridge: samsung-dsim: Let blanking calcuation work in 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 | 150 ++++++++++++++++++++++---- > include/drm/bridge/samsung-dsim.h | 5 + > 3 files changed, 136 insertions(+), 20 deletions(-) Works fine (= doesn't break) on Exynos. Tested-by: Marek Szyprowski > > --- > 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 backwords 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