Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1193882ybz; Thu, 16 Apr 2020 04:49:31 -0700 (PDT) X-Google-Smtp-Source: APiQypKHG3XTJCddTpsgW5xwqhmq1+SwyVy8ESvCR3/yc+KMpA8ZNE3vdc+VChpXWLr3jCX1zlLQ X-Received: by 2002:aa7:d794:: with SMTP id s20mr17388831edq.141.1587037771258; Thu, 16 Apr 2020 04:49:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587037771; cv=none; d=google.com; s=arc-20160816; b=v+hRZpUSKNuNWKOMUXcuG48RxG2ZxnLPn2lmVj+VJbEeX/LcxUzbBW/RFcDRNj3hCl 0VoZUkAPCpfKGD1W1yoW0u56m67GFeTmC4TyAjLnKIGwGITFxRFDRCLMbmvAMjebrdl2 WFH5He4Pzfwzp4mHHBPwmzdQlmgvQCDi4FvVia8vPpC7rmmejWkzdgw8xE0EnoON/cYX i37jdzExpnPz4RtgsIJ1LFau/QXAbaNrFcSdyBEg6cZsnRb4qrem4Z8CF8QWgxmIQQLX FCFx31A7ueK+Ktf8oHU6n3yfwJX+HLGyrFFgQucHndkjEWq5VqkHKEB3N1GbQKkn7z+H fN/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references:dkim-signature; bh=9L5k3Ln1Qt7W9TpURaqzpjRy4n7lxiu2UCwSIpKQOFY=; b=WXoMlKk61F+tv4tP+rdnWX79SZkAWjTlrKuAT9iOee8DX2oC92FGROUXOLMinMou/p t+3+j2yH6W/ILiaGUwu2YGVK4EkakxpXcydmOw+CvO/zGAWgZnGEEVrre8+8NG8f8mkE 1vP31rdukaSKNEW8Gz4aBc71grMhB8DxF9fYDsFgb5Ady1sByULYgI9y7A+0Y2LBoez4 W9/grO2xc2BraE1uZUilBc0QwGIAs9boED7qznOytUXo3oCd4ZJ6TY56xyD7PzODYmjT Gf424dEm898RId0BdsDCUGGZxGzZDN2xDi8T/iIWzCay7ep2fS3+2qy/TByqIV+4bMSL Mz6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Ryq1RWfi; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d10si5298207edy.293.2020.04.16.04.49.08; Thu, 16 Apr 2020 04:49:31 -0700 (PDT) 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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Ryq1RWfi; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504873AbgDPLqa (ORCPT + 99 others); Thu, 16 Apr 2020 07:46:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2505036AbgDPKcZ (ORCPT ); Thu, 16 Apr 2020 06:32:25 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1CABC061A0F for ; Thu, 16 Apr 2020 03:32:23 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id o81so4016787wmo.2 for ; Thu, 16 Apr 2020 03:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=9L5k3Ln1Qt7W9TpURaqzpjRy4n7lxiu2UCwSIpKQOFY=; b=Ryq1RWfipGTXPSDerCgXOnwVBcBk+SES+dQi/983JsKTieI0hUpxVt0XEnAt5BZtc+ 3j0OPScJqjuBIE/e8RGOCz2qxvAOsR5mXaTJGLhb/2duJk/L3WjLQ/RFj565RNvubZUj hrSaYRFzGzIrj5sKgXIknAqEaWAnJEKXWJhEzJV60auxxyKw0K6wI8LTl2AvhZqxAIzs uUb+EokUxmU9Z5axhY1kITo29sfTFoPdQv2b6GKfiFiAtbS7xobLEghD53lOPZN2TpEu nZmpRVx6DspQ/ffW9RGXXgnbX7+3JVYh3AZBYzIMNW5yjBNXwQzkQJY9vONcYn4HDTT4 WFog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=9L5k3Ln1Qt7W9TpURaqzpjRy4n7lxiu2UCwSIpKQOFY=; b=g36K4pIluTAOzTaQFBTjVJESch1S+oA173n/c9R3B79tc79aTOzZ4vqf3lt4re+egf mYwBtnrCR8BH2x0abHL8NiyApV9v26JYAiZlGb96XbXX7HJH2NjURaYWZ/zh2FXWKyIt NrIgP6QQNBWpNw8IVP51xRaUQ1S1GB2f+ZnlMGcuM4fBiOssiKscK9BIEap+Ib2prTn/ YspyPFVz264ZZBrL+VY4HVMHo7PEpJCmYtesbAajBFFE27+f+PdIAYY2R6P6Gy0FVziu VECaO4nJ6iaP7ftlB5CW2Z//P+rearnFq93+wutOB27scOVfoGAluV0H/lSN4H3mm5NR vIdw== X-Gm-Message-State: AGi0PuaxRzafYJwr4IN32YzLB1n93fjumWrofLQvc59AlyDF9GlqNKxX s6Ti8Jad8D/gcSeGhZqQdzvCaA== X-Received: by 2002:a7b:c181:: with SMTP id y1mr4442183wmi.83.1587033142678; Thu, 16 Apr 2020 03:32:22 -0700 (PDT) Received: from localhost (cag06-3-82-243-161-21.fbx.proxad.net. [82.243.161.21]) by smtp.gmail.com with ESMTPSA id j135sm3021115wmj.46.2020.04.16.03.32.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 03:32:22 -0700 (PDT) References: <20200414200017.226136-1-martin.blumenstingl@googlemail.com> <20200414200017.226136-2-martin.blumenstingl@googlemail.com> User-agent: mu4e 1.3.3; emacs 26.3 From: Jerome Brunet To: Martin Blumenstingl , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org Cc: narmstrong@baylibre.com, mturquette@baylibre.com, sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] clk: meson: meson8b: Fix the first parent of vid_pll_in_sel In-reply-to: <20200414200017.226136-2-martin.blumenstingl@googlemail.com> Date: Thu, 16 Apr 2020 12:32:21 +0200 Message-ID: <1jblnrbu16.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 14 Apr 2020 at 22:00, Martin Blumenstingl wrote: > Use hdmi_pll_lvds_out as parent of the vid_pll_in_sel clock. It's not > easy to see that the vendor kernel does the same, but it actually does. > meson_clk_pll_ops in mainline still cannot fully recalculate all rates > from the HDMI PLL registers because some register bits (at the time of > writing it's unknown which bits are used for this) double the HDMI PLL > output rate (compared to simply considering M, N and FRAC). Have you considered adding a fixed_factor pre-multiplier, like in the gxbb driver ? Seems to be the same thing > > Update the vid_pll_in_sel parent so our clock calculation works for > simple clock settings like the CVBS output (where no rate doubling is > going on). The PLL ops need to be fixed later on for more complex clock > settings (all HDMI rates). > > Fixes: 6cb57c678bb70 ("clk: meson: meson8b: add the read-only video clock trees") > Suggested-by: Neil Armstrong > Signed-off-by: Martin Blumenstingl > --- > drivers/clk/meson/meson8b.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c > index 7c55c695cbae..90d284ffc780 100644 > --- a/drivers/clk/meson/meson8b.c > +++ b/drivers/clk/meson/meson8b.c > @@ -1077,7 +1077,7 @@ static struct clk_regmap meson8b_vid_pll_in_sel = { > * Meson8m2: vid2_pll > */ > .parent_hws = (const struct clk_hw *[]) { > - &meson8b_hdmi_pll_dco.hw > + &meson8b_hdmi_pll_lvds_out.hw > }, > .num_parents = 1, > .flags = CLK_SET_RATE_PARENT,