From patchwork Fri Apr 3 20:40:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 11473535 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EC74B17EA for ; Fri, 3 Apr 2020 20:41:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D516B21655 for ; Fri, 3 Apr 2020 20:41:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D516B21655 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ED02F6EC95; Fri, 3 Apr 2020 20:41:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id DEF3B6EC95; Fri, 3 Apr 2020 20:41:01 +0000 (UTC) IronPort-SDR: JtTt2ukcExa2Obh5BmtXauKHxHS6/9hTSgPhqxNwOhwKHjN9nyOjVmUJoTjYY+SCpaYMTYKro8 Vzpx1Tq4W9Xw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2020 13:41:01 -0700 IronPort-SDR: fUwow7Nz8r5EqIiDZzxxP774hx5wUkKXB3BINAew0YHSfpZVywwV2TAkymY3+qQHUFU3Y945FD 9T3xOi1H9IXQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,341,1580803200"; d="scan'208";a="241217139" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga007.fm.intel.com with SMTP; 03 Apr 2020 13:40:59 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 Apr 2020 23:40:58 +0300 From: Ville Syrjala To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 12/17] drm/mcde: Use mode->clock instead of reverse calculating it from the vrefresh Date: Fri, 3 Apr 2020 23:40:03 +0300 Message-Id: <20200403204008.14864-13-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200403204008.14864-1-ville.syrjala@linux.intel.com> References: <20200403204008.14864-1-ville.syrjala@linux.intel.com> 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: intel-gfx@lists.freedesktop.org, Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Ville Syrjälä htotal*vtotal*vrefresh ~= clock. So just say "clock" when we mean it. Cc: Linus Walleij Cc: Sam Ravnborg Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Linus Walleij --- drivers/gpu/drm/mcde/mcde_dsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c index 52031d826f2c..c07a8e273b6f 100644 --- a/drivers/gpu/drm/mcde/mcde_dsi.c +++ b/drivers/gpu/drm/mcde/mcde_dsi.c @@ -537,8 +537,7 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d, * porches and sync. */ /* (ps/s) / (pixels/s) = ps/pixels */ - pclk = DIV_ROUND_UP_ULL(1000000000000, - (drm_mode_vrefresh(mode) * mode->htotal * mode->vtotal)); + pclk = DIV_ROUND_UP_ULL(1000000000000, mode->clock); dev_dbg(d->dev, "picoseconds between two pixels: %llu\n", pclk);