On 9/18/2015 8:47 PM, Mika Kuoppala wrote:
Parse csr/dmc firmware version and augment debug message
by printing it.
Cc: Animesh Manna <animesh.manna@xxxxxxxxx>
Signed-off-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
---
drivers/gpu/drm/i915/i915_drv.h | 2 ++
drivers/gpu/drm/i915/intel_csr.c | 7 ++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 3bf8a9b..17e8b25 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -755,6 +755,8 @@ struct intel_csr {
const char *fw_path;
uint32_t *dmc_payload;
uint32_t dmc_fw_size;
+ uint16_t dmc_ver_major;
+ uint16_t dmc_ver_minor;
uint32_t mmio_count;
uint32_t mmioaddr[8];
uint32_t mmiodata[8];
diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
index b69264d..58edc3f 100644
--- a/drivers/gpu/drm/i915/intel_csr.c
+++ b/drivers/gpu/drm/i915/intel_csr.c
@@ -377,11 +377,16 @@ static void finish_csr_load(const struct firmware *fw, void *context)
dmc_payload = csr->dmc_payload;
memcpy(dmc_payload, &fw->data[readcount], nbytes);
+ csr->dmc_ver_major = dmc_header->header_ver;
+ csr->dmc_ver_minor = ((dmc_header->fw_version & 0xffff0000) >> 16) * 10
+ + (dmc_header->fw_version & 0x0000ffff);
+
I am not able to locate the the way major and minor version is derived, is it present in bspec?
-Animesh
/* load csr program during system boot, as needed for DC states */
intel_csr_load_program(dev);
fw_loaded = true;
- DRM_DEBUG_KMS("Finished loading %s\n", dev_priv->csr.fw_path);
+ DRM_DEBUG_KMS("Finished loading %s v%u.%u\n", dev_priv->csr.fw_path,
+ csr->dmc_ver_major, csr->dmc_ver_minor);
out:
if (fw_loaded)
intel_runtime_pm_put(dev_priv);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx