From patchwork Fri Feb 24 19:05:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michel Thierry X-Patchwork-Id: 9591029 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 8E9E1601AE for ; Fri, 24 Feb 2017 19:05:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A3A52892E for ; Fri, 24 Feb 2017 19:05:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F5A028930; Fri, 24 Feb 2017 19:05:36 +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 2F9D32892E for ; Fri, 24 Feb 2017 19:05:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 518046E1AC; Fri, 24 Feb 2017 19:05:33 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6C1736E1AC for ; Fri, 24 Feb 2017 19:05:31 +0000 (UTC) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Feb 2017 11:05:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,201,1484035200"; d="scan'208";a="69272888" Received: from relo-linux-11.sc.intel.com ([10.3.160.214]) by fmsmga005.fm.intel.com with ESMTP; 24 Feb 2017 11:05:30 -0800 From: Michel Thierry To: intel-gfx@lists.freedesktop.org Date: Fri, 24 Feb 2017 11:05:30 -0800 Message-Id: <20170224190530.31482-3-michel.thierry@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170224190530.31482-1-michel.thierry@intel.com> References: <20170224190530.31482-1-michel.thierry@intel.com> Subject: [Intel-gfx] [PATCH 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. Suggested-by: Michal Wajdeczko Signed-off-by: Michel Thierry Reviewed-by: Chris Wilson Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gpu_error.c | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index a331c00523bc..1f949cc4a072 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -958,6 +958,8 @@ struct i915_gpu_state { u32 dmc_version; u32 guc_loaded; u32 guc_version; + u32 huc_loaded; + 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 63f1b9606b57..d4a78b8317d6 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_loaded)); + 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); @@ -1602,12 +1606,19 @@ 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_loaded = (guc->fw.load_status == INTEL_UC_FIRMWARE_SUCCESS); error->guc_version = (guc->fw.major_ver_found << 16 | guc->fw.minor_ver_found); + + error->huc_loaded = + (huc->fw.load_status == INTEL_UC_FIRMWARE_SUCCESS); + error->huc_version = + (huc->fw.major_ver_found << 16 | + huc->fw.minor_ver_found); } }