From patchwork Fri Feb 24 20:01:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michel Thierry X-Patchwork-Id: 9591121 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 870C66042B for ; Fri, 24 Feb 2017 20:01:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A35328949 for ; Fri, 24 Feb 2017 20:01:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DE872894C; Fri, 24 Feb 2017 20:01:27 +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 62C7228949 for ; Fri, 24 Feb 2017 20:01:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E2FE16ED0A; Fri, 24 Feb 2017 20:01:24 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 919D96ED10 for ; Fri, 24 Feb 2017 20:01:23 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Feb 2017 12:01:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.35,201,1484035200"; d="scan'208"; a="1134547402" Received: from relo-linux-11.sc.intel.com ([10.3.160.214]) by fmsmga002.fm.intel.com with ESMTP; 24 Feb 2017 12:01:22 -0800 From: Michel Thierry To: intel-gfx@lists.freedesktop.org Date: Fri, 24 Feb 2017 12:01:22 -0800 Message-Id: <20170224200122.2571-3-michel.thierry@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170224200122.2571-1-michel.thierry@intel.com> References: <20170224200122.2571-1-michel.thierry@intel.com> Subject: [Intel-gfx] [PATCH v2 3/3] drm/i915: Include HuC fw version in error state 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 HuC depends on GuC, so be it. v2: if version is 0, the fw was not loaded. Suggested-by: Michal Wajdeczko Reviewed-by: Michal Wajdeczko Reviewed-by: Chris Wilson Signed-off-by: Michel Thierry --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 37cda64f07ad..98b78c7a012f 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -956,6 +956,7 @@ struct i915_gpu_state { /* Firmware load state */ u32 dmc_version; u32 guc_version; + u32 huc_version; u32 nfence; u64 fence[I915_MAX_NUM_FENCES]; diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index bb1b9e916638..32639b1fc668 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -634,6 +634,10 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m, err_printf(m, "GuC fw version: %d.%d\n", error->guc_version >> 16, error->guc_version & 0xffff); + err_printf(m, "HuC loaded: %s\n", yesno(error->huc_version)); + err_printf(m, "HuC fw version: %d.%d\n", + error->huc_version >> 16, + error->huc_version & 0xffff); } err_printf(m, "EIR: 0x%08x\n", error->eir); @@ -1601,10 +1605,15 @@ static void i915_capture_fw_state(struct drm_i915_private *dev_priv, if (HAS_GUC(dev_priv)) { struct intel_guc *guc = &dev_priv->guc; + struct intel_huc *huc = &dev_priv->huc; error->guc_version = (guc->fw.major_ver_found << 16 | guc->fw.minor_ver_found); + + error->huc_version = + (huc->fw.major_ver_found << 16 | + huc->fw.minor_ver_found); } }