drm/i915: resize the GuC WOPCM for rc6
Subsystems (2)
PATCH v3 1/1 drm/i915: resize the GuC WOPCM for rc6
This patch resizes the GuC WOPCM to so that the GuC and the RC6 memory spaces do not overlap.
Issue: https://jira01.devtools.intel.com/browse/VIZ-6638
--- drivers/gpu/drm/i915/i915_guc_reg.h | 5 +++-- drivers/gpu/drm/i915/intel_guc_loader.c | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_guc_reg.h +3 -2
@@ -68,10 +68,11 @@#define GUC_MAX_IDLE_COUNT _MMIO(0xC3E4)#define GUC_WOPCM_SIZE _MMIO(0xc050) -#define GUC_WOPCM_SIZE_VALUE (0x80 << 12)/* 512KB */ +#define GUC_WOPCM_SIZE_VALUE (0x80 << 12)/* 512KB */ +#define BXT_GUC_WOPCM_SIZE_VALUE (0x70 << 12)/* 448KB */ /* GuC addresses below GUC_WOPCM_TOP don't map through the GTT */ -#define GUC_WOPCM_TOP (GUC_WOPCM_SIZE_VALUE) +#define GUC_WOPCM_TOP (0x80 << 12)/* 512KB */ #define GEN8_GT_PM_CONFIG _MMIO(0x138140)#define GEN9LP_GT_PM_CONFIG _MMIO(0x138140)
drivers/gpu/drm/i915/intel_guc_loader.c +5 -1
@@ -312,7 +312,11 @@ static int guc_ucode_xfer(struct drm_i915_private *dev_priv)intel_uncore_forcewake_get (dev_priv,FORCEWAKE_ALL );/* init WOPCM */ -I915_WRITE (GUC_WOPCM_SIZE ,GUC_WOPCM_SIZE_VALUE ); +if (IS_BROXTON (dev)) +I915_WRITE (GUC_WOPCM_SIZE ,BXT_GUC_WOPCM_SIZE_VALUE ); +else +I915_WRITE (GUC_WOPCM_SIZE ,GUC_WOPCM_SIZE_VALUE ); +I915_WRITE (DMA_GUC_WOPCM_OFFSET ,GUC_WOPCM_OFFSET_VALUE );/* Enable MIA caching. GuC clock gating is disabled. */
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: resize the GuC WOPCM for rc6
== Series Details ==
== Series Details ==
Series: drm/i915: resize the GuC WOPCM for rc6
URL : https://patchwork.freedesktop.org/series/6313/
State : failure
== Summary ==
Series 6313v1 drm/i915: resize the GuC WOPCM for rc6
http://patchwork.freedesktop.org/api/1.0/series/6313/revisions/1/mbox/
Test kms_flip:
Subgroup basic-flip-vs-wf_vblank:
pass -> FAIL (hsw-gt2)
Test kms_force_connector_basic:
Subgroup force-edid:
pass -> SKIP (ivb-t430s)
Test kms_pipe_crc_basic:
Subgroup read-crc-pipe-b-frame-sequence:
skip -> PASS (bdw-nuci7)bdw-nuci7 total:200 pass:188 dwarn:0 dfail:0 fail:0 skip:12 bdw-ultra total:200 pass:175 dwarn:0 dfail:0 fail:0 skip:25 bsw-nuc-2 total:199 pass:158 dwarn:0 dfail:0 fail:0 skip:41 byt-nuc total:199 pass:158 dwarn:0 dfail:0 fail:0 skip:41 hsw-brixbox total:200 pass:174 dwarn:0 dfail:0 fail:0 skip:26 hsw-gt2 total:200 pass:178 dwarn:0 dfail:0 fail:1 skip:21 ilk-hp8440p total:200 pass:139 dwarn:0 dfail:0 fail:0 skip:61 ivb-t430s total:200 pass:168 dwarn:0 dfail:0 fail:0 skip:32 skl-i7k-2 total:200 pass:173 dwarn:0 dfail:0 fail:0 skip:27 skl-nuci5 total:200 pass:189 dwarn:0 dfail:0 fail:0 skip:11 snb-dellxps total:200 pass:158 dwarn:0 dfail:0 fail:0 skip:42 snb-x220t total:200 pass:158 dwarn:0 dfail:0 fail:1 skip:41
Results at /archive/results/CI_IGT_test/Patchwork_2068/
f814551aa7232ed36d71244dd148b48660b53a78 drm-intel-nightly: 2016y-04m-25d-11h-36m-27s UTC integration manifest c8a3953 drm/i915: resize the GuC WOPCM for rc6
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: failure for drm/i915: resize the GuC WOPCM for rc6
Quoted 6 lines · Patchwork
== Series Details ==
Series: drm/i915: resize the GuC WOPCM for rc6
URL : https://patchwork.freedesktop.org/series/6313/
State : failure
Quoted 8 lines
== Summary ==
Series 6313v1 drm/i915: resize the GuC WOPCM for rc6
http://patchwork.freedesktop.org/api/1.0/series/6313/revisions/1/mbox/Test
kms_flip:Subgroup basic-flip-vs-wf_vblank: pass -> FAIL (hsw-gt2)
Patch cannot effect HSW as platform does not have GuC and GuC code is all guarded by platform. False Failure.
Quoted 3 lines
Test
kms_force_connector_basic:Subgroup force-edid: pass -> SKIP (ivb-t430s)
Nothing to do with display.
Quoted 3 lines
Test
kms_pipe_crc_basic:Subgroup read-crc-pipe-b-frame-sequence: skip -> PASS (bdw-nuci7)
Same.
Quoted 14 lines
bdw-nuci7 total:200 pass:188 dwarn:0 dfail:0 fail:0 skip:12 bdw-ultra total:200 pass:175 dwarn:0 dfail:0 fail:0 skip:25 bsw-nuc-2 total:199 pass:158 dwarn:0 dfail:0 fail:0 skip:41 byt-nuc total:199 pass:158 dwarn:0 dfail:0 fail:0 skip:41 hsw-brixbox total:200 pass:174 dwarn:0 dfail:0 fail:0 skip:26 hsw-gt2 total:200 pass:178 dwarn:0 dfail:0 fail:1 skip:21 ilk-hp8440p total:200 pass:139 dwarn:0 dfail:0 fail:0 skip:61 ivb-t430s total:200 pass:168 dwarn:0 dfail:0 fail:0 skip:32 skl-i7k-2 total:200 pass:173 dwarn:0 dfail:0 fail:0 skip:27 skl-nuci5 total:200 pass:189 dwarn:0 dfail:0 fail:0 skip:11 snb-dellxps total:200 pass:158 dwarn:0 dfail:0 fail:0 skip:42 snb-x220t total:200 pass:158 dwarn:0 dfail:0 fail:1 skip:41
Quoted 6 lines
Results at /archive/results/CI_IGT_test/Patchwork_2068/
f814551aa7232ed36d71244dd148b48660b53a78drm-intel-nightly: 2016y-04m-25d-11h-36m-27s UTC integration manifest c8a3953 drm/i915: resize the GuC WOPCM for rc6
--
Peter Antoine (Android Graphics Driver Software Engineer)
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: failure for drm/i915: resize the GuC WOPCM for rc6
Quoted 22 lines · Peter Antoine
Quoted 6 lines · Patchwork
== Series Details ==
Series: drm/i915: resize the GuC WOPCM for rc6
URL : https://patchwork.freedesktop.org/series/6313/
State : failureQuoted 8 lines
== Summary ==
Series 6313v1 drm/i915: resize the GuC WOPCM for rc6
http://patchwork.freedesktop.org/api/1.0/series/6313/revisions/1/mbox/Test
kms_flip:Subgroup basic-flip-vs-wf_vblank: pass -> FAIL (hsw-gt2)Patch cannot effect HSW as platform does not have GuC and GuC code is all guarded by platform. False Failure.
Quoted 3 lines
Test
kms_force_connector_basic:Subgroup force-edid: pass -> SKIP (ivb-t430s)
Quoted 6 lines
Nothing to do with display.
Quoted 3 lines
Test
kms_pipe_crc_basic:Subgroup read-crc-pipe-b-frame-sequence: skip -> PASS (bdw-nuci7)Same.
The idea is to digg through bugzilla to make sure we have bugs for all of these, not just shrug them off.
Yes this is work, and yes it's meant to motivate people to fix up all the fail we still have.
-Daniel
Quoted 33 lines
Quoted 15 lines
bdw-nuci7 total:200 pass:188 dwarn:0 dfail:0 fail:0 skip:12 bdw-ultra total:200 pass:175 dwarn:0 dfail:0 fail:0 skip:25 bsw-nuc-2 total:199 pass:158 dwarn:0 dfail:0 fail:0 skip:41 byt-nuc total:199 pass:158 dwarn:0 dfail:0 fail:0 skip:41 hsw-brixbox total:200 pass:174 dwarn:0 dfail:0 fail:0 skip:26 hsw-gt2 total:200 pass:178 dwarn:0 dfail:0 fail:1 skip:21 ilk-hp8440p total:200 pass:139 dwarn:0 dfail:0 fail:0 skip:61 ivb-t430s total:200 pass:168 dwarn:0 dfail:0 fail:0 skip:32 skl-i7k-2 total:200 pass:173 dwarn:0 dfail:0 fail:0 skip:27 skl-nuci5 total:200 pass:189 dwarn:0 dfail:0 fail:0 skip:11 snb-dellxps total:200 pass:158 dwarn:0 dfail:0 fail:0 skip:42 snb-x220t total:200 pass:158 dwarn:0 dfail:0 fail:1 skip:41Quoted 6 lines
Results at /archive/results/CI_IGT_test/Patchwork_2068/
f814551aa7232ed36d71244dd148b48660b53a78drm-intel-nightly: 2016y-04m-25d-11h-36m-27s UTC integration manifest c8a3953 drm/i915: resize the GuC WOPCM for rc6--
Peter Antoine (Android Graphics Driver Software Engineer)
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: failure for drm/i915: resize the GuC WOPCM for rc6
-----Original Message-----
From: Daniel Vetter [mailto:[email protected]] On Behalf Of Daniel Vetter
Sent: Tuesday, April 26, 2016 3:20 PM
To: Antoine, Peter <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: resize the GuC WOPCM for rc6
Quoted 14 lines · Peter Antoine
Quoted 12 lines · Patchwork
== Series Details ==
Series: drm/i915: resize the GuC WOPCM for rc6
URL : https://patchwork.freedesktop.org/series/6313/
State : failure== Summary ==
Series 6313v1 drm/i915: resize the GuC WOPCM for rc6
http://patchwork.freedesktop.org/api/1.0/series/6313/revisions/1/mbox
/
Quoted 5 lines
Quoted 3 lines
Test
kms_flip:Subgroup basic-flip-vs-wf_vblank: pass -> FAIL (hsw-gt2)Patch cannot effect HSW as platform does not have GuC and GuC code is all guarded by platform. False Failure.
Already reported.
https://bugs.freedesktop.org/show_bug.cgi?id=94294
Quoted 5 lines
Quoted 4 lines
Test
kms_force_connector_basic:Subgroup force-edid: pass -> SKIP (ivb-t430s)Nothing to do with display.
Already reported:
https://bugs.freedesktop.org/show_bug.cgi?id=93123
Quoted 5 lines
Quoted 4 lines
Test
kms_pipe_crc_basic:Subgroup read-crc-pipe-b-frame-sequence: skip -> PASS (bdw-nuci7)Same.
The BAT should not fail on a pass.
The idea is to digg through bugzilla to make sure we have bugs for all of these, not just shrug them off.
Yes this is work, and yes it's meant to motivate people to fix up all the fail we still have. -Daniel
Quoted 23 lines
Quoted 15 lines
bdw-nuci7 total:200 pass:188 dwarn:0 dfail:0 fail:0 skip:12 bdw-ultra total:200 pass:175 dwarn:0 dfail:0 fail:0 skip:25 bsw-nuc-2 total:199 pass:158 dwarn:0 dfail:0 fail:0 skip:41 byt-nuc total:199 pass:158 dwarn:0 dfail:0 fail:0 skip:41 hsw-brixbox total:200 pass:174 dwarn:0 dfail:0 fail:0 skip:26 hsw-gt2 total:200 pass:178 dwarn:0 dfail:0 fail:1 skip:21 ilk-hp8440p total:200 pass:139 dwarn:0 dfail:0 fail:0 skip:61 ivb-t430s total:200 pass:168 dwarn:0 dfail:0 fail:0 skip:32 skl-i7k-2 total:200 pass:173 dwarn:0 dfail:0 fail:0 skip:27 skl-nuci5 total:200 pass:189 dwarn:0 dfail:0 fail:0 skip:11 snb-dellxps total:200 pass:158 dwarn:0 dfail:0 fail:0 skip:42 snb-x220t total:200 pass:158 dwarn:0 dfail:0 fail:1 skip:41Quoted 7 lines
Results at /archive/results/CI_IGT_test/Patchwork_2068/
f814551aa7232ed36d71244dd148b48660b53a78drm-intel-nightly:
2016y-04m-25d-11h-36m-27s UTC integration manifest c8a3953 drm/i915: resize the GuC WOPCM for rc6
Quoted 11 lines
--
Peter Antoine (Android Graphics Driver Software Engineer)
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 35 lines · Peter Antoine
This patch resizes the GuC WOPCM to so that the GuC and the RC6 memory spaces do not overlap.
Issue: https://jira01.devtools.intel.com/browse/VIZ-6638
Signed-off-by Peter Antoine <[email protected]>--- drivers/gpu/drm/i915/i915_guc_reg.h | 5 +++-- drivers/gpu/drm/i915/intel_guc_loader.c | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_guc_reg.h +3
-2@@ -68,10 +68,11 @@#define GUC_MAX_IDLE_COUNT _MMIO(0xC3E4)#define GUC_WOPCM_SIZE _MMIO(0xc050) -#define GUC_WOPCM_SIZE_VALUE (0x80 << 12)/* 512KB */ +#define GUC_WOPCM_SIZE_VALUE (0x80 << 12)/* 512KB */ +#define BXT_GUC_WOPCM_SIZE_VALUE (0x70 << 12)/* 448KB */ /* GuC addresses below GUC_WOPCM_TOP don't map through the GTT */ -#define GUC_WOPCM_TOP (GUC_WOPCM_SIZE_VALUE) +#define GUC_WOPCM_TOP (0x80 << 12)/* 512KB */ #define GEN8_GT_PM_CONFIG _MMIO(0x138140)#define GEN9LP_GT_PM_CONFIG _MMIO(0x138140)drivers/gpu/drm/i915/intel_guc_loader.c +0
-0@@ -312,7 +312,11 @@ static int guc_ucode_xfer(struct drm_i915_private *dev_priv)intel_uncore_forcewake_get (dev_priv,FORCEWAKE_ALL );
drivers/gpu/drm/i915/intel_guc_loader.c static int guc_ucode_xfer(struct drm_i915_private *dev_priv) · line 322
Quoted 10 lines
drivers/gpu/drm/i915/intel_guc_loader.c +5
-1/* init WOPCM */ -I915_WRITE (GUC_WOPCM_SIZE ,GUC_WOPCM_SIZE_VALUE ); +if (IS_BROXTON (dev)) +I915_WRITE (GUC_WOPCM_SIZE ,BXT_GUC_WOPCM_SIZE_VALUE ); +else +I915_WRITE (GUC_WOPCM_SIZE ,GUC_WOPCM_SIZE_VALUE ); +I915_WRITE (DMA_GUC_WOPCM_OFFSET ,GUC_WOPCM_OFFSET_VALUE );/* Enable MIA caching. GuC clock gating is disabled. */
So, this gives the right result, but doesn't really show or explain why we have different values, or how the values are arrived at; they're just more magic numbers. Also, in the loader there's a check on the firmware size that uses different values. So I'd rather prefer the unified approach in the attached version ...
.Dave.
Quoted 1 line
From
fa0f5e514eea4342933e237e693ea547b9b10f81Mon Sep 17 00:00:00 2001
From: Peter Antoine <[email protected]>
Date: Tue, 26 Apr 2016 10:11:41 +0100
Subject: [PATCH] drm/i915/bxt: reserve space for RC6 in the the GuC WOPCM
Organization: Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ
This patch resizes the GuC WOPCM (specifically on BXT) so that the GuC and RC6 memory spaces do not overlap.
Issue: https://jira01.devtools.intel.com/browse/VIZ-6638
--- drivers/gpu/drm/i915/i915_guc_reg.h | 6 +++--- drivers/gpu/drm/i915/intel_guc_loader.c | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_guc_reg.h +3 -3
@@ -67,11 +67,11 @@#define GUC_WOPCM_OFFSET_VALUE 0x80000/* 512KB */ #define GUC_MAX_IDLE_COUNT _MMIO(0xC3E4) +/* Defines WOPCM space available to GuC firmware */ #define GUC_WOPCM_SIZE _MMIO(0xc050) -#define GUC_WOPCM_SIZE_VALUE (0x80 << 12)/* 512KB */ -/* GuC addresses below GUC_WOPCM_TOP don't map through the GTT */ -#define GUC_WOPCM_TOP (GUC_WOPCM_SIZE_VALUE) +#define GUC_WOPCM_TOP (0x80 << 12)/* 512KB */ +#define BXT_GUC_WOPCM_RC6_RESERVED (0x10 << 12)/* 64KB */ #define GEN8_GT_PM_CONFIG _MMIO(0x138140)#define GEN9LP_GT_PM_CONFIG _MMIO(0x138140)
drivers/gpu/drm/i915/intel_guc_loader.c +13 -4
@@ -281,6 +281,17 @@ static int guc_ucode_xfer_dma(struct drm_i915_private *dev_priv)return ret; } +static u32 guc_wopcm_size (struct drm_i915_private *dev_priv) +{ +u32 wopcm_size =GUC_WOPCM_TOP ; + +/* On BXT, the top of WOPCM is reserved for RC6 context */ +if (IS_BROXTON (dev_priv)) + wopcm_size -=BXT_GUC_WOPCM_RC6_RESERVED ; + +return wopcm_size; +} +/* * Load the GuC firmware blob into the MinuteIA. */
@@ -308,7 +319,7 @@ static int guc_ucode_xfer(struct drm_i915_private *dev_priv)intel_uncore_forcewake_get (dev_priv,FORCEWAKE_ALL );/* init WOPCM */ -I915_WRITE (GUC_WOPCM_SIZE ,GUC_WOPCM_SIZE_VALUE ); +I915_WRITE (GUC_WOPCM_SIZE ,guc_wopcm_size (dev_priv));I915_WRITE (DMA_GUC_WOPCM_OFFSET ,GUC_WOPCM_OFFSET_VALUE );/* Enable MIA caching. GuC clock gating is disabled. */
@@ -552,9 +563,7 @@ static void guc_fw_fetch(struct drm_device *dev, struct intel_guc_fw *guc_fw)/* Header and uCode will be loaded to WOPCM. Size of the two. */ size = guc_fw->header_size + guc_fw->ucode_size; - -/* Top 32k of WOPCM is reserved (8K stack + 24k RC6 context). */ -if (size >GUC_WOPCM_SIZE_VALUE -0x8000 ) { +if (size >guc_wopcm_size (dev->dev_private)) {DRM_ERROR ("Firmware is too large to fit in WOPCM\n" ); goto fail; }
Signature · 1 line
1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
The attached version still does not explain that the WOPCM_TOP is to tell the GuC not to use that space. The extra information does not aid anybody as the information is used internally within the GuC.
But, I have not actual objection to the patch.
Peter.
-----Original Message-----
From: Gordon, David S
Sent: Thursday, May 5, 2016 2:41 PM
To: Antoine, Peter <[email protected]>; [email protected]
Cc: Vivi, Rodrigo <[email protected]>
Subject: Re: [PATCH v3] drm/i915: resize the GuC WOPCM for rc6
Quoted 37 lines · Peter Antoine
This patch resizes the GuC WOPCM to so that the GuC and the RC6 memory spaces do not overlap.
Issue: https://jira01.devtools.intel.com/browse/VIZ-6638
Signed-off-by Peter Antoine <[email protected]>--- drivers/gpu/drm/i915/i915_guc_reg.h | 5 +++-- drivers/gpu/drm/i915/intel_guc_loader.c | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_guc_reg.h +3
-2@@ -68,10 +68,11 @@#define GUC_MAX_IDLE_COUNT _MMIO(0xC3E4)#define GUC_WOPCM_SIZE _MMIO(0xc050) -#define GUC_WOPCM_SIZE_VALUE (0x80 << 12)/* 512KB */ +#define GUC_WOPCM_SIZE_VALUE (0x80 << 12)/* 512KB */ +#define BXT_GUC_WOPCM_SIZE_VALUE (0x70 << 12)/* 448KB */ /* GuC addresses below GUC_WOPCM_TOP don't map through the GTT */ -#define GUC_WOPCM_TOP (GUC_WOPCM_SIZE_VALUE) +#define GUC_WOPCM_TOP (0x80 << 12)/* 512KB */ #define GEN8_GT_PM_CONFIG _MMIO(0x138140)#define GEN9LP_GT_PM_CONFIG _MMIO(0x138140)drivers/gpu/drm/i915/intel_guc_loader.c +0
-0@@ -312,7 +312,11 @@ static int guc_ucode_xfer(struct drm_i915_private *dev_priv)intel_uncore_forcewake_get (dev_priv,FORCEWAKE_ALL );
drivers/gpu/drm/i915/intel_guc_loader.c static int guc_ucode_xfer(struct drm_i915_private *dev_priv) · line 322
Quoted 10 lines
drivers/gpu/drm/i915/intel_guc_loader.c +5
-1/* init WOPCM */ -I915_WRITE (GUC_WOPCM_SIZE ,GUC_WOPCM_SIZE_VALUE ); +if (IS_BROXTON (dev)) +I915_WRITE (GUC_WOPCM_SIZE ,BXT_GUC_WOPCM_SIZE_VALUE ); +else +I915_WRITE (GUC_WOPCM_SIZE ,GUC_WOPCM_SIZE_VALUE ); +I915_WRITE (DMA_GUC_WOPCM_OFFSET ,GUC_WOPCM_OFFSET_VALUE );/* Enable MIA caching. GuC clock gating is disabled. */
So, this gives the right result, but doesn't really show or explain why we have different values, or how the values are arrived at; they're just more magic numbers. Also, in the loader there's a check on the firmware size that uses different values. So I'd rather prefer the unified approach in the attached version ...
.Dave.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 1 line · Peter
The attached version still does not explain that the
WOPCM_TOPis to tell the GuC not to use that space.
That's NOT what WOPCM_TOP means. The GuC is allowed to use the space up to the value stored in the GUC_WOPCM_SIZE register (as the comment above the #define says). Architecturally, this is allowed to be any value greater than (16K+sizeof internal SRAM (64, 128, or 256K)) and less than or equal to GUC_WOPCM_TOP (which is a platform-independent constant), so we normally choose the maximm allowed. Howver on BXT, we need to leave some space at the top for the RC6 image, hence the logic (and comments!) in guc_wopcm_size().
Quoted 1 line
The extra information does not aid anybody as the information is used internally within the GuC.
It may help the next person who has to figure out what's gone wrong on some future chip that needs more than 64K for RC6!
.Dave.
Quoted 5 lines
But, I have not actual objection to the patch.
Peter.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Dave Gordon
On 05/05/2016 15:02, Antoine, Peter wrote:
The attached version still does not explain that the
WOPCM_TOPis to tell the GuC not to use that space.That's NOT what
WOPCM_TOPmeans. The GuC is allowed to use the space up to the value stored in theGUC_WOPCM_SIZEregister (as the comment above the #define says). Architecturally, this is allowed to be any value greater than (16K+sizeof internal SRAM (64, 128, or 256K)) and less than or equal toGUC_WOPCM_TOP(which is a platform-independent constant), so we normally choose the maximm allowed. Howver on BXT, we need to leave some space at the top for the RC6 image, hence the logic (and comments!) inguc_wopcm_size().
Yes, the firmware can use upto GUC_WOPCM_TOP and to leave the rest alone.
Quoted 4 lines
The extra information does not aid anybody as the information is used internally within the GuC.
It may help the next person who has to figure out what's gone wrong on some future chip that needs more than 64K for RC6!
You hid a if statement in a function (making the code harder to read and more prone to error). Where maybe a slightly clearer comment was required.
And this patch has been held up two weeks just for a better comment.
Peter.
Quoted 2 lines
.Dave.
And what if the next reserved space is not for RC6?
Quoted 9 lines
But, I have not actual objection to the patch.
Peter.
--
Peter Antoine (Android Graphics Driver Software Engineer)
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 28 lines · Peter Antoine
Quoted 6 lines · Dave Gordon
On 05/05/2016 15:02, Antoine, Peter wrote:
The attached version still does not explain that the
WOPCM_TOPis to tell the GuC not to use that space.Quoted 9 lines
That's NOT what
WOPCM_TOPmeans. The GuC is allowed to use the space up to the value stored in theGUC_WOPCM_SIZEregister (as the comment above the #define says). Architecturally, this is allowed to be any value greater than
(16K+sizeof internal SRAM (64, 128, or 256K)) and less than or equal toGUC_WOPCM_TOP(which is a platform-independent constant), so we normally choose the maximm allowed. Howver on BXT, we need to leave some space at the top for the
RC6 image, hence the logic (and comments!) inguc_wopcm_size().Yes, the firmware can use upto
GUC_WOPCM_TOPand to leave the rest alone.Quoted 6 lines
The extra information does not aid anybody as the information is used internally within the GuC.
It may help the next person who has to figure out what's gone wrong on some future chip that needs more than 64K for RC6!
You hid a if statement in a function (making the code harder to read and more prone to error). Where maybe a slightly clearer comment was required.
Quoted 17 lines
And this patch has been held up two weeks just for a better comment.
Peter.
Quoted 2 lines
.Dave.
And what if the next reserved space is not for RC6?
Quoted 9 lines
But, I have not actual objection to the patch.
Peter.
Quoted 12 lines
--
Peter Antoine (Android Graphics Driver Software Engineer)
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 12 lines · Dave Gordon
Quoted 1 line · Peter
The attached version still does not explain that the
WOPCM_TOPis to tell the GuC not to use that space.That's NOT what
WOPCM_TOPmeans. The GuC is allowed to use the space up to the value stored in theGUC_WOPCM_SIZEregister (as the comment above the #define says). Architecturally, this is allowed to be any value greater than (16K+sizeof internal SRAM (64, 128, or 256K)) and less than or equal toGUC_WOPCM_TOP(which is a platform-independent constant), so we normally choose the maximm allowed. Howver on BXT, we need to leave some space at the top for the RC6 image, hence the logic (and comments!) inguc_wopcm_size().
Quoted 11 lines
Quoted 1 line
The extra information does not aid anybody as the information is used internally within the GuC.
It may help the next person who has to figure out what's gone wrong on some future chip that needs more than 64K for RC6!
.Dave.
Quoted 5 lines
But, I have not actual objection to the patch.
Peter.
Unfortunately Dave's patch locked my test system on bootup, so I've t-b & r-b'd Peter's.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 21 lines · Nick Hoath
Quoted 20 lines · Dave Gordon
Quoted 2 lines · Peter
The attached version still does not explain that the
WOPCM_TOPis to tell the GuC not to use that space.That's NOT what
WOPCM_TOPmeans. The GuC is allowed to use the space up to the value stored in theGUC_WOPCM_SIZEregister (as the comment above the #define says). Architecturally, this is allowed to be any value greater than (16K+sizeof internal SRAM (64, 128, or 256K)) and less than or equal toGUC_WOPCM_TOP(which is a platform-independent constant), so we normally choose the maximm allowed. Howver on BXT, we need to leave some space at the top for the RC6 image, hence the logic (and comments!) inguc_wopcm_size().Quoted 2 lines
The extra information does not aid anybody as the information is used internally within the GuC.
It may help the next person who has to figure out what's gone wrong on some future chip that needs more than 64K for RC6!
.Dave.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
But, I have not actual objection to the patch.
Peter.
Unfortunately Dave's patch locked my test system on bootup, so I've t-b & r-b'd Peter's.
They're equivalent, unless your firmware happens to be between 458752 and 491520 bytes in size (in which case you have a problem anyway).
To check, I've run both versions, with debug printing the value chosen (on SKL) and the value that would have been chosen on BXT, and they're identical (and both work). So I think your build had some other problem unrelated to the specific patch.
I've no problem with using Peter's patch for now, but it's not just a matter of the comments; there's also the other use(s) of GUC_WOP_(TOP,SIZE_VALUE), with ad-hoc additions or subtractions. So it still needs fixing properly.
.Dave.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 38 lines · David S
Quoted 21 lines · Nick Hoath
Quoted 20 lines · Dave Gordon
Quoted 2 lines · Peter
The attached version still does not explain that the
WOPCM_TOPis to tell the GuC not to use that space.That's NOT what
WOPCM_TOPmeans. The GuC is allowed to use the space up to the value stored in theGUC_WOPCM_SIZEregister (as the comment above the #define says). Architecturally, this is allowed to be any value greater than (16K+sizeof internal SRAM (64, 128, or 256K)) and less than or equal toGUC_WOPCM_TOP(which is a platform-independent constant), so we normally choose the maximm allowed. Howver on BXT, we need to leave some space at the top for the RC6 image, hence the logic (and comments!) inguc_wopcm_size().Quoted 2 lines
The extra information does not aid anybody as the information is used internally within the GuC.
It may help the next person who has to figure out what's gone wrong on some future chip that needs more than 64K for RC6!
.Dave.
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
But, I have not actual objection to the patch.
Peter.
Unfortunately Dave's patch locked my test system on bootup, so I've t-b & r-b'd Peter's.
They're equivalent, unless your firmware happens to be between 458752 and 491520 bytes in size (in which case you have a problem anyway).
To check, I've run both versions, with debug printing the value chosen (on SKL) and the value that would have been chosen on BXT, and they're identical (and both work). So I think your build had some other problem unrelated to the specific patch.
Quoted 7 lines
I've no problem with using Peter's patch for now, but it's not just a matter of the comments; there's also the other use(s) of
GUC_WOP_(TOP,SIZE_VALUE), with ad-hoc additions or subtractions. So it still needs fixing properly..Dave.
After a rebuild & a retest, Dave's patch works fine. Therefore for "drm/i915/bxt: reserve space for RC6 in the the GuC WOPCM":
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 2 lines · On Tue, 26 Apr 2016 10:11:41 +0100 Peter Antoine <[email protected]>…
This patch resizes the GuC WOPCM to so that the GuC and the RC6 memory spaces do not overlap.
Hi Peter,
With this patch applied to our IOTG kernel tree, I see a regression with the RC6 residency values. The pm_rc6_residency fails the accuracy test.
The counter is still updating, but instead of seeing appx. 3000ms in RC6 I see appx. 100ms during the 3 second sleep.
Simply reverting this one change makes the RC6 residency counts go back to normal. Seems like this patch should fix a problem like this, not cause it.
This is on a Leaf Hill BXT CRB platform.
Any pointers or thoughts on how to debug this would be appreciated.
Thanks,
Bob
Quoted 43 lines
Issue: https://jira01.devtools.intel.com/browse/VIZ-6638
Signed-off-by Peter Antoine <[email protected]>--- drivers/gpu/drm/i915/i915_guc_reg.h | 5 +++-- drivers/gpu/drm/i915/intel_guc_loader.c | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_guc_reg.h +3
-2@@ -68,10 +68,11 @@#define GUC_MAX_IDLE_COUNT _MMIO(0xC3E4)#define GUC_WOPCM_SIZE _MMIO(0xc050) -#define GUC_WOPCM_SIZE_VALUE (0x80 << 12)/* 512KB */ +#define GUC_WOPCM_SIZE_VALUE (0x80 << 12)/* 512KB */ +#define BXT_GUC_WOPCM_SIZE_VALUE (0x70 << 12)/* 448KB */ /* GuC addresses below GUC_WOPCM_TOP don't map through the GTT */ -#define GUC_WOPCM_TOP (GUC_WOPCM_SIZE_VALUE) +#define GUC_WOPCM_TOP (0x80 << 12)/* 512KB */ #define GEN8_GT_PM_CONFIG _MMIO(0x138140)#define GEN9LP_GT_PM_CONFIG _MMIO(0x138140)drivers/gpu/drm/i915/intel_guc_loader.c +5
-1@@ -312,7 +312,11 @@ static int guc_ucode_xfer(struct drm_i915_private *dev_priv)intel_uncore_forcewake_get (dev_priv,FORCEWAKE_ALL );/* init WOPCM */ -I915_WRITE (GUC_WOPCM_SIZE ,GUC_WOPCM_SIZE_VALUE ); +if (IS_BROXTON (dev)) +I915_WRITE (GUC_WOPCM_SIZE ,BXT_GUC_WOPCM_SIZE_VALUE ); +else +I915_WRITE (GUC_WOPCM_SIZE ,GUC_WOPCM_SIZE_VALUE ); +I915_WRITE (DMA_GUC_WOPCM_OFFSET ,GUC_WOPCM_OFFSET_VALUE );/* Enable MIA caching. GuC clock gating is disabled. */
Signature · 11 lines
-- Bob Paauwe [email protected] IOTG / PED Software Organization Intel Corp. Folsom, CA (916) 356-6193 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Bob,
It was tested on a BXT-T RVP and LeafHill A and worked fine. The patch has been in the Android tree for at least a couple of months (probably more) and has seemed to be stable. But, not sure Android was run on the BXT CRB.
It could be the GuC firmware crashing, there are some fixes in 8.7. Has the size of the SRAM changed on that board? Is something else reserving space in that area?
The size that was reserved was passed onto us from the GuC firmware team via the RC6 team. It might be worth talking to the power team in Bangalore. [email protected] is probably your best bet for RC6 issues.
I hope that helps.
Peter.
-----Original Message-----
From: Paauwe, Bob J
Sent: Tuesday, May 10, 2016 4:59 PM
To: Antoine, Peter <[email protected]>
Cc: [email protected]; Vivi, Rodrigo <[email protected]>
Subject: Re: [Intel-gfx] [PATCH v3] drm/i915: resize the GuC WOPCM for rc6
Quoted 2 lines · On Tue, 26 Apr 2016 10:11:41 +0100 Peter Antoine <[email protected]>…
This patch resizes the GuC WOPCM to so that the GuC and the RC6 memory spaces do not overlap.
Hi Peter,
With this patch applied to our IOTG kernel tree, I see a regression with the RC6 residency values. The pm_rc6_residency fails the accuracy test.
The counter is still updating, but instead of seeing appx. 3000ms in RC6 I see appx. 100ms during the 3 second sleep.
Simply reverting this one change makes the RC6 residency counts go back to normal. Seems like this patch should fix a problem like this, not cause it.
This is on a Leaf Hill BXT CRB platform.
Any pointers or thoughts on how to debug this would be appreciated.
Thanks,
Bob
Quoted 35 lines
Issue: https://jira01.devtools.intel.com/browse/VIZ-6638
Signed-off-by Peter Antoine <[email protected]>--- drivers/gpu/drm/i915/i915_guc_reg.h | 5 +++-- drivers/gpu/drm/i915/intel_guc_loader.c | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_guc_reg.h +3
-2@@ -68,10 +68,11 @@#define GUC_MAX_IDLE_COUNT _MMIO(0xC3E4)#define GUC_WOPCM_SIZE _MMIO(0xc050) -#define GUC_WOPCM_SIZE_VALUE (0x80 << 12)/* 512KB */ +#define GUC_WOPCM_SIZE_VALUE (0x80 << 12)/* 512KB */ +#define BXT_GUC_WOPCM_SIZE_VALUE (0x70 << 12)/* 448KB */ /* GuC addresses below GUC_WOPCM_TOP don't map through the GTT */ -#define GUC_WOPCM_TOP (GUC_WOPCM_SIZE_VALUE) +#define GUC_WOPCM_TOP (0x80 << 12)/* 512KB */ #define GEN8_GT_PM_CONFIG _MMIO(0x138140)#define GEN9LP_GT_PM_CONFIG _MMIO(0x138140)drivers/gpu/drm/i915/intel_guc_loader.c +0
-0@@ -312,7 +312,11 @@ static int guc_ucode_xfer(struct drm_i915_private *dev_priv)intel_uncore_forcewake_get (dev_priv,FORCEWAKE_ALL );
drivers/gpu/drm/i915/intel_guc_loader.c static int guc_ucode_xfer(struct drm_i915_private *dev_priv) · line 322
Quoted 10 lines
drivers/gpu/drm/i915/intel_guc_loader.c +5
-1/* init WOPCM */ -I915_WRITE (GUC_WOPCM_SIZE ,GUC_WOPCM_SIZE_VALUE ); +if (IS_BROXTON (dev)) +I915_WRITE (GUC_WOPCM_SIZE ,BXT_GUC_WOPCM_SIZE_VALUE ); +else +I915_WRITE (GUC_WOPCM_SIZE ,GUC_WOPCM_SIZE_VALUE ); +I915_WRITE (DMA_GUC_WOPCM_OFFSET ,GUC_WOPCM_OFFSET_VALUE );/* Enable MIA caching. GuC clock gating is disabled. */
--
--
Bob Paauwe
[email protected]
IOTG / PED Software Organization
Intel Corp. Folsom, CA
(916) 356-6193
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx