Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2747885pxb; Mon, 31 Jan 2022 03:31:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxu2SBTYc3eiIlvERHVTJhg7b++xcfpj0mHRj9AQ3tUTF4894Qy7MEwz/6bumAnSgNcwwVA X-Received: by 2002:a17:902:f693:: with SMTP id l19mr20410407plg.146.1643628694622; Mon, 31 Jan 2022 03:31:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643628694; cv=none; d=google.com; s=arc-20160816; b=yQ/clpWkl1mBJWOiEQOt/RW3H1IuTQogZ40AKlWwCya5+/mFnthShdUGiqrxF6cvEJ kuUMa1++NNmwcx+3yXXp3AExfQNaT1NZD7uy+xcQkprwCyTxcW3iFhL6r8bJJbZLcd7Q iV5fmlbWVFXUSMB/gNS6Au4Dwreme78KnvpAZGAjevo1LO4AsmVBEIakgA8VJXNqqTz4 0Zk+Nd2z6MgXW10RjsrwcYvwCiFiAQdB595n1Zc7crl9+NtUOJAZ8PQ+KjVNGOnmKT+W hlALv4uKvn8hil8fe7kG03QiRv5BDNSbZ+7hadH8JJsmwOh/c31+rSAlH7b53KJUyte3 XFFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3hlBZRfJeaaEMgpDJfGF4VXTiNMRL5u5A8XWDhcHgIU=; b=cEAMP5JuX9YskFOqmcP2+wsKYL2enyh63T//O1BrMRtdI2WXZMkKLLKXDqB1SuaaCU L5JHM/K01//UX0iNxQHzpEGoAG3KwGEmhPR+WMipYVjdi1Anht49uJCcK8S+X5shlzUm 5XPrFXSQCK8C1duzxlW743zrszD8Ri+p/yvqt5/hPnpf++UYXk/0HBAxv53FQwNTcdQS eQ11Hwegkhw++xMm+IAPrIEuV+r6voq/JM1xTR4TJz6qM+bDkx3kiwCZeIKC1zrBXOPn FquhgGDDBs/r2QwBAL/yeD+K3OouAdBsm4F4ckbLXZBLDjunjb4dhlmbgXawcI/CtEmn HSkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RB+iJtZR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d4si13073687pgc.103.2022.01.31.03.31.24; Mon, 31 Jan 2022 03:31:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RB+iJtZR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1350758AbiA1TDP (ORCPT + 99 others); Fri, 28 Jan 2022 14:03:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233548AbiA1TDP (ORCPT ); Fri, 28 Jan 2022 14:03:15 -0500 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAEE7C061714 for ; Fri, 28 Jan 2022 11:03:14 -0800 (PST) Received: by mail-yb1-xb30.google.com with SMTP id c6so21326720ybk.3 for ; Fri, 28 Jan 2022 11:03:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3hlBZRfJeaaEMgpDJfGF4VXTiNMRL5u5A8XWDhcHgIU=; b=RB+iJtZRYF0dkmWtZQjZrE5l2GCNTyyleglmYgfhw2DfTccUOrvGv9t6I6Yk7N3fd1 i90XCiFg/0xlIqHxlY0zFOXcxPwjk7qLfB9xsvV/FxdncdXC32oYUY+M/uVFIzbbRkHS sGAHLY2u0DS9/gwV0Bw8Llaky5XDQPsalA9CkpoF7O7nCYaGNpqK/b3tj5Zq48+wjJoe QMaTbI9e0mRXYA0VjJ2MYyLeZM271Ly4gVi94O4Z7JeGjWaG7KtuFAcrocfly191vqsq BP+/8tBvp4hnN0JJUQazPDSUO82daB1GopBf7zqzTLm5faaI3mAwSJt3f4JT1K0I7IBP yiIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3hlBZRfJeaaEMgpDJfGF4VXTiNMRL5u5A8XWDhcHgIU=; b=f2WEkQqv2BmWr6/SG3EviHDclUnkZewqHlu8qAYpJY+aqfCvQ3Y0aWceqWBmnzIeW+ 9EdspyYngqqBwVmEZjBpsENBplNxAcRQrUDjNppePYRNc8BG00t4D862n1wT4oWa8kN6 P6oIlTxXojrnHT7VqO6EoNxWxhxAkaKPHTXumO5xaBMSR4Fp21kyrDJUvzMwsWIS5D+c dTmwsqgD5h5sQkh9x1c+OVFAeHi3dAXZC6Ipa+Cdez9T4Bdqs5g8K5PtpQ8rqeD+8JTr sG2vONz8TgREpN0QIjHyglljCNY/ZepJV3c+qGmO1uHG22WtRRGTInFl+ijRj6oy/jeC tKdg== X-Gm-Message-State: AOAM531TAXpfA4rWxWHGjyTbUJggXh6VkjRiJEmAYA4VW6lwJ22NVXqT fnevsbs8bHGurCW6ku24VsRQkEzNs3z1d0SvGqVPpYr+XWA= X-Received: by 2002:a05:6902:704:: with SMTP id k4mr14250783ybt.355.1643396593140; Fri, 28 Jan 2022 11:03:13 -0800 (PST) MIME-Version: 1.0 References: <20220126202427.3047814-1-pgwipeout@gmail.com> <20220127093307.GJ23490@pengutronix.de> In-Reply-To: <20220127093307.GJ23490@pengutronix.de> From: Peter Geis Date: Fri, 28 Jan 2022 14:03:02 -0500 Message-ID: Subject: Re: [PATCH] drm/bridge: synopsys/dw-hdmi: set cec clock rate To: Sascha Hauer Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Pierre-Hugues Husson , Archit Taneja , Robin Murphy , "open list:ARM/Rockchip SoC..." , =?UTF-8?Q?Heiko_St=C3=BCbner?= , dri-devel@lists.freedesktop.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 27, 2022 at 4:33 AM Sascha Hauer wrote: > > Hi Peter, > > On Wed, Jan 26, 2022 at 03:24:26PM -0500, Peter Geis wrote: > > The hdmi-cec clock must be 32khz in order for cec to work correctly. > > Ensure after enabling the clock we set it in order for the hardware to > > work as expected. > > Warn on failure, in case this is a static clock that is slighty off. > > Fixes hdmi-cec support on Rockchip devices. > > You removed this sentence in v2, but I just wanted to mention that > clk_set_rate() won't fail when the desired clock rate can't be > archieved. Instead, you will get the best rate that actually can be > reached. If you want to check that you are happy with the rate you'll > have to do a clk_round_rate() before setting the rate or a > clk_get_rate() afterwards. Thanks, the behavior in v2 is actually what I'm looking for. I dug into clk_set_rate while checking into its interaction with clk_prepare and I came to this conclusion. > > Sascha > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |