From patchwork Mon Oct 31 22:24:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Srivatsa, Anusha" X-Patchwork-Id: 9406633 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E3FA260234 for ; Mon, 31 Oct 2016 22:25:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC4C228CFA for ; Mon, 31 Oct 2016 22:25:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0E6028D49; Mon, 31 Oct 2016 22:25:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5F70C28CFF for ; Mon, 31 Oct 2016 22:25:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 37D416E39C; Mon, 31 Oct 2016 22:25:16 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4C9B56E391 for ; Mon, 31 Oct 2016 22:25:15 +0000 (UTC) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP; 31 Oct 2016 15:25:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,428,1473145200"; d="scan'208";a="26243895" Received: from anusha.jf.intel.com ([10.7.198.60]) by orsmga004.jf.intel.com with ESMTP; 31 Oct 2016 15:25:14 -0700 From: Anusha Srivatsa To: intel-gfx@lists.freedesktop.org Date: Mon, 31 Oct 2016 15:24:53 -0700 Message-Id: <1477952693-12105-1-git-send-email-anusha.srivatsa@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [Intel-gfx] [PATCH] drm/i915/huc: Update the construction of file path for HuC similar to that of GuC X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Update the file construction and specifying the required version similar to that of GuC.Add an extra field for the build number. Adopted the approach used in https://patchwork.freedesktop.org/patch/104355/ Cc: Jeff Mcgee Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/i915/intel_huc_loader.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_huc_loader.c b/drivers/gpu/drm/i915/intel_huc_loader.c index 2f5d9d9..419caae 100644 --- a/drivers/gpu/drm/i915/intel_huc_loader.c +++ b/drivers/gpu/drm/i915/intel_huc_loader.c @@ -39,11 +39,24 @@ * * Note that HuC firmware loading must be done before GuC loading. */ +#define SKL_FW_MAJOR 01 +#define SKL_FW_MINOR 07 +#define SKL_BLD_NUM 1398 -#define I915_SKL_HUC_UCODE "i915/skl_huc_ver01_07_1398.bin" +#define BXT_FW_MAJOR 01 +#define BXT_FW_MINOR 07 +#define BXT_BLD_NUM 1398 + +#define HUC_FW_PATH(platform, major, minor, bld_num) \ + "i915/" __stringify(platform) "_huc_ver" __stringify(major) "_" \ + __stringify(minor) "_" __stringify(bld_num) ".bin" + +#define I915_SKL_HUC_UCODE HUC_FW_PATH(skl, SKL_FW_MAJOR, \ + SKL_FW_MINOR, SKL_BLD_NUM) MODULE_FIRMWARE(I915_SKL_HUC_UCODE); -#define I915_BXT_HUC_UCODE "i915/bxt_huc_ver01_07_1398.bin" +#define I915_BXT_HUC_UCODE HUC_FW_PATH(bxt, BXT_FW_MAJOR, \ + BXT_FW_MINOR, BXT_BLD_NUM) MODULE_FIRMWARE(I915_BXT_HUC_UCODE); /** @@ -151,12 +164,12 @@ void intel_huc_init(struct drm_device *dev) if (IS_SKYLAKE(dev_priv)) { fw_path = I915_SKL_HUC_UCODE; - huc_fw->major_ver_wanted = 1; - huc_fw->minor_ver_wanted = 7; + huc_fw->major_ver_wanted = SKL_FW_MAJOR; + huc_fw->minor_ver_wanted = SKL_FW_MINOR; } else if (IS_BROXTON(dev_priv)) { fw_path = I915_BXT_HUC_UCODE; - huc_fw->major_ver_wanted = 1; - huc_fw->minor_ver_wanted = 7; + huc_fw->major_ver_wanted = BXT_FW_MAJOR; + huc_fw->minor_ver_wanted = BXT_FW_MINOR; } if (fw_path == NULL)