From: Imre Deak <imre.deak@intel.com>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/7] drm/i915/skl: Refuse to load outdated dmc firmware
Date: Thu, 29 Oct 2015 17:39:12 +0200 [thread overview]
Message-ID: <1446133152.28303.24.camel@intel.com> (raw)
In-Reply-To: <1445950025-5793-2-git-send-email-mika.kuoppala@intel.com>
On ti, 2015-10-27 at 14:47 +0200, Mika Kuoppala wrote:
> There is known issue on GT interrupt delivery with DC6 and
> firmwares <1.21. There is a suspicion that this causes
> spurious gpu hangs on driver init and with some workloads,
> as upgrading the firmware to 1.21 makes these problems
> disappear.
>
> As of now the current version included in distribution
> firmware packages is very like to be 1.19. Play it safe and
> refuse to load a firmware version that may affect gpu
> side stability.
>
> With < 1.23 there is a palette and dmc ram corruption issue
> so blacklist anything below that.
>
> v2: Refuse to load fw instead of notifying the user
> v3: Rebase on header version changes
> v4: Refuse to load anything less than 1.23
> v5: Give enough information for user for finding correct fw (Chris)
> v6: better url and formatting (Chris)
> v7: move error log for each fail path (Mika)
> bail out earlier in load path (Imre)
>
> Cc: Animesh Manna <animesh.manna@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Dave Gordon <david.s.gordon@intel.com>
> Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> References: https://01.org/linuxgraphics/downloads/skldmcver121
> References: https://01.org/linuxgraphics/downloads/skylake-dmc-1.23
> Testcase: igt/gem_exec_nop
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/intel_csr.c | 37 +++++++++++++++++++++++++++----------
> 1 file changed, 27 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
> index e620e85..701c685 100644
> --- a/drivers/gpu/drm/i915/intel_csr.c
> +++ b/drivers/gpu/drm/i915/intel_csr.c
> @@ -47,6 +47,9 @@
> MODULE_FIRMWARE(I915_CSR_SKL);
> MODULE_FIRMWARE(I915_CSR_BXT);
>
> +#define SKL_REQUIRED_FW_MAJOR 1
> +#define SKL_REQUIRED_FW_MINOR 23
> +
> /*
> * SKL CSR registers for DC5 and DC6
> */
> @@ -303,10 +306,8 @@ static void finish_csr_load(const struct firmware *fw, void *context)
> uint32_t *dmc_payload;
> bool fw_loaded = false;
>
> - if (!fw) {
> - i915_firmware_load_error_print(csr->fw_path, 0);
> + if (!fw)
> goto out;
> - }
>
> if ((stepping == -ENODATA) || (substepping == -ENODATA)) {
> DRM_ERROR("Unknown stepping info, firmware loading failed\n");
> @@ -324,6 +325,19 @@ static void finish_csr_load(const struct firmware *fw, void *context)
>
> csr->version = css_header->version;
>
> + if (IS_SKYLAKE(dev) &&
> + (CSR_VERSION_MAJOR(csr->version) < SKL_REQUIRED_FW_MAJOR ||
> + CSR_VERSION_MINOR(csr->version) < SKL_REQUIRED_FW_MINOR)) {
This would also reject 2.22 too for example, isn't that a problem?
If so, after fixing that:
Reviewed-by: Imre Deak <imre.deak@intel.com>
> + DRM_INFO("Refusing to load old Skylake DMC firmware v%u.%u,"
> + " please upgrade to v%u.%u or later"
> + " [https://01.org/linuxgraphics/intel-linux-graphics-firmwares].\n",
> + CSR_VERSION_MAJOR(csr->version),
> + CSR_VERSION_MINOR(csr->version),
> + SKL_REQUIRED_FW_MAJOR,
> + SKL_REQUIRED_FW_MINOR);
> + goto out;
> + }
> +
> readcount += sizeof(struct intel_css_header);
>
> /* Extract Package Header information*/
> @@ -405,17 +419,20 @@ static void finish_csr_load(const struct firmware *fw, void *context)
> intel_csr_load_program(dev);
> fw_loaded = true;
>
> - 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)
> + if (fw_loaded) {
> intel_runtime_pm_put(dev_priv);
> - else
> +
> + DRM_INFO("Finished loading %s (v%u.%u)\n",
> + dev_priv->csr.fw_path,
> + CSR_VERSION_MAJOR(csr->version),
> + CSR_VERSION_MINOR(csr->version));
> + } else {
> intel_csr_load_status_set(dev_priv, FW_FAILED);
>
> + i915_firmware_load_error_print(csr->fw_path, 0);
> + }
> +
> release_firmware(fw);
> }
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-10-29 15:39 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 [this message]
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 ` [PATCH 1/7] drm/i915/skl: Store and print the DMC firmware version we load Imre Deak
2015-11-04 17:18 ` 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=1446133152.28303.24.camel@intel.com \
--to=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox