public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] [intel-gfx] drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL.
@ 2018-08-31  6:00 Jyoti Yadav
  2018-08-31  6:27 ` ✓ Fi.CI.BAT: success for drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL. (rev6) Patchwork
  2018-08-31  8:00 ` ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Jyoti Yadav @ 2018-08-31  6:00 UTC (permalink / raw)
  To: intel-gfx

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 number
and is 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)
v3 : Corrected naming convention for various gen. (Imre Deak)
v4 : Initialized max_fw_size to 0
v5 : Corrected DMC FW MAX_SIZE for various gen. (Imre Deak)
v6 : Fixed the typo issues.

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
---
 drivers/gpu/drm/i915/intel_csr.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
index 1ec4f09..14cf4c3 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		0x3000
+#define GLK_CSR_MAX_FW_SIZE		0x4000
+#define ICL_CSR_MAX_FW_SIZE		0x6000
 #define CSR_DEFAULT_FW_OFFSET		0xFFFFFFFF
 
 struct intel_css_header {
@@ -279,6 +281,7 @@ static uint32_t *parse_csr_fw(struct drm_i915_private *dev_priv,
 	struct intel_csr *csr = &dev_priv->csr;
 	const struct stepping_info *si = intel_get_stepping_info(dev_priv);
 	uint32_t dmc_offset = CSR_DEFAULT_FW_OFFSET, readcount = 0, nbytes;
+	uint32_t max_fw_size = 0;
 	uint32_t i;
 	uint32_t *dmc_payload;
 	uint32_t required_version;
@@ -359,6 +362,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;
 	readcount += dmc_offset;
 
 	/* Extract dmc_header information. */
@@ -391,8 +396,16 @@ 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);
+	if (INTEL_GEN(dev_priv) >= 11)
+		max_fw_size = ICL_CSR_MAX_FW_SIZE;
+	else if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
+		max_fw_size = GLK_CSR_MAX_FW_SIZE;
+	else if (IS_GEN9(dev_priv))
+		max_fw_size = BXT_CSR_MAX_FW_SIZE;
+	else
+		MISSING_CASE(INTEL_REVID(dev_priv));
+	if (nbytes > 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL. (rev6)
  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  6:27 ` Patchwork
  2018-08-31  8:00 ` ✓ Fi.CI.IGT: " Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-08-31  6:27 UTC (permalink / raw)
  To: Jyoti Yadav; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL. (rev6)
URL   : https://patchwork.freedesktop.org/series/48803/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4745 -> Patchwork_10057 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/48803/revisions/6/mbox/

== Known issues ==

  Here are the changes found in Patchwork_10057 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       PASS -> DMESG-WARN (fdo#102614)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-cnl-psr:         PASS -> DMESG-WARN (fdo#104951)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         PASS -> INCOMPLETE (fdo#103927)

    
    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      {fi-byt-clapper}:   FAIL (fdo#107362, fdo#103191) -> PASS +1

    {igt@pm_rpm@module-reload}:
      fi-cnl-psr:         WARN (fdo#107708, fdo#107602) -> PASS

    
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107602 https://bugs.freedesktop.org/show_bug.cgi?id=107602
  fdo#107708 https://bugs.freedesktop.org/show_bug.cgi?id=107708


== Participating hosts (54 -> 47) ==

  Missing    (7): fi-hsw-4770r fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-glk-j4005 


== Build changes ==

    * Linux: CI_DRM_4745 -> Patchwork_10057

  CI_DRM_4745: 4ddf5e7833fae7268e674ddea403a24b36c8337d @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4612: e39e09910fc8e369e24f6a0cabaeb9356dbfae08 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10057: 225ce5d7d0c64e3c963e105a4e8d05d4533539fe @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

225ce5d7d0c6 drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10057/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* ✓ Fi.CI.IGT: success for drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL. (rev6)
  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  6:27 ` ✓ Fi.CI.BAT: success for drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL. (rev6) Patchwork
@ 2018-08-31  8:00 ` Patchwork
  2018-08-31 13:58   ` Imre Deak
  1 sibling, 1 reply; 4+ messages in thread
From: Patchwork @ 2018-08-31  8:00 UTC (permalink / raw)
  To: Jyoti Yadav; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL. (rev6)
URL   : https://patchwork.freedesktop.org/series/48803/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4745_full -> Patchwork_10057_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_10057_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10057_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10057_full:

  === IGT changes ===

    ==== Warnings ====

    igt@kms_concurrent@pipe-b:
      shard-snb:          SKIP -> PASS +1

    igt@kms_draw_crc@draw-method-xrgb2101010-pwrite-xtiled:
      shard-snb:          PASS -> SKIP +1

    
== Known issues ==

  Here are the changes found in Patchwork_10057_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
      shard-hsw:          PASS -> FAIL (fdo#105767)

    igt@kms_cursor_legacy@cursor-vs-flip-toggle:
      shard-hsw:          PASS -> FAIL (fdo#103355)

    
    ==== Possible fixes ====

    igt@drv_suspend@shrink:
      shard-hsw:          INCOMPLETE (fdo#106886, fdo#103540) -> PASS
      shard-apl:          INCOMPLETE (fdo#106886, fdo#103927) -> PASS
      shard-glk:          FAIL (fdo#106886) -> PASS

    igt@gem_ppgtt@blt-vs-render-ctxn:
      shard-kbl:          INCOMPLETE (fdo#103665, fdo#106023) -> PASS

    igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
      shard-glk:          FAIL (fdo#105363) -> PASS +1

    
  fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
  fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
  fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
  fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * Linux: CI_DRM_4745 -> Patchwork_10057

  CI_DRM_4745: 4ddf5e7833fae7268e674ddea403a24b36c8337d @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4612: e39e09910fc8e369e24f6a0cabaeb9356dbfae08 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10057: 225ce5d7d0c64e3c963e105a4e8d05d4533539fe @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10057/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ✓ Fi.CI.IGT: success for drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL. (rev6)
  2018-08-31  8:00 ` ✓ Fi.CI.IGT: " Patchwork
@ 2018-08-31 13:58   ` Imre Deak
  0 siblings, 0 replies; 4+ messages in thread
From: Imre Deak @ 2018-08-31 13:58 UTC (permalink / raw)
  To: intel-gfx, Jyoti Yadav, Anusha Srivatsa

On Fri, Aug 31, 2018 at 08:00:41AM +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL. (rev6)
> URL   : https://patchwork.freedesktop.org/series/48803/
> State : success

Pushed to -dinq thanks for the patch and review. I also added the update
request to BSpec about units for the offset field.

> 
> == Summary ==
> 
> = CI Bug Log - changes from CI_DRM_4745_full -> Patchwork_10057_full =
> 
> == Summary - WARNING ==
> 
>   Minor unknown changes coming with Patchwork_10057_full need to be verified
>   manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_10057_full, please notify your bug team to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   
> 
> == Possible new issues ==
> 
>   Here are the unknown changes that may have been introduced in Patchwork_10057_full:
> 
>   === IGT changes ===
> 
>     ==== Warnings ====
> 
>     igt@kms_concurrent@pipe-b:
>       shard-snb:          SKIP -> PASS +1
> 
>     igt@kms_draw_crc@draw-method-xrgb2101010-pwrite-xtiled:
>       shard-snb:          PASS -> SKIP +1
> 
>     
> == Known issues ==
> 
>   Here are the changes found in Patchwork_10057_full that come from known issues:
> 
>   === IGT changes ===
> 
>     ==== Issues hit ====
> 
>     igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
>       shard-hsw:          PASS -> FAIL (fdo#105767)
> 
>     igt@kms_cursor_legacy@cursor-vs-flip-toggle:
>       shard-hsw:          PASS -> FAIL (fdo#103355)
> 
>     
>     ==== Possible fixes ====
> 
>     igt@drv_suspend@shrink:
>       shard-hsw:          INCOMPLETE (fdo#106886, fdo#103540) -> PASS
>       shard-apl:          INCOMPLETE (fdo#106886, fdo#103927) -> PASS
>       shard-glk:          FAIL (fdo#106886) -> PASS
> 
>     igt@gem_ppgtt@blt-vs-render-ctxn:
>       shard-kbl:          INCOMPLETE (fdo#103665, fdo#106023) -> PASS
> 
>     igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
>       shard-glk:          FAIL (fdo#105363) -> PASS +1
> 
>     
>   fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
>   fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
>   fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
>   fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
>   fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
>   fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
>   fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
>   fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
> 
> 
> == Participating hosts (5 -> 5) ==
> 
>   No changes in participating hosts
> 
> 
> == Build changes ==
> 
>     * Linux: CI_DRM_4745 -> Patchwork_10057
> 
>   CI_DRM_4745: 4ddf5e7833fae7268e674ddea403a24b36c8337d @ git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_4612: e39e09910fc8e369e24f6a0cabaeb9356dbfae08 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
>   Patchwork_10057: 225ce5d7d0c64e3c963e105a4e8d05d4533539fe @ git://anongit.freedesktop.org/gfx-ci/linux
>   piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10057/shards.html
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-31 13:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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  6:27 ` ✓ Fi.CI.BAT: success for drm/i915/intel_csr.c Fix DMC FW Loading issue on ICL. (rev6) Patchwork
2018-08-31  8:00 ` ✓ Fi.CI.IGT: " Patchwork
2018-08-31 13:58   ` Imre Deak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox