All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, Marc Herbert <marc.herbert@intel.com>
Subject: Re: [PATCH 1/7] drm/i915/skl: Store and print the DMC firmware version we load
Date: Thu, 29 Oct 2015 17:21:48 +0200	[thread overview]
Message-ID: <1446132108.28303.19.camel@intel.com> (raw)
In-Reply-To: <1445950025-5793-1-git-send-email-mika.kuoppala@intel.com>

On ti, 2015-10-27 at 14:46 +0200, Mika Kuoppala wrote:
> From: Damien Lespiau <damien.lespiau@intel.com>
> 
> That can be handy later on to tell which DMC firmware version the user
> has, by just looking at the dmesg.
> 
> v2: use DRM_DEBUG_DRIVER (Chris)
> v3: use DRM_INFO (Marc Herbert)
> 
> Cc: Marc Herbert <marc.herbert@intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> (v1)
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>

Reviewed-by: Imre Deak <imre.deak@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_drv.h  | 5 +++++
>  drivers/gpu/drm/i915/intel_csr.c | 9 ++++++++-
>  2 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index b408ebf..0bee438 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -734,6 +734,10 @@ struct intel_uncore {
>  #define for_each_fw_domain(domain__, dev_priv__, i__) \
>  	for_each_fw_domain_mask(domain__, FORCEWAKE_ALL, dev_priv__, i__)
>  
> +#define CSR_VERSION(major, minor)	((major) << 16 | (minor))
> +#define CSR_VERSION_MAJOR(version)	((version) >> 16)
> +#define CSR_VERSION_MINOR(version)	((version) & 0xffff)
> +
>  enum csr_state {
>  	FW_UNINITIALIZED = 0,
>  	FW_LOADED,
> @@ -744,6 +748,7 @@ struct intel_csr {
>  	const char *fw_path;
>  	uint32_t *dmc_payload;
>  	uint32_t dmc_fw_size;
> +	uint32_t version;
>  	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 9e530a7..e620e85 100644
> --- a/drivers/gpu/drm/i915/intel_csr.c
> +++ b/drivers/gpu/drm/i915/intel_csr.c
> @@ -321,6 +321,9 @@ static void finish_csr_load(const struct firmware *fw, void *context)
>  			(css_header->header_len * 4));
>  		goto out;
>  	}
> +
> +	csr->version = css_header->version;
> +
>  	readcount += sizeof(struct intel_css_header);
>  
>  	/* Extract Package Header information*/
> @@ -402,7 +405,11 @@ static void finish_csr_load(const struct firmware *fw, void *context)
>  	intel_csr_load_program(dev);
>  	fw_loaded = true;
>  
> -	DRM_DEBUG_KMS("Finished loading %s\n", dev_priv->csr.fw_path);
> +	DRM_INFO("Finished loading %s (v%u.%u)\n",
> +		 dev_priv->csr.fw_path,
> +		 CSR_VERSION_MAJOR(csr->version),
> +		 CSR_VERSION_MINOR(csr->version));
> +
>  out:
>  	if (fw_loaded)
>  		intel_runtime_pm_put(dev_priv);


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-10-29 15:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27 12:46 [PATCH 1/7] drm/i915/skl: Store and print the DMC firmware version we load Mika Kuoppala
2015-10-27 12:47 ` [PATCH 2/7] drm/i915/skl: Refuse to load outdated dmc firmware Mika Kuoppala
2015-10-29 15:39   ` Imre Deak
2015-10-30 15:52     ` Mika Kuoppala
2015-11-03 21:49       ` Daniel Stone
2015-11-03 23:23         ` Vivi, Rodrigo
2015-11-04  9:51           ` Daniel Stone
2015-10-27 12:47 ` [PATCH 3/7] drm/i915/skl: Print the DMC firmware status in debugfs Mika Kuoppala
2015-10-29 15:50   ` Imre Deak
2015-10-27 12:47 ` [PATCH 4/7] drm/i915/skl: Expose DC5/DC6 entry counts Mika Kuoppala
2015-10-29 16:20   ` Imre Deak
2015-10-30 15:53     ` Mika Kuoppala
2015-10-27 12:47 ` [PATCH 5/7] drm/i915/bxt: Expose DC5 entry count Mika Kuoppala
2015-10-29 16:25   ` Imre Deak
2015-10-27 12:47 ` [PATCH 6/7] drm/i915: Add csr programming registers to dmc debugfs entry Mika Kuoppala
2015-10-29 16:28   ` Imre Deak
2015-10-30 15:54     ` Mika Kuoppala
2015-10-27 12:47 ` [PATCH 7/7] drm/i915: Add dmc firmware load state and version to error state Mika Kuoppala
2015-10-29 13:21   ` Mika Kuoppala
2015-10-29 15:21 ` Imre Deak [this message]
2015-11-04 17:18 ` [PATCH 1/7] drm/i915/skl: Store and print the DMC firmware version we load Daniel Stone
2015-11-09 17:29   ` Ville Syrjälä

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1446132108.28303.19.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=marc.herbert@intel.com \
    --cc=mika.kuoppala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.