From patchwork Thu Mar 11 22:36:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Roper X-Patchwork-Id: 12133109 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.8 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 10C49C433E6 for ; Thu, 11 Mar 2021 22:37:27 +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 D251964F26 for ; Thu, 11 Mar 2021 22:37:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D251964F26 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 BE3F86EF3F; Thu, 11 Mar 2021 22:36:58 +0000 (UTC) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 060B86EE9A for ; Thu, 11 Mar 2021 22:36:48 +0000 (UTC) IronPort-SDR: W/afDpsDkP4OPSMUN7pJ7QgIFfQ0Yrfw5oA9PhjsHe3oX9gK6XEa/sYX8Datnyj7cuRC5pmhmx hSL9mofvpOgg== X-IronPort-AV: E=McAfee;i="6000,8403,9920"; a="250116441" X-IronPort-AV: E=Sophos;i="5.81,241,1610438400"; d="scan'208";a="250116441" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2021 14:36:46 -0800 IronPort-SDR: 36FvoT/7LL3GgSouYM72xS3i0rDczggZk7UjY+S+U+uuck5AbMTQxpVqBToINxw2evEoS1yS7d I9NVDQ6e0sAQ== X-IronPort-AV: E=Sophos;i="5.81,241,1610438400"; d="scan'208";a="438852734" Received: from mdroper-desk1.fm.intel.com ([10.1.27.168]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2021 14:36:45 -0800 From: Matt Roper To: intel-gfx@lists.freedesktop.org Date: Thu, 11 Mar 2021 14:36:05 -0800 Message-Id: <20210311223632.3191939-30-matthew.d.roper@intel.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20210311223632.3191939-1-matthew.d.roper@intel.com> References: <20210311223632.3191939-1-matthew.d.roper@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 29/56] drm/i915/adl_p: Load DMC 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: , Cc: Lucas De Marchi Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Anusha Srivatsa Load DMC v2.08 on ADLP. The release notes mention that this version enables few power savings features. Cc: Lucas De Marchi Cc: Clint Taylor Signed-off-by: Anusha Srivatsa Signed-off-by: Clinton Taylor Signed-off-by: Matt Roper --- drivers/gpu/drm/i915/display/intel_csr.c | 10 +++++++++- .../gpu/drm/i915/display/intel_display_power.c | 16 +++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_csr.c b/drivers/gpu/drm/i915/display/intel_csr.c index 82360593b0a6..863e4566e645 100644 --- a/drivers/gpu/drm/i915/display/intel_csr.c +++ b/drivers/gpu/drm/i915/display/intel_csr.c @@ -40,6 +40,10 @@ #define GEN12_CSR_MAX_FW_SIZE ICL_CSR_MAX_FW_SIZE +#define ADLP_CSR_PATH "i915/adlp_dmc_ver2_08.bin" +#define ADLP_CSR_VERSION_REQUIRED CSR_VERSION(2, 8) +MODULE_FIRMWARE(ADLP_CSR_PATH); + #define ADLS_CSR_PATH "i915/adls_dmc_ver2_01.bin" #define ADLS_CSR_VERSION_REQUIRED CSR_VERSION(2, 1) MODULE_FIRMWARE(ADLS_CSR_PATH); @@ -693,7 +697,11 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv) */ intel_csr_runtime_pm_get(dev_priv); - if (IS_ALDERLAKE_S(dev_priv)) { + if (IS_ALDERLAKE_P(dev_priv)) { + csr->fw_path = ADLP_CSR_PATH; + csr->required_version = ADLP_CSR_VERSION_REQUIRED; + csr->max_fw_size = GEN12_CSR_MAX_FW_SIZE; + } else if (IS_ALDERLAKE_S(dev_priv)) { csr->fw_path = ADLS_CSR_PATH; csr->required_version = ADLS_CSR_VERSION_REQUIRED; csr->max_fw_size = GEN12_CSR_MAX_FW_SIZE; diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c index 8bb5203dd2da..3b30604e850a 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power.c +++ b/drivers/gpu/drm/i915/display/intel_display_power.c @@ -4953,7 +4953,21 @@ static u32 get_allowed_dc_mask(const struct drm_i915_private *dev_priv, int requested_dc; int max_dc; - if (IS_DG1(dev_priv)) + if (!HAS_DISPLAY(dev_priv)) + return 0; + + if (DISPLAY_VER(dev_priv) == 13) + /* + * FIXME: We need to disable DC-states for two reasons: + * + * - Although not documented in the bspec, we've been told + * that we need to upload Pipe DMC firmwares in addition + * to the main DMC firmware for DC5 to work properly. + * We need proper bspec documentation before we can handle + * this. + */ + max_dc = 0; + else if (IS_DG1(dev_priv)) max_dc = 3; else if (DISPLAY_VER(dev_priv) >= 12) max_dc = 4;