From patchwork Thu Feb 4 20:04:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Clint Taylor X-Patchwork-Id: 12068581 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7A71C433E0 for ; Thu, 4 Feb 2021 20:05:10 +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 65C4F64DD6 for ; Thu, 4 Feb 2021 20:05:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 65C4F64DD6 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 E6AF16EE64; Thu, 4 Feb 2021 20:05:09 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id A38916EE64 for ; Thu, 4 Feb 2021 20:05:08 +0000 (UTC) IronPort-SDR: KhwlaCtNoIzZfpRA9D8qs78mc670VrVJrp2tpCSyvUVKcVlC4YtPbnkeYfPKrQbIsus0GKz5oQ z6/BAv/hhseQ== X-IronPort-AV: E=McAfee;i="6000,8403,9885"; a="181387642" X-IronPort-AV: E=Sophos;i="5.81,153,1610438400"; d="scan'208";a="181387642" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 12:05:07 -0800 IronPort-SDR: 0ELuXBnoKozkBNphQMIvD2Frm1xVfmcSqjY0nkP0lGQINBC1UYKVrKICxbyOKh5N3uGFph4NjH BkzElqzy0r4Q== X-IronPort-AV: E=Sophos;i="5.81,153,1610438400"; d="scan'208";a="415301797" Received: from lndersh-mobl2.amr.corp.intel.com (HELO cataylo2-MOBL1.lan) ([10.212.10.154]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 12:05:06 -0800 From: clinton.a.taylor@intel.com To: Intel-gfx@lists.freedesktop.org Date: Thu, 4 Feb 2021 12:04:58 -0800 Message-Id: <20210204200458.21875-1-clinton.a.taylor@intel.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915/display: support ddr5 mem types X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 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" From: Clint Taylor Add DDR5 and LPDDR5 return values from punit fw. BSPEC: 54023 Cc: Matt Roper Cc: José Roberto de Souza Signed-off-by: Clint Taylor Reviewed-by: José Roberto de Souza --- drivers/gpu/drm/i915/display/intel_bw.c | 12 +++++++++++- drivers/gpu/drm/i915/i915_drv.h | 4 +++- drivers/gpu/drm/i915/intel_dram.c | 6 ++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c index ba9e713585e7..d122b9965532 100644 --- a/drivers/gpu/drm/i915/display/intel_bw.c +++ b/drivers/gpu/drm/i915/display/intel_bw.c @@ -78,7 +78,17 @@ static int icl_get_qgv_points(struct drm_i915_private *dev_priv, qi->num_points = dram_info->num_qgv_points; if (IS_GEN(dev_priv, 12)) - qi->t_bl = dev_priv->dram_info.type == INTEL_DRAM_DDR4 ? 4 : 16; + switch (dram_info->type) { + case INTEL_DRAM_DDR4: + qi->t_bl = 4; + break; + case INTEL_DRAM_DDR5: + qi->t_bl = 8; + break; + default: + qi->t_bl = 16; + break; + } else if (IS_GEN(dev_priv, 11)) qi->t_bl = dev_priv->dram_info.type == INTEL_DRAM_DDR4 ? 4 : 8; diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index a2fd7e5039b3..8083a50908bf 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1136,7 +1136,9 @@ struct drm_i915_private { INTEL_DRAM_DDR3, INTEL_DRAM_DDR4, INTEL_DRAM_LPDDR3, - INTEL_DRAM_LPDDR4 + INTEL_DRAM_LPDDR4, + INTEL_DRAM_DDR5, + INTEL_DRAM_LPDDR5, } type; u8 num_qgv_points; } dram_info; diff --git a/drivers/gpu/drm/i915/intel_dram.c b/drivers/gpu/drm/i915/intel_dram.c index 73d256fc6830..1e53c017c30d 100644 --- a/drivers/gpu/drm/i915/intel_dram.c +++ b/drivers/gpu/drm/i915/intel_dram.c @@ -427,6 +427,12 @@ static int icl_pcode_read_mem_global_info(struct drm_i915_private *dev_priv) case 0: dram_info->type = INTEL_DRAM_DDR4; break; + case 1: + dram_info->type = INTEL_DRAM_DDR5; + break; + case 2: + dram_info->type = INTEL_DRAM_LPDDR5; + break; case 3: dram_info->type = INTEL_DRAM_LPDDR4; break;