From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jyoti Yadav <jyoti.r.yadav@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] [intel-gfx] drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL.
Date: Tue, 28 Aug 2018 13:30:16 -0700 [thread overview]
Message-ID: <20180828203016.GI28554@intel.com> (raw)
In-Reply-To: <1535475253-4225-1-git-send-email-jyoti.r.yadav@intel.com>
On Tue, Aug 28, 2018 at 12:54:13PM -0400, Jyoti Yadav wrote:
> From: Jyoti <jyoti.r.yadav@intel.com>
>
> This patch resolves the DMC FW loading issue.
> Earlier DMC FW package have only one DMC FW for one stepping. But as such
> there is no such restriction from Package side.
> For ICL icl_dmc_ver1_07.bin binary package has DMC FW for 2 steppings.
> So while reading the dmc_offset from package header, for 1st stepping offset
> used to come 0x0 and was working fine till now.
> But for second stepping and other steppings, offset is non zero numaber and is
s/numaber/number
> in dwords. So we need to convert into bytes to fetch correct DMC FW from
> correct place.
>
> v2 : Added check for DMC FW max size for various gen. (Imre Deak)
>
> Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
> ---
> drivers/gpu/drm/i915/intel_csr.c | 24 ++++++++++++++++++++----
> 1 file changed, 20 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
> index 1ec4f09..3f78a3e 100644
> --- a/drivers/gpu/drm/i915/intel_csr.c
> +++ b/drivers/gpu/drm/i915/intel_csr.c
> @@ -55,7 +55,9 @@
> #define BXT_CSR_VERSION_REQUIRED CSR_VERSION(1, 7)
>
>
> -#define CSR_MAX_FW_SIZE 0x2FFF
> +#define BXT_CSR_MAX_FW_SIZE 0x2FFF
> +#define GLK_CNL_CSR_MAX_FW_SIZE 0x3FFF
> +#define ICL_CSR_MAX_FW_SIZE 0x5FFF
> #define CSR_DEFAULT_FW_OFFSET 0xFFFFFFFF
>
> struct intel_css_header {
> @@ -359,6 +361,8 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv,
> si->stepping);
> return NULL;
> }
> + /* Convert dmc_offset into number of bytes. By default it is in dwords*/
> + dmc_offset *= 4;
I'm kind of confused here. Is it true for all platforms and all steppings?
> readcount += dmc_offset;
>
> /* Extract dmc_header information. */
> @@ -391,9 +395,21 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv,
>
> /* fw_size is in dwords, so multiplied by 4 to convert into bytes. */
> nbytes = dmc_header->fw_size * 4;
> - if (nbytes > CSR_MAX_FW_SIZE) {
> - DRM_ERROR("DMC firmware too big (%u bytes)\n", nbytes);
> - return NULL;
> + if (IS_BROXTON(dev_priv)) {
> + if (nbytes > BXT_CSR_MAX_FW_SIZE) {
> + DRM_ERROR("DMC FW too big (%u bytes)\n", nbytes);
> + return NULL;
> + }
> + } else if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) {
> + if (nbytes > GLK_CNL_CSR_MAX_FW_SIZE) {
> + DRM_ERROR("DMC FW too big (%u bytes)\n", nbytes);
> + return NULL;
> + }
> + } else {
> + if (nbytes > ICL_CSR_MAX_FW_SIZE) {
> + DRM_ERROR("DMC FW too big (%u bytes)\n", nbytes);
> + return NULL;
> + }
> }
> csr->dmc_fw_size = dmc_header->fw_size;
>
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-08-28 20:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-28 16:54 [PATCH] [intel-gfx] drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL Jyoti Yadav
2018-08-28 17:15 ` Imre Deak
2018-08-28 17:21 ` Srivatsa, Anusha
2018-08-28 17:29 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL. (rev2) Patchwork
2018-08-28 17:48 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-28 20:30 ` Rodrigo Vivi [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-08-31 6:00 [PATCH] [intel-gfx] drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL Jyoti Yadav
2018-08-31 4:58 Jyoti Yadav
2018-08-28 19:24 Jyoti Yadav
2018-08-29 9:21 ` Imre Deak
2018-08-29 10:18 ` Yadav, Jyoti R
2018-08-28 18:11 Jyoti Yadav
2018-08-29 15:46 ` kbuild test robot
2018-08-29 18:13 ` kbuild test robot
2018-08-28 14:44 Jyoti Yadav
2018-08-28 15:26 ` Imre Deak
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=20180828203016.GI28554@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jyoti.r.yadav@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.