From patchwork Wed Mar 23 19:01:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Srivatsa, Anusha" X-Patchwork-Id: 12790061 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5E427C433EF for ; Wed, 23 Mar 2022 19:04:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B887C10E06F; Wed, 23 Mar 2022 19:04:30 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9704310E066 for ; Wed, 23 Mar 2022 19:04:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648062269; x=1679598269; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=hkVv3Af7wYVSTLPDi6khXckVbbERjjkQ2DdIwzLy4fo=; b=cjc6V07RjDplqFKzr1xPWjxSmNxxx9SNeplfC2JNEcL54xKWX9S/ovPM v+bUcwFMCc6VOPtObey8UV9ZWvVpDsSGPD526wOIG3Ub+KlAQHfvoSpdj 97fOgD04fC64/gTu3IoDkYvcWRbkg2WVqTdLZNFO5uomMNivT2tUhLUpc VRxQHredlQ8UwrdFqjNTuP2BQSbaKsjjG2XNdm1Q5b+kptGZn6cY8mike DMbX9dj75CDsbtaszfkL/A4nKLuFvMoVIwLPUjWAjiYnn1KoOwVT4S20A JCEQ5gIIDiQvNiDXcHupVgu12h2hhLgXAO0EqFiCGUU/2XW1a1FudJCJX A==; X-IronPort-AV: E=McAfee;i="6200,9189,10295"; a="245678449" X-IronPort-AV: E=Sophos;i="5.90,204,1643702400"; d="scan'208";a="245678449" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2022 12:04:29 -0700 X-IronPort-AV: E=Sophos;i="5.90,204,1643702400"; d="scan'208";a="647596561" Received: from anushasr-mobl6.jf.intel.com ([10.165.21.155]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2022 12:04:28 -0700 From: Anusha Srivatsa To: intel-gfx@lists.freedesktop.org Date: Wed, 23 Mar 2022 12:01:23 -0700 Message-Id: <20220323190124.2343794-1-anusha.srivatsa@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/2] drm/i915/dg2: 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Add Support to load dmc v2.06 Cc: Madhumitha Tolakanahalli Pradeep Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/i915/display/intel_dmc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c index a719c0f379ba..462111a15304 100644 --- a/drivers/gpu/drm/i915/display/intel_dmc.c +++ b/drivers/gpu/drm/i915/display/intel_dmc.c @@ -47,6 +47,10 @@ #define DISPLAY_VER12_DMC_MAX_FW_SIZE ICL_DMC_MAX_FW_SIZE +#define DG2_DMC_PATH DMC_PATH(dg1, 2, 06) +#define DG2_DMC_VERSION_REQUIRED DMC_VERSION(2, 6) +MODULE_FIRMWARE(DG2_DMC_PATH); + #define ADLP_DMC_PATH DMC_PATH(adlp, 2, 16) #define ADLP_DMC_VERSION_REQUIRED DMC_VERSION(2, 16) MODULE_FIRMWARE(ADLP_DMC_PATH); @@ -681,7 +685,11 @@ void intel_dmc_ucode_init(struct drm_i915_private *dev_priv) */ intel_dmc_runtime_pm_get(dev_priv); - if (IS_ALDERLAKE_P(dev_priv)) { + if (IS_DG2(dev_priv)) { + dmc->fw_path = DG2_DMC_PATH; + dmc->required_version = DG2_DMC_VERSION_REQUIRED; + dmc->max_fw_size = DISPLAY_VER13_DMC_MAX_FW_SIZE; + } else if (IS_ALDERLAKE_P(dev_priv)) { dmc->fw_path = ADLP_DMC_PATH; dmc->required_version = ADLP_DMC_VERSION_REQUIRED; dmc->max_fw_size = DISPLAY_VER13_DMC_MAX_FW_SIZE;