From patchwork Wed Feb 24 23:01:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 386883 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp753106jap; Wed, 24 Feb 2021 15:01:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbojFyDvUKvtXuT7tJwaBaj1/324BcATYrHuuBASsQKKqL2u6jZQ6D3A1i5YziXY0raQci X-Received: by 2002:a62:2f83:0:b029:1ec:48b2:73da with SMTP id v125-20020a622f830000b02901ec48b273damr277646pfv.1.1614207709958; Wed, 24 Feb 2021 15:01:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614207709; cv=none; d=google.com; s=arc-20160816; b=ZJjS8Ouc1ZUDjhCZP6mqYdPQku2nNqwCYj0eyv93QesHGclcr8Wm/sAaaYxxPI7c// hqPWYjCnaDZku9iyEpMTQAbDUKYwgZemDe4YEOnCMo4plb4DecmNhK0q8y/pI6Q72JUQ i6H6jQxwzx3yovRUL8vA5CFxO7LR2i+xpZnCAua5YbEHbJf93N+LECTTF7YbV119bbbw WRE8sbhX9fkzqlDt0uCkq5LCkR115CEfUYILT+eWBsnuvyUhdQNs1VDWxq+0jSYNqpfu nXV0+Y0KgbaFLx0HojN56qLzSwqRJUUYxwr1ymR6BEPr8qvKYd/qY/DHnpEKcZoITCPQ Teog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=CFkNlVQPbmh1/uwUkDQ1VmemAzuH72POcKFMULN4IHs=; b=DGygLyGeF8BCtaJX+5iI52GpSGN/od4LreTwPzmDTyVk0TKPevaf4/mSN5a+G51B53 rTZLOboaqkP6nPkLVSy1zNg6Ygo0vXCtOV5LpobU2yMnTG9i2LmCnmx9oh4GDtiCv/m5 024ktdU1ofgpFu5Yt0pi2TWCzZuSjgghpjx+P642lp4u8jbLJnVpt2LEamQd/tk2b3hy R0e8ef3f6myIGJn7mDOGRMKVtTnZO1UcakO8/xaE77xA2tnObHzQXZ/jPBvHS0AfWG9g kehSq9TFmLZWji7AwpQmLz2GwgwSGYYNFOVNCN3EVQuWM5bR3P9C+tIM7wGAcSeRqw2P CpKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=m8MeP9Rg; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id j16si3560289pgl.390.2021.02.24.15.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 15:01:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=m8MeP9Rg; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A4EE6EC03; Wed, 24 Feb 2021 23:01:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by gabe.freedesktop.org (Postfix) with ESMTPS id EE5ED6EC02 for ; Wed, 24 Feb 2021 23:01:45 +0000 (UTC) Received: by mail-lj1-x22d.google.com with SMTP id c8so4319219ljd.12 for ; Wed, 24 Feb 2021 15:01:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JWazTQ/6PwXeBKQ5AHtcslmYVVFr0X7rQ3bwRNkLBQ4=; b=m8MeP9RgTHfK0oJ8o9ojw9reVRo40AHAx9ZzYGHPC0gEmpmWgPEPO/O9JeWslY82zI sKiqDko9RY9cOIrweUbRxWZVjFq50Ge+/SFckP5LQvfuysIT68G/bKXgWUXuAxhkdmg4 5x4IDAEum+tvpyIKyykBuWR+6hlcjIwUPv4wlgLii8wtavrTHZFb+/TY0GhrHJJqAoEJ OEL319aFwTMvsXGYVBUwNfRRHdUvkK6301N5dp8JHDYMqd/nZqINh0YKW2W/y2VmigEL eovRDofitUKj42GNEW9iFi1lrQP+herSPzNo7LRa182aKKwF8P7UWzQBfCLuNtGmWq7f ZGpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JWazTQ/6PwXeBKQ5AHtcslmYVVFr0X7rQ3bwRNkLBQ4=; b=B/fhdNQ6tKtCGSFUX9Pa1kSLALUIEfU/s/ubOuDNI8rg0yBgr6ydMXrEEethjng60a F9UsU0RaSv+kzEewL3izYTKYXWdMB0BxX7X877F9BFf/WJAdB/tWZvTzFKCwo+tVoOpa lc7i5lY0FtDsI4KKyLzJkmkvwKOD6I0xDUOxdJVJ337upoksfNlni6OFdK1wS5olpp8a T/FKb6fMCqfKNuhY9dHXwftbq/G42q7EsuNcXPT+jUSbqQtP1bvGLnkgwlE31b12asKA D1RuSiXaqAHL2o8+TnqrVOXH754YMBIgKIBLLYUCkUg4zpxJaRyMj7aNknQbadw2WKaE 4bmw== X-Gm-Message-State: AOAM533aJEpP/uj1FVhcIR9E8SsnUxkes+A+DjMjtuq+4JNJ0EasqRu3 YhCxMJ4/E9KB6FFjIHrrLcUUVqq7nUwJ9w== X-Received: by 2002:a2e:8849:: with SMTP id z9mr50547ljj.478.1614207704266; Wed, 24 Feb 2021 15:01:44 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id a1sm757790ljm.73.2021.02.24.15.01.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 15:01:43 -0800 (PST) From: Dmitry Baryshkov To: Rob Clark , Sean Paul Subject: [PATCH] drm/msm/dsi_pll_7nm: Solve TODO for multiplier frac_bits assignment Date: Thu, 25 Feb 2021 02:01:43 +0300 Message-Id: <20210224230143.1216118-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The number of fractional registers bits is known and already set in the frac_bits variable of the dsi_pll_config struct here in 7nm: remove the TODO by simply using that variable. This is a copy of 196145eb1af1 ("drm/msm/dsi_pll_10nm: Solve TODO for multiplier frac_bits assignment"). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.30.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel Reviewed-by: Abhinav Kumar diff --git a/drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c b/drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c index c1f6708367ae..0458eda15114 100644 --- a/drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c +++ b/drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c @@ -509,6 +509,7 @@ static unsigned long dsi_pll_7nm_vco_recalc_rate(struct clk_hw *hw, { struct msm_dsi_pll *pll = hw_clk_to_pll(hw); struct dsi_pll_7nm *pll_7nm = to_pll_7nm(pll); + struct dsi_pll_config *config = &pll_7nm->pll_configuration; void __iomem *base = pll_7nm->mmio; u64 ref_clk = pll_7nm->vco_ref_clk_rate; u64 vco_rate = 0x0; @@ -529,9 +530,8 @@ static unsigned long dsi_pll_7nm_vco_recalc_rate(struct clk_hw *hw, /* * TODO: * 1. Assumes prescaler is disabled - * 2. Multiplier is 2^18. it should be 2^(num_of_frac_bits) */ - multiplier = 1 << 18; + multiplier = 1 << config->frac_bits; pll_freq = dec * (ref_clk * 2); tmp64 = (ref_clk * 2 * frac); pll_freq += div_u64(tmp64, multiplier);