Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp236491rdb; Mon, 18 Sep 2023 13:29:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGg5oQx9RmX2jdWht45RWq1dMOHqwdB0s1RjfZ+KLQUzBOUeLDmdpYQXoC6e1dgZfj1rkso X-Received: by 2002:a17:902:e74a:b0:1c1:e7b2:27af with SMTP id p10-20020a170902e74a00b001c1e7b227afmr11352390plf.57.1695068984487; Mon, 18 Sep 2023 13:29:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695068984; cv=none; d=google.com; s=arc-20160816; b=fJoz6AYYSaJ8blTGtoi0PRSVJZa/3+Fm3MKNW8Jbuphx6RXSE2OrC54G5TAfm199SO zCgaXyrSldRxxSiBTzUvBTgg7lk0+8N0AZR/fGOQbVcPbHWP7IauXdlDJJETMzdM+w0W hc1UM/hQohVutoVS+VQyqnuLSqPWR7ypkeDI13wrruQtFWgw1ZsFxtnRGgUXAMoMuzEd vL6Ixf334VaOEUOdZ/6h6U2o7qeTviIFVbgzR6u7nf70P7wSWIgvnlO5gPTjHuKkPUMe 3fB8Jybq+gUmwPy7wOFfH3xFVeFm2AtmNm9wT88dryZ8jc6f4fsRc84qHEiaKthN8PVT i4Aw== 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=2z+YfEIrjX3pGh98erEY2L625u+oUnPZE1jx6jpqjps=; fh=JI/y7deY4LSnyyMx/yvpnZhK8r/Ni+uOdZh9jl84hBo=; b=Dw3HQfNUZfJ376/PJYdUW3vy5uYy9bmTbv0UKjcFIuoE0SeqFB/ra6B4fqCHxQtQFS VaQ85ehxE68TriJDf5eRGVLl3R4ZI+FvZAFUk1kQegeK3TdMXZKskkbXlI0PCGy33uHB Y3R5HFa4HoLR8cTQIEQJO40/AztR6MdRujMFOBzUkgftv3U3X1rixsvbAlFAXRGMGSTG iDyB3lLRgQcX4N8EPbq++NB1u+hdnVGpnLYdC4lN6aiaTTKLKlci82FYpPMEaWU51sAH 6f0Z1d+O8PqbHSFEeuGVxrHvPuQA9avBq0mHCWhzyPXEwFAeJfpFgDMYCbrdJqPEONrQ eJOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="mm/LoWXa"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id u9-20020a1709026e0900b001c426636990si6621505plk.637.2023.09.18.13.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 13:29:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="mm/LoWXa"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id C7D9881A9B7B; Mon, 18 Sep 2023 10:59:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229473AbjIRR7h (ORCPT + 99 others); Mon, 18 Sep 2023 13:59:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjIRR7g (ORCPT ); Mon, 18 Sep 2023 13:59:36 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59C51DB; Mon, 18 Sep 2023 10:59:30 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-522bd411679so6173706a12.0; Mon, 18 Sep 2023 10:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695059968; x=1695664768; darn=vger.kernel.org; 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=2z+YfEIrjX3pGh98erEY2L625u+oUnPZE1jx6jpqjps=; b=mm/LoWXaXRxm27XEHEwGWRp9Ej/ppCSH5ewljKttRPsRH+I0rq95QyU+g7EM8qH9r8 truc/e/gYlsrkakVr6hVCEP13oOoi5qyZJ3l7RlA8SwMFRrdkN2+HWZrkO9wQf7PNNOg RBonJ+PC7L3A83MXyThWGhix5a8sayEJQS1zPpNc83i/MQB+WYtY5pa1kbLO6JGzCYxq rW1UMJ5UHDtWB6Ho0psNG2zXcGY3+G18DFBQyVRrW3yJXjSAC4g1jpiGIzN+q3XC5Tgj 7cmpkTiRFn9VvmHkqI92KiPM68UT123RGcPJtoRCX9/81cz1R1llkCX3Z/PLK0IHsX5H wPcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695059968; x=1695664768; 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=2z+YfEIrjX3pGh98erEY2L625u+oUnPZE1jx6jpqjps=; b=VUTLWqB5WGrK0MLxlyDW4uCbyK6p1DvFG0zLdot/OHGHfMWhdq/ZDxCSa8LTnrrxkk jevrh+ZyW6haTuR2LFmJkKfZWEwjdlhx2NIciqBSDJBtV/h/8CidjYveBz7GeaVRVJ1c Rrx/dz9do0oRJhXXjBky82+Hemb5JU1EOl8sFjo+LrciQSiUD0MWgZTgPR907r9v5IIC 93yGQcjYCbNfoRMF6OGlzhAIh2wGfeh+799+e5WvA5ggZ9sRuZPcm7IWnwo8EYQcFtbO BvknXEvsmJwngBinEBGILdu71uWm2DZke8anF7I7jXoZ7P9SANahO0OUQ7bUa6MInyqs Sbnw== X-Gm-Message-State: AOJu0YzdiaF32aJIbSQKZIVDcqvyxATyDFwSmVymt1r8ZriQYZzgItru c7TbrSQEnnwC/8Ry6e2SKqLcsGd7rM79foGnzak= X-Received: by 2002:aa7:d3d6:0:b0:51e:2e39:9003 with SMTP id o22-20020aa7d3d6000000b0051e2e399003mr6614828edr.40.1695059968144; Mon, 18 Sep 2023 10:59:28 -0700 (PDT) MIME-Version: 1.0 References: <20230918-imx8mp-dtsi-v1-0-1d008b3237c0@skidata.com> In-Reply-To: From: Benjamin Bara Date: Mon, 18 Sep 2023 19:59:16 +0200 Message-ID: Subject: Re: [PATCH 00/13] imx8mp: first clock propagation attempt (for LVDS) To: Adam Ford Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Michael Turquette , Stephen Boyd , Russell King , Abel Vesa , Peng Fan , Frank Oltmanns , Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Benjamin Bara , Lucas Stach Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 18 Sep 2023 10:59:46 -0700 (PDT) Hi Adam! On Mon, 18 Sept 2023 at 07:00, Adam Ford wrote: > On Sun, Sep 17, 2023 at 3:40=E2=80=AFPM Benjamin Bara = wrote: > > The idea: > > Enable CLK_SET_RATE_PARENT, at least for media_disp2_pix and media_ldb. > > When this is done, ensure that the pll1443x can be re-configured, > > meaning it ensures that an already configured rate (crtc rate) is still > > supported when a second child requires a different rate (lvds rate). As > > Have you tested with the DSI as well? If memory servers, the DSI > clock and the LVDS clock are both clocked from the same video_pll. At > one time, I had done some experimentation with trying the DSI > connected to an HDMI bridge chip connected to a monitor and the LVDS > was connected to a display panel with a static resolution and refresh > rate. For my LVDS display, it needs 30MHz to display properly, but > various HDMI resolutions needed values that were not evenly divisible > by 30MHz which appeared to cause display sync issues when trying to > share a clock that was trying to dynamically adjust for two different > displays especially when trying to change the resoltuion of the HDMI > display to various values for different resolutions. Unfortunately I haven't. I think if you have the use case to support different "run-time-dynamic" (HDMI) rates in parallel with a static (LVDS) rate, it probably makes sense (for now) to just use a LVDS panel which can be feeded from one of the static PLLs directly and do a manual re-parenting in the dt. The manual re-parenting could be replaced by an automated re-parenting in the composite driver. When I think about it, it might make sense to extend clk-divider's clk_divider_bestdiv()[1] (which is currently used by the composite-8m) with a "find the best parent" implementation, something like: 1. are we in range if we divide the active parent with all possible dividers? (already existing) 2. are we in range if we switch to a different parent and divide it with all possible dividers? 3. are we in range if we re-configure a possible parent (and switch to it)? Steps 2 & 3 are e.g. implemented by at91's clk-master[2]. There are maybe also "smarter" solutions to the problem beside trying every possibility. Anyways, we already have a CLK_SET_RATE_NO_REPARENT which would indicate if we are allowed to do so. For static use cases involving both, I would probably (for now) go with a hard-assigned, tested clock rate in the dt. IMHO, this should always work as fall-back. Regards, Benjamin [1] https://elixir.bootlin.com/linux/v6.5.3/source/drivers/clk/clk-divider.= c#L304 [2] https://elixir.bootlin.com/linux/v6.5.3/source/drivers/clk/at91/clk-mas= ter.c#L586