From patchwork Thu Sep 5 20:35:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matt Roper X-Patchwork-Id: 11133913 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 2303B924 for ; Thu, 5 Sep 2019 20:35:33 +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 B1A8420828 for ; Thu, 5 Sep 2019 20:35:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1A8420828 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9373189F4A; Thu, 5 Sep 2019 20:35:31 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4150889F4A for ; Thu, 5 Sep 2019 20:35:30 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Sep 2019 13:35:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,471,1559545200"; d="scan'208";a="188094146" Received: from mdroper-desk.fm.intel.com ([10.105.128.12]) by orsmga006.jf.intel.com with ESMTP; 05 Sep 2019 13:35:29 -0700 From: Matt Roper To: intel-gfx@lists.freedesktop.org Date: Thu, 5 Sep 2019 13:35:27 -0700 Message-Id: <20190905203527.25487-1-matthew.d.roper@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915: Set proper voltage level for 324 and 326.4 cdclks X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" These new cdclk values should be accounted for in the voltage level selection (we can use the same voltage level as 307.2 and 312 rather than bumping up up to the next higher level). Bspec: 21809 Cc: José Roberto de Souza Signed-off-by: Matt Roper --- The EHL and TGL parts of the bspec haven't actually updated their voltage requirement tables to mention the new cdclk frequencies at all, so I'm assuming here that those platforms will follow ICL's lead of using the same voltage level as the 307/312 clocks. I've filed a ticket with the hardware team to confirm this; we should hold off on actually merging these changes until we get a response. drivers/gpu/drm/i915/display/intel_cdclk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c index d3e56628af70..1329d3e60e26 100644 --- a/drivers/gpu/drm/i915/display/intel_cdclk.c +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c @@ -1833,7 +1833,7 @@ static int icl_calc_cdclk_pll_vco(struct drm_i915_private *dev_priv, int cdclk) static u8 icl_calc_voltage_level(struct drm_i915_private *dev_priv, int cdclk) { if (IS_ELKHARTLAKE(dev_priv)) { - if (cdclk > 312000) + if (cdclk > 326400) return 2; else if (cdclk > 180000) return 1; @@ -1842,7 +1842,7 @@ static u8 icl_calc_voltage_level(struct drm_i915_private *dev_priv, int cdclk) } else { if (cdclk > 556800) return 2; - else if (cdclk > 312000) + else if (cdclk > 326400) return 1; else return 0;