Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp11202964rwr; Fri, 12 May 2023 22:09:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ59xPqXaelo4ZqiB345YXC+5cZoY5qYjSKbs+mYism4kBbq6c9Kg/T0/c6ZWTOGS+2pV+zf X-Received: by 2002:a05:6a20:3d20:b0:100:377b:2753 with SMTP id y32-20020a056a203d2000b00100377b2753mr27537832pzi.14.1683954552791; Fri, 12 May 2023 22:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683954552; cv=none; d=google.com; s=arc-20160816; b=UPlFyf/GDPV9pY941/zlVWovjJX6BNO6hMMfEIOQ5/uPi32JlSopJbyp6apaLlimyb EKTq6O5Nmk0mk6VrCSMwXOnff/J0ss4fjxjm3t0GbDYEJx//jkr2/fc0J9lud3EpgaBx r3ICcTZldNNV8EAMkfQKiwk7hiN6Zuac24fL5PaG2igqwpD/6fzN2V1/7SJDJIqQCqEV y7lAtFYWb1cZ5ZYZXVPDLtxKMYN1HGcCZNltZyFYdow96kyfUoaj23QwjtJoq5YWiBo/ wTgfuoLrWNcSizsHgw8QTNdm/z8T31nXi3FKe5ZjVJVrjIaDChmpO0dhmeXCcO5GKTZw Z3VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=7izujv/OASzpQI3cb0P6LLzhvUseZlQhTs3+10fnQcE=; b=P5DFfstnz2SoxZD3jVESXLkNDYZp83M43N68wFpSyI9Rvt4xoaXXTW1M3m4YOvxIe9 zgatJO6cFYJTCKxXcaPNhgqG2qkpbUyFJLt4efdXQ16CwT9Vrxf5GpSRFAXRAAsloTtS pCsG87+YMPeO+L1DWGWLNc2tBUbLVsHwhEfxVP/ZrgW2CHhT6IGMccYnLzAU6tBnRifo wBXbkMYkh9HAP4W+lrq/iSTjIcG5mp7TQek7B47yhcoAlhhk6QzZpA4/YEXYGAsWfzlO 7KCWvJmz6ykY8tZJnsJ6nf8WiNm9z90p33E0vvOFM2Hd+XvWenaX2kcZhULV84NonAf3 ENWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=gOuMfs9X; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q2-20020a63bc02000000b00528d0d8b7bbsi10837167pge.595.2023.05.12.22.09.00; Fri, 12 May 2023 22:09:12 -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=@gmail.com header.s=20221208 header.b=gOuMfs9X; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230049AbjEME0O (ORCPT + 99 others); Sat, 13 May 2023 00:26:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjEME0M (ORCPT ); Sat, 13 May 2023 00:26:12 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2345910C0 for ; Fri, 12 May 2023 21:26:11 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1aae5c2423dso103138245ad.3 for ; Fri, 12 May 2023 21:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683951970; x=1686543970; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7izujv/OASzpQI3cb0P6LLzhvUseZlQhTs3+10fnQcE=; b=gOuMfs9XFHS52bzXmCu1e4dPL5BIJG3/wmyuEAoeeRsGQ0tatDTiVfqABa2YYrRfP4 tNfrwtipHYsBOmSzTccyyzzmceCCu9hwjnHMRnQsxB1T8Atjy7qJqZ3bQEIDsDD2woDr pPcnApN9xHpQj6JJNDYCACLMXXJtCLpACzPx+mN1JT1be7r8+u5DtJ0izZRnJzly1dio S7T5ctk43xh7N9MH7OA5RLFOwgGfqOdgaCcxlqobN8SfhXVX2ppDS48Dw2IMPIe1utys CMRZxQGQ1B/Jg7O6heCraWD9I9dlxvaToF9GvYy0NZ/2yUPT+0H4LdxfGuog4x7Ca/XX RmHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683951970; x=1686543970; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7izujv/OASzpQI3cb0P6LLzhvUseZlQhTs3+10fnQcE=; b=g+PkD05kfDrWsaotS7ukga46RAjJ6tjjIVfp/py2uo8/MJAPw65AF1MhAXDQsQmej3 dtpu6wimIctMp5S9I6k5tsU+UjEudkTMN2NtQrLNJKCnh/hM+z+ZANZUKmj84P+IHPyC M3pAHknzFLv2npjWflqDwTnt3/8TeABFb+8RyzuQFXU5T4CUrFRl9up2uRigRuXv/Si2 A8HeHdobYLsrhhku2U/O5GMVgG2ddPYm9u1Gc8KhEKAngD+lmRpuubB792nZLDRXgrrP mZt8FFxwJyNvSxzaLJTFiB0FGFHxM2AFztD3Q02iJT80DQ0Hlz5BtWB2eUGUXm8/5op0 hjRw== X-Gm-Message-State: AC+VfDzNw+62TL4sMqFFzR+5HXCUFfScU1fYb61DyBISBowU0Z0ELzJj dwcQB4k3gNtGkBI1eDmHZzaeUhEwm3oto4DGKMtsLJ2vm4o= X-Received: by 2002:a17:902:bb8d:b0:1ad:e2b6:d29c with SMTP id m13-20020a170902bb8d00b001ade2b6d29cmr4465906pls.26.1683951970227; Fri, 12 May 2023 21:26:10 -0700 (PDT) MIME-Version: 1.0 References: <20230506192453.725621-1-aford173@gmail.com> <20230506192453.725621-6-aford173@gmail.com> <275064c0e6c814d8e8fda6bcf70d6e8c3bdc3011.camel@pengutronix.de> <7a83b8c1-88ff-0ae6-9c3b-d49fc08c7ac0@samsung.com> In-Reply-To: <7a83b8c1-88ff-0ae6-9c3b-d49fc08c7ac0@samsung.com> From: Adam Ford Date: Fri, 12 May 2023 23:25:58 -0500 Message-ID: Subject: Re: [PATCH V5 5/6] drm: bridge: samsung-dsim: Dynamically configure DPHY timing To: Marek Szyprowski Cc: Lucas Stach , dri-devel@lists.freedesktop.org, Marek Vasut , Neil Armstrong , Jernej Skrabec , Robert Foss , Jonas Karlman , aford@beaconembedded.com, Frieder Schrempf , linux-kernel@vger.kernel.org, Michael Walle , Laurent Pinchart , Andrzej Hajda , Chen-Yu Tsai , Jagan Teki Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 Fri, May 12, 2023 at 4:02=E2=80=AFPM Marek Szyprowski wrote: > > On 12.05.2023 22:00, Adam Ford wrote: > > On Fri, May 12, 2023 at 2:37=E2=80=AFPM Lucas Stach wrote: > >> Am Samstag, dem 06.05.2023 um 14:24 -0500 schrieb Adam Ford: > >>> 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. > >>> > >> This week I finally had some time to take a deeper look at this series > >> and test it on some of my systems. > > Thanks for testing this! > >> This patch causes issues when the burst clock rate is fixed by > >> supplying the DT entry. Instead of describing the issue below, I'm > >> attaching the patch that makes things work on my system. > > Oops, sorry about that. > > > >> I would appreciate if you could test this one on your side. Feel free > >> to squash it into yours if you find it working properly. > > I reviewed your patch, and it looks like it makes a lot of sense. > > If it works, I'll squash them together and add your name to the sign-of= f. That worked really well, I'll add it to my WIP directory since Marek S said he'd test the other proposal of dropping the dynamic phy flag and corresponding check in favor of pushing everyone to the same code. > > > >> Also I would almost bet that dynamic_dphy is working on the Exynos > >> boards with that fix added. So if anyone with access to those boards > >> would like to give it a shot, we may be able to get rid of the > >> hardcoded PHY parameters altogether, which would be a nice cleanup. > > I wondered the same thing, but I didn't want to create more work for > > Marek S and since there was so much churn getting the original driver > > ported, I thought it would be the safest thing to try to give the > > imx8m m/n/p the features without breaking the Exynos. > > > > Marek S - Do you want me to post this file without the extra checks to > > see if it still works with Exynos? > > Feel free to send me patches to test or just point to your > work-in-progress git repo. Thanks for testing this, Marek S. My work-in-progress branch is: https://github.com/aford173/linux/tree/dsim-updates-wip Depending on what you find will determine how I modify the next revision of the code I push, so I very much appreciate your feedback. Hopefully the suggestion from Lucas will work for your applications and we can reduce some of the code complexity. adam > > > Best regards > -- > Marek Szyprowski, PhD > Samsung R&D Institute Poland >