drm/i915: Add dmc firmware load state and version to error state
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Thu, 29 Oct 2015 13:21:19 +0000 (15:21 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 9 Nov 2015 17:16:34 +0000 (19:16 +0200)
We have had one case where buggy csr/dmc firmware version influenced
gt side and caused a hang. Add dmc firmware loading state and
version to error state.

v2: - Rebased on top of Damien's patches
    - included fw load state
v3: include dmc info only if platform supports it (Chris)
v4: move *csr to branch scope (Chris)
v5: remove dependency to csr_state

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v4)
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1446124879-22240-1-git-send-email-mika.kuoppala@intel.com
Tested-by: Daniel Stone <daniels@collabora.com> # SKL
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
drivers/gpu/drm/i915/i915_gpu_error.c

index 793f2de2f910723d859aef11e922486c68600613..27b6ac96b0aefc4f9d9d5abe94d424df0271842f 100644 (file)
@@ -366,6 +366,17 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
        err_printf(m, "Suspend count: %u\n", error->suspend_count);
        err_printf(m, "PCI ID: 0x%04x\n", dev->pdev->device);
        err_printf(m, "IOMMU enabled?: %d\n", error->iommu);
+
+       if (HAS_CSR(dev)) {
+               struct intel_csr *csr = &dev_priv->csr;
+
+               err_printf(m, "DMC loaded: %s\n",
+                          yesno(csr->dmc_payload != NULL));
+               err_printf(m, "DMC fw version: %d.%d\n",
+                          CSR_VERSION_MAJOR(csr->version),
+                          CSR_VERSION_MINOR(csr->version));
+       }
+
        err_printf(m, "EIR: 0x%08x\n", error->eir);
        err_printf(m, "IER: 0x%08x\n", error->ier);
        if (INTEL_INFO(dev)->gen >= 8) {