Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3763131pxf; Mon, 22 Mar 2021 14:35:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwB03Vp4YKh9MXHc5UTrz534w0S/MBzZL9ohur22sqvyCyszBY2LFowP1sifuQ0ftf89rP5 X-Received: by 2002:a17:906:9501:: with SMTP id u1mr1784924ejx.324.1616448948441; Mon, 22 Mar 2021 14:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616448948; cv=none; d=google.com; s=arc-20160816; b=SD8VEMAqAC1OtPBFs2DiebbMPywonp/pkUoM1O0xk5FOMWEc31EHwmH5Wji8JD1mCh Vxi+mayPKEmrKynlOszetsNlcHRwEfwxn9LTN37oxQ0HIJgy1avFrDl38vG6pHqXwZh5 dkAlz2RIEdi+lu1vuXXNwYkJRNQLKdkHOn3uVzK4JujS3Stcj1AQ8gjXP6t+W2QNsyOF rCllg8KLS+K+dUuch6a+jx7/04FS7GmkWLGWLuAHh1YnMfqU4e4gTZPF0ybKWsJ3Nmcc qPYbBLpAVFljdN+jIDGvcsHaw6hY9IB8Ve44eNBjdtFxlPodtnb9Jx80B1XwgtkY/CD8 cCXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=HwDL3lPXwnszf1LwCTHjd7ninm7N98ENSeeKeFboGic=; b=GG8bFmPSkGPjm8qy4Hy9txOzjpHyn61HwbJAHV1LzzJ2UZSo6rjM4Khx2g5vAapWNt QfFVvsQIqklZMvsHhB+dmfHd/saa9lndun2NJxP8ynWmF1TlpOX1lh/uGMcqNV3p7bVf 6fn7c9hmiMGlCF2r5VuEPiZCDCYVkaMp6tbKs4f4InIr4JnV6OoaaeuE6YpVd2F1hYnW c6ugF+052oMJL5IQw42YJiMedIaLMCqPPU3myOOsuebVg/L1wMrm0cWIrsLUZTyF7xko 0KbWuFBJJfOhzjQeYrEKRBIwlEytIqyWjYEosOLa4p6hlzIscUOihIc11BrDOnzgeUou WfMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@libero.it header.s=s2021 header.b=XIzPtv4S; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=libero.it Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i23si9979884ejz.1.2021.03.22.14.35.26; Mon, 22 Mar 2021 14:35:48 -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=@libero.it header.s=s2021 header.b=XIzPtv4S; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=libero.it Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229931AbhCVVeX (ORCPT + 99 others); Mon, 22 Mar 2021 17:34:23 -0400 Received: from smtp-17.italiaonline.it ([213.209.10.17]:33956 "EHLO libero.it" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229548AbhCVVdu (ORCPT ); Mon, 22 Mar 2021 17:33:50 -0400 Received: from passgat-Modern-14-A10M.homenet.telecomitalia.it ([87.20.116.197]) by smtp-17.iol.local with ESMTPA id OSB9lKwj3tpGHOSBHlyOiZ; Mon, 22 Mar 2021 22:33:48 +0100 x-libjamoibt: 1601 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2021; t=1616448828; bh=HwDL3lPXwnszf1LwCTHjd7ninm7N98ENSeeKeFboGic=; h=From; b=XIzPtv4SxZiEDfOsCc7DX90YrGlYtwCZ2rBoj/cEKyUiUSQN77ZUMn2ltwPszBaWw SvhKBR6G325ZXpuFVNYr8KwcHWJM6d7SJrguTGn7MzFcUQfc6AfLbcLkeE0X+39S7N zxrJTbwTtwtGCGqLKjt0Gf1c6MvZSGCcEIl9z5jXTTUO1vOoCNNiCpFww0Iecs2zYu cOt62uEF/yNokkzMudQu1pZpx9SL5X9hYkM8pfac24JyQj+eFQZqNB4jsiqHG9SUT3 HZxWG6hFyoft+hYPfLiBR7dg498KgMdvPv9SU/LvnEppdM9KgtCh/LzgMglpNgeYr7 am4uHFa3dElMQ== X-CNFS-Analysis: v=2.4 cv=Q7IXX66a c=1 sm=1 tr=0 ts=60590d3c cx=a_exe a=AVqmXbCQpuNSdJmApS5GbQ==:117 a=AVqmXbCQpuNSdJmApS5GbQ==:17 a=-grNfQwawjkoE-hAE8wA:9 a=+jEqtf1s3R9VXZ0wqowq2kgwd+I=:19 From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Dario Binacchi , Daniel Vetter , David Airlie , Jyri Sarha , Tomi Valkeinen , dri-devel@lists.freedesktop.org Subject: [PATCH v3 1/3] drm/tilcdc: rename req_rate to pclk_rate Date: Mon, 22 Mar 2021 22:33:35 +0100 Message-Id: <20210322213337.26667-2-dariobin@libero.it> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210322213337.26667-1-dariobin@libero.it> References: <20210322213337.26667-1-dariobin@libero.it> X-CMAE-Envelope: MS4xfAC5Flr2DXI/3y8tjQP1ykuGXiiK8y/WSYfF+QIHBOHrIa43VFbF5O6hDlBQyvABFoD7VhsSNvbvNGr/O5X3Qb3axwzL/ACPN/uzXJ+Q1mLUjXDYxvwB l3pcRdEgaEhtLL9usYBgZq1mY0p3SqfCrR2uXZHtOwfff6y/ZMgyixqI3rrHwp6aL6//csBTLrqzkRX8klLcjyNgs+FHexwfWzkKLBroY4yo3hMbFtToOUUr 16TzWcpACvsG+IYd8VCNOU6oCvgN9ALx3QWdYzFyYJSNQuWYU4G7RKjVgwHsa7Lki7JiBGBheqbwNfN0IcGArO0ZMwK+xRfEk671GHNvTU7KDVKVLELixdiN 0oRBd8BY5UdzAp8gKQtRhpW9ZJA0Aek3oklwNp7KeTclmX2o2AiARcDZ8H1YS8i3VDcyfJs+ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The req_rate name is a little misleading, so let's rename to pclk_rate (pixel clock rate). Signed-off-by: Dario Binacchi --- (no changes since v2) Changes in v2: - The patch has been added in version 2. drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index 30213708fc99..aeec5786617d 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -203,18 +203,18 @@ static void tilcdc_crtc_set_clk(struct drm_crtc *crtc) struct drm_device *dev = crtc->dev; struct tilcdc_drm_private *priv = dev->dev_private; struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc); - unsigned long clk_rate, real_rate, req_rate; + unsigned long clk_rate, real_rate, pclk_rate; unsigned int clkdiv; int ret; clkdiv = 2; /* first try using a standard divider of 2 */ /* mode.clock is in KHz, set_rate wants parameter in Hz */ - req_rate = crtc->mode.clock * 1000; + pclk_rate = crtc->mode.clock * 1000; - ret = clk_set_rate(priv->clk, req_rate * clkdiv); + ret = clk_set_rate(priv->clk, pclk_rate * clkdiv); clk_rate = clk_get_rate(priv->clk); - if (ret < 0 || tilcdc_pclk_diff(req_rate, clk_rate) > 5) { + if (ret < 0 || tilcdc_pclk_diff(pclk_rate, clk_rate) > 5) { /* * If we fail to set the clock rate (some architectures don't * use the common clock framework yet and may not implement @@ -229,7 +229,7 @@ static void tilcdc_crtc_set_clk(struct drm_crtc *crtc) return; } - clkdiv = DIV_ROUND_CLOSEST(clk_rate, req_rate); + clkdiv = DIV_ROUND_CLOSEST(clk_rate, pclk_rate); /* * Emit a warning if the real clock rate resulting from the @@ -238,7 +238,7 @@ static void tilcdc_crtc_set_clk(struct drm_crtc *crtc) * 5% is an arbitrary value - LCDs are usually quite tolerant * about pixel clock rates. */ - real_rate = clkdiv * req_rate; + real_rate = clkdiv * pclk_rate; if (tilcdc_pclk_diff(clk_rate, real_rate) > 5) { dev_warn(dev->dev, -- 2.17.1