* [PATCH] drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
@ 2018-02-08 17:41 Imre Deak
2018-02-08 18:30 ` ✓ Fi.CI.BAT: success for " Patchwork
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Imre Deak @ 2018-02-08 17:41 UTC (permalink / raw)
To: intel-gfx
On BXT/GLK GEN6_PCODE_READ_RC6VIDS fails with
MAILBOX_P24C_CC_ILLEGAL_CMD, so don't try to do the query on these
platforms. Do it only on SNB, IVB and HSW, where we use this command
anyway for RC6 enabling.
Based on my tests the command also succeeds on all LLC platforms, but
it's not clear if it's really supported on those (it returns 0 aka 245mv
for all RC6 states everywhere except on SNB). BSpec lists the command as
supported on SKL+ (see P24C_PCODE_MAILBOX_INTERFACE) but that's clearly
incorrect, since on SKL/KBL the same command ID is used for
SKL_PCODE_LOAD_HDCP_KEYS. Since the command fails on BXT/GLK, the BSpec
command list is also incorrect for those platforms (see
P_CR_P24C_PCODE_MAILBOX_INTERFACE_0_2_0_GTTMMADR).
I filed a request to update that info in Bspec, but for now let's
assume a minimal set of platforms where the command is supported.
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103337
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 2bdce9fea671..8f9045fae3cf 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1484,9 +1484,12 @@ static int gen6_drpc_info(struct seq_file *m)
gen9_powergate_status = I915_READ(GEN9_PWRGT_DOMAIN_STATUS);
}
- mutex_lock(&dev_priv->pcu_lock);
- sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS, &rc6vids);
- mutex_unlock(&dev_priv->pcu_lock);
+ if (INTEL_GEN(dev_priv) <= 7) {
+ mutex_lock(&dev_priv->pcu_lock);
+ sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS,
+ &rc6vids);
+ mutex_unlock(&dev_priv->pcu_lock);
+ }
seq_printf(m, "RC1e Enabled: %s\n",
yesno(rcctl1 & GEN6_RC_CTL_RC1e_ENABLE));
@@ -1542,12 +1545,15 @@ static int gen6_drpc_info(struct seq_file *m)
print_rc6_res(m, "RC6+ residency since boot:", GEN6_GT_GFX_RC6p);
print_rc6_res(m, "RC6++ residency since boot:", GEN6_GT_GFX_RC6pp);
- seq_printf(m, "RC6 voltage: %dmV\n",
- GEN6_DECODE_RC6_VID(((rc6vids >> 0) & 0xff)));
- seq_printf(m, "RC6+ voltage: %dmV\n",
- GEN6_DECODE_RC6_VID(((rc6vids >> 8) & 0xff)));
- seq_printf(m, "RC6++ voltage: %dmV\n",
- GEN6_DECODE_RC6_VID(((rc6vids >> 16) & 0xff)));
+ if (INTEL_GEN(dev_priv) <= 7) {
+ seq_printf(m, "RC6 voltage: %dmV\n",
+ GEN6_DECODE_RC6_VID(((rc6vids >> 0) & 0xff)));
+ seq_printf(m, "RC6+ voltage: %dmV\n",
+ GEN6_DECODE_RC6_VID(((rc6vids >> 8) & 0xff)));
+ seq_printf(m, "RC6++ voltage: %dmV\n",
+ GEN6_DECODE_RC6_VID(((rc6vids >> 16) & 0xff)));
+ }
+
return i915_forcewake_domains(m, NULL);
}
--
2.13.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
2018-02-08 17:41 [PATCH] drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it Imre Deak
@ 2018-02-08 18:30 ` Patchwork
2018-02-08 18:33 ` [PATCH] " Chris Wilson
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-02-08 18:30 UTC (permalink / raw)
To: Imre Deak; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
URL : https://patchwork.freedesktop.org/series/37936/
State : success
== Summary ==
Series 37936v1 drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
https://patchwork.freedesktop.org/api/1.0/series/37936/revisions/1/mbox/
Test kms_frontbuffer_tracking:
Subgroup basic:
pass -> FAIL (fi-cnl-y3) fdo#103167
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713
Subgroup suspend-read-crc-pipe-c:
pass -> DMESG-FAIL (fi-cnl-y3) fdo#104951
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:418s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:424s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:374s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:487s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:286s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:486s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:483s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:466s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:459s
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:571s
fi-cnl-y3 total:288 pass:260 dwarn:0 dfail:1 fail:1 skip:26 time:580s
fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:412s
fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:283s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:509s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:388s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:411s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:449s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:415s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:459s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:497s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:450s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:499s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:599s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:430s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:509s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:527s
fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:486s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:491s
fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:416s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:430s
fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:526s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:392s
Blacklisted hosts:
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:467s
a326a34b0b8db9854fee49eafb526a12b6bc89d6 drm-tip: 2018y-02m-08d-17h-29m-20s UTC integration manifest
c100cb55f2ad drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7959/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
2018-02-08 17:41 [PATCH] drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it Imre Deak
2018-02-08 18:30 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-02-08 18:33 ` Chris Wilson
2018-02-08 18:44 ` Imre Deak
2018-02-09 3:24 ` ✓ Fi.CI.IGT: success for " Patchwork
2018-02-12 10:33 ` [PATCH] " Jani Nikula
3 siblings, 1 reply; 10+ messages in thread
From: Chris Wilson @ 2018-02-08 18:33 UTC (permalink / raw)
To: Imre Deak, intel-gfx
Quoting Imre Deak (2018-02-08 17:41:02)
> On BXT/GLK GEN6_PCODE_READ_RC6VIDS fails with
> MAILBOX_P24C_CC_ILLEGAL_CMD, so don't try to do the query on these
> platforms. Do it only on SNB, IVB and HSW, where we use this command
> anyway for RC6 enabling.
>
> Based on my tests the command also succeeds on all LLC platforms, but
> it's not clear if it's really supported on those (it returns 0 aka 245mv
> for all RC6 states everywhere except on SNB). BSpec lists the command as
> supported on SKL+ (see P24C_PCODE_MAILBOX_INTERFACE) but that's clearly
> incorrect, since on SKL/KBL the same command ID is used for
> SKL_PCODE_LOAD_HDCP_KEYS. Since the command fails on BXT/GLK, the BSpec
> command list is also incorrect for those platforms (see
> P_CR_P24C_PCODE_MAILBOX_INTERFACE_0_2_0_GTTMMADR).
>
> I filed a request to update that info in Bspec, but for now let's
> assume a minimal set of platforms where the command is supported.
>
> Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103337
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 24 +++++++++++++++---------
> 1 file changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 2bdce9fea671..8f9045fae3cf 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1484,9 +1484,12 @@ static int gen6_drpc_info(struct seq_file *m)
> gen9_powergate_status = I915_READ(GEN9_PWRGT_DOMAIN_STATUS);
> }
>
> - mutex_lock(&dev_priv->pcu_lock);
> - sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS, &rc6vids);
> - mutex_unlock(&dev_priv->pcu_lock);
> + if (INTEL_GEN(dev_priv) <= 7) {
> + mutex_lock(&dev_priv->pcu_lock);
> + sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS,
> + &rc6vids);
> + mutex_unlock(&dev_priv->pcu_lock);
> + }
>
> seq_printf(m, "RC1e Enabled: %s\n",
> yesno(rcctl1 & GEN6_RC_CTL_RC1e_ENABLE));
> @@ -1542,12 +1545,15 @@ static int gen6_drpc_info(struct seq_file *m)
> print_rc6_res(m, "RC6+ residency since boot:", GEN6_GT_GFX_RC6p);
> print_rc6_res(m, "RC6++ residency since boot:", GEN6_GT_GFX_RC6pp);
>
> - seq_printf(m, "RC6 voltage: %dmV\n",
> - GEN6_DECODE_RC6_VID(((rc6vids >> 0) & 0xff)));
> - seq_printf(m, "RC6+ voltage: %dmV\n",
> - GEN6_DECODE_RC6_VID(((rc6vids >> 8) & 0xff)));
> - seq_printf(m, "RC6++ voltage: %dmV\n",
> - GEN6_DECODE_RC6_VID(((rc6vids >> 16) & 0xff)));
> + if (INTEL_GEN(dev_priv) <= 7) {
I expect this will confuse gcc-4.4 and it will emit a
maybe-used-uninitialised. I would set rc6vids=0 and then test if
(rc6vids) here.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
2018-02-08 18:33 ` [PATCH] " Chris Wilson
@ 2018-02-08 18:44 ` Imre Deak
2018-02-12 11:19 ` Chris Wilson
0 siblings, 1 reply; 10+ messages in thread
From: Imre Deak @ 2018-02-08 18:44 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Thu, Feb 08, 2018 at 06:33:03PM +0000, Chris Wilson wrote:
> Quoting Imre Deak (2018-02-08 17:41:02)
> > On BXT/GLK GEN6_PCODE_READ_RC6VIDS fails with
> > MAILBOX_P24C_CC_ILLEGAL_CMD, so don't try to do the query on these
> > platforms. Do it only on SNB, IVB and HSW, where we use this command
> > anyway for RC6 enabling.
> >
> > Based on my tests the command also succeeds on all LLC platforms, but
> > it's not clear if it's really supported on those (it returns 0 aka 245mv
> > for all RC6 states everywhere except on SNB). BSpec lists the command as
> > supported on SKL+ (see P24C_PCODE_MAILBOX_INTERFACE) but that's clearly
> > incorrect, since on SKL/KBL the same command ID is used for
> > SKL_PCODE_LOAD_HDCP_KEYS. Since the command fails on BXT/GLK, the BSpec
> > command list is also incorrect for those platforms (see
> > P_CR_P24C_PCODE_MAILBOX_INTERFACE_0_2_0_GTTMMADR).
> >
> > I filed a request to update that info in Bspec, but for now let's
> > assume a minimal set of platforms where the command is supported.
> >
> > Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103337
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_debugfs.c | 24 +++++++++++++++---------
> > 1 file changed, 15 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > index 2bdce9fea671..8f9045fae3cf 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -1484,9 +1484,12 @@ static int gen6_drpc_info(struct seq_file *m)
> > gen9_powergate_status = I915_READ(GEN9_PWRGT_DOMAIN_STATUS);
> > }
> >
> > - mutex_lock(&dev_priv->pcu_lock);
> > - sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS, &rc6vids);
> > - mutex_unlock(&dev_priv->pcu_lock);
> > + if (INTEL_GEN(dev_priv) <= 7) {
> > + mutex_lock(&dev_priv->pcu_lock);
> > + sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS,
> > + &rc6vids);
> > + mutex_unlock(&dev_priv->pcu_lock);
> > + }
> >
> > seq_printf(m, "RC1e Enabled: %s\n",
> > yesno(rcctl1 & GEN6_RC_CTL_RC1e_ENABLE));
> > @@ -1542,12 +1545,15 @@ static int gen6_drpc_info(struct seq_file *m)
> > print_rc6_res(m, "RC6+ residency since boot:", GEN6_GT_GFX_RC6p);
> > print_rc6_res(m, "RC6++ residency since boot:", GEN6_GT_GFX_RC6pp);
> >
> > - seq_printf(m, "RC6 voltage: %dmV\n",
> > - GEN6_DECODE_RC6_VID(((rc6vids >> 0) & 0xff)));
> > - seq_printf(m, "RC6+ voltage: %dmV\n",
> > - GEN6_DECODE_RC6_VID(((rc6vids >> 8) & 0xff)));
> > - seq_printf(m, "RC6++ voltage: %dmV\n",
> > - GEN6_DECODE_RC6_VID(((rc6vids >> 16) & 0xff)));
> > + if (INTEL_GEN(dev_priv) <= 7) {
>
> I expect this will confuse gcc-4.4 and it will emit a
> maybe-used-uninitialised. I would set rc6vids=0 and then test if
> (rc6vids) here.
It's inited already to 0, so shouldn't warn. (0 is a valid value
otherwise).
--Imre
> -Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
2018-02-08 17:41 [PATCH] drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it Imre Deak
2018-02-08 18:30 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-02-08 18:33 ` [PATCH] " Chris Wilson
@ 2018-02-09 3:24 ` Patchwork
2018-02-12 15:41 ` Imre Deak
2018-02-12 10:33 ` [PATCH] " Jani Nikula
3 siblings, 1 reply; 10+ messages in thread
From: Patchwork @ 2018-02-09 3:24 UTC (permalink / raw)
To: Imre Deak; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
URL : https://patchwork.freedesktop.org/series/37936/
State : success
== Summary ==
Test kms_cursor_crc:
Subgroup cursor-64x64-offscreen:
skip -> PASS (shard-apl)
Test gem_exec_suspend:
Subgroup basic-s4:
skip -> FAIL (shard-snb) fdo#103375
Test drv_suspend:
Subgroup debugfs-reader:
skip -> PASS (shard-snb) fdo#102365 +1
Test gem_eio:
Subgroup in-flight-contexts:
pass -> FAIL (shard-hsw) fdo#104676 +1
Test kms_sysfs_edid_timing:
warn -> PASS (shard-apl) fdo#100047
Test kms_flip:
Subgroup 2x-plain-flip-fb-recreate-interruptible:
fail -> PASS (shard-hsw)
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-cur-indfb-draw-mmap-gtt:
pass -> FAIL (shard-apl) fdo#101623
Test perf_pmu:
Subgroup semaphore-wait-idle-bcs0:
fail -> PASS (shard-apl) fdo#105011
Test kms_cursor_legacy:
Subgroup cursor-vs-flip-legacy:
fail -> PASS (shard-apl) fdo#103355
Test kms_plane:
Subgroup plane-panning-bottom-right-suspend-pipe-b-planes:
pass -> SKIP (shard-hsw) fdo#103540
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#105011 https://bugs.freedesktop.org/show_bug.cgi?id=105011
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
shard-apl total:3354 pass:1738 dwarn:1 dfail:0 fail:20 skip:1594 time:12341s
shard-hsw total:3444 pass:1759 dwarn:1 dfail:0 fail:11 skip:1672 time:11773s
shard-snb total:3444 pass:1350 dwarn:1 dfail:0 fail:11 skip:2082 time:6581s
Blacklisted hosts:
shard-kbl total:3380 pass:1876 dwarn:1 dfail:0 fail:21 skip:1481 time:9422s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7959/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
2018-02-08 17:41 [PATCH] drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it Imre Deak
` (2 preceding siblings ...)
2018-02-09 3:24 ` ✓ Fi.CI.IGT: success for " Patchwork
@ 2018-02-12 10:33 ` Jani Nikula
2018-02-12 12:01 ` Imre Deak
3 siblings, 1 reply; 10+ messages in thread
From: Jani Nikula @ 2018-02-12 10:33 UTC (permalink / raw)
To: Imre Deak, intel-gfx
On Thu, 08 Feb 2018, Imre Deak <imre.deak@intel.com> wrote:
> On BXT/GLK GEN6_PCODE_READ_RC6VIDS fails with
> MAILBOX_P24C_CC_ILLEGAL_CMD, so don't try to do the query on these
> platforms. Do it only on SNB, IVB and HSW, where we use this command
> anyway for RC6 enabling.
>
> Based on my tests the command also succeeds on all LLC platforms, but
> it's not clear if it's really supported on those (it returns 0 aka 245mv
> for all RC6 states everywhere except on SNB). BSpec lists the command as
> supported on SKL+ (see P24C_PCODE_MAILBOX_INTERFACE) but that's clearly
> incorrect, since on SKL/KBL the same command ID is used for
> SKL_PCODE_LOAD_HDCP_KEYS. Since the command fails on BXT/GLK, the BSpec
> command list is also incorrect for those platforms (see
> P_CR_P24C_PCODE_MAILBOX_INTERFACE_0_2_0_GTTMMADR).
>
> I filed a request to update that info in Bspec, but for now let's
> assume a minimal set of platforms where the command is supported.
>
> Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103337
If the patch fixes the bug, please use Bugzilla:.
If the patch is related to the bug, please use References:.
BR,
Jani.
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 24 +++++++++++++++---------
> 1 file changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 2bdce9fea671..8f9045fae3cf 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1484,9 +1484,12 @@ static int gen6_drpc_info(struct seq_file *m)
> gen9_powergate_status = I915_READ(GEN9_PWRGT_DOMAIN_STATUS);
> }
>
> - mutex_lock(&dev_priv->pcu_lock);
> - sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS, &rc6vids);
> - mutex_unlock(&dev_priv->pcu_lock);
> + if (INTEL_GEN(dev_priv) <= 7) {
> + mutex_lock(&dev_priv->pcu_lock);
> + sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS,
> + &rc6vids);
> + mutex_unlock(&dev_priv->pcu_lock);
> + }
>
> seq_printf(m, "RC1e Enabled: %s\n",
> yesno(rcctl1 & GEN6_RC_CTL_RC1e_ENABLE));
> @@ -1542,12 +1545,15 @@ static int gen6_drpc_info(struct seq_file *m)
> print_rc6_res(m, "RC6+ residency since boot:", GEN6_GT_GFX_RC6p);
> print_rc6_res(m, "RC6++ residency since boot:", GEN6_GT_GFX_RC6pp);
>
> - seq_printf(m, "RC6 voltage: %dmV\n",
> - GEN6_DECODE_RC6_VID(((rc6vids >> 0) & 0xff)));
> - seq_printf(m, "RC6+ voltage: %dmV\n",
> - GEN6_DECODE_RC6_VID(((rc6vids >> 8) & 0xff)));
> - seq_printf(m, "RC6++ voltage: %dmV\n",
> - GEN6_DECODE_RC6_VID(((rc6vids >> 16) & 0xff)));
> + if (INTEL_GEN(dev_priv) <= 7) {
> + seq_printf(m, "RC6 voltage: %dmV\n",
> + GEN6_DECODE_RC6_VID(((rc6vids >> 0) & 0xff)));
> + seq_printf(m, "RC6+ voltage: %dmV\n",
> + GEN6_DECODE_RC6_VID(((rc6vids >> 8) & 0xff)));
> + seq_printf(m, "RC6++ voltage: %dmV\n",
> + GEN6_DECODE_RC6_VID(((rc6vids >> 16) & 0xff)));
> + }
> +
> return i915_forcewake_domains(m, NULL);
> }
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
2018-02-08 18:44 ` Imre Deak
@ 2018-02-12 11:19 ` Chris Wilson
2018-02-12 11:55 ` Imre Deak
0 siblings, 1 reply; 10+ messages in thread
From: Chris Wilson @ 2018-02-12 11:19 UTC (permalink / raw)
To: imre.deak; +Cc: intel-gfx
Quoting Imre Deak (2018-02-08 18:44:41)
> On Thu, Feb 08, 2018 at 06:33:03PM +0000, Chris Wilson wrote:
> > Quoting Imre Deak (2018-02-08 17:41:02)
> > > On BXT/GLK GEN6_PCODE_READ_RC6VIDS fails with
> > > MAILBOX_P24C_CC_ILLEGAL_CMD, so don't try to do the query on these
> > > platforms. Do it only on SNB, IVB and HSW, where we use this command
> > > anyway for RC6 enabling.
> > >
> > > Based on my tests the command also succeeds on all LLC platforms, but
> > > it's not clear if it's really supported on those (it returns 0 aka 245mv
> > > for all RC6 states everywhere except on SNB). BSpec lists the command as
> > > supported on SKL+ (see P24C_PCODE_MAILBOX_INTERFACE) but that's clearly
> > > incorrect, since on SKL/KBL the same command ID is used for
> > > SKL_PCODE_LOAD_HDCP_KEYS. Since the command fails on BXT/GLK, the BSpec
> > > command list is also incorrect for those platforms (see
> > > P_CR_P24C_PCODE_MAILBOX_INTERFACE_0_2_0_GTTMMADR).
> > >
> > > I filed a request to update that info in Bspec, but for now let's
> > > assume a minimal set of platforms where the command is supported.
> > >
> > > Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103337
> > > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > > ---
> > > drivers/gpu/drm/i915/i915_debugfs.c | 24 +++++++++++++++---------
> > > 1 file changed, 15 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > > index 2bdce9fea671..8f9045fae3cf 100644
> > > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > > @@ -1484,9 +1484,12 @@ static int gen6_drpc_info(struct seq_file *m)
> > > gen9_powergate_status = I915_READ(GEN9_PWRGT_DOMAIN_STATUS);
> > > }
> > >
> > > - mutex_lock(&dev_priv->pcu_lock);
> > > - sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS, &rc6vids);
> > > - mutex_unlock(&dev_priv->pcu_lock);
> > > + if (INTEL_GEN(dev_priv) <= 7) {
> > > + mutex_lock(&dev_priv->pcu_lock);
> > > + sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS,
> > > + &rc6vids);
> > > + mutex_unlock(&dev_priv->pcu_lock);
> > > + }
> > >
> > > seq_printf(m, "RC1e Enabled: %s\n",
> > > yesno(rcctl1 & GEN6_RC_CTL_RC1e_ENABLE));
> > > @@ -1542,12 +1545,15 @@ static int gen6_drpc_info(struct seq_file *m)
> > > print_rc6_res(m, "RC6+ residency since boot:", GEN6_GT_GFX_RC6p);
> > > print_rc6_res(m, "RC6++ residency since boot:", GEN6_GT_GFX_RC6pp);
> > >
> > > - seq_printf(m, "RC6 voltage: %dmV\n",
> > > - GEN6_DECODE_RC6_VID(((rc6vids >> 0) & 0xff)));
> > > - seq_printf(m, "RC6+ voltage: %dmV\n",
> > > - GEN6_DECODE_RC6_VID(((rc6vids >> 8) & 0xff)));
> > > - seq_printf(m, "RC6++ voltage: %dmV\n",
> > > - GEN6_DECODE_RC6_VID(((rc6vids >> 16) & 0xff)));
> > > + if (INTEL_GEN(dev_priv) <= 7) {
> >
> > I expect this will confuse gcc-4.4 and it will emit a
> > maybe-used-uninitialised. I would set rc6vids=0 and then test if
> > (rc6vids) here.
>
> It's inited already to 0, so shouldn't warn. (0 is a valid value
> otherwise).
(Valid but not validated ;)
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
2018-02-12 11:19 ` Chris Wilson
@ 2018-02-12 11:55 ` Imre Deak
0 siblings, 0 replies; 10+ messages in thread
From: Imre Deak @ 2018-02-12 11:55 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Mon, Feb 12, 2018 at 11:19:09AM +0000, Chris Wilson wrote:
> Quoting Imre Deak (2018-02-08 18:44:41)
> > On Thu, Feb 08, 2018 at 06:33:03PM +0000, Chris Wilson wrote:
> > > Quoting Imre Deak (2018-02-08 17:41:02)
> > > > On BXT/GLK GEN6_PCODE_READ_RC6VIDS fails with
> > > > MAILBOX_P24C_CC_ILLEGAL_CMD, so don't try to do the query on these
> > > > platforms. Do it only on SNB, IVB and HSW, where we use this command
> > > > anyway for RC6 enabling.
> > > >
> > > > Based on my tests the command also succeeds on all LLC platforms, but
> > > > it's not clear if it's really supported on those (it returns 0 aka 245mv
> > > > for all RC6 states everywhere except on SNB). BSpec lists the command as
> > > > supported on SKL+ (see P24C_PCODE_MAILBOX_INTERFACE) but that's clearly
> > > > incorrect, since on SKL/KBL the same command ID is used for
> > > > SKL_PCODE_LOAD_HDCP_KEYS. Since the command fails on BXT/GLK, the BSpec
> > > > command list is also incorrect for those platforms (see
> > > > P_CR_P24C_PCODE_MAILBOX_INTERFACE_0_2_0_GTTMMADR).
> > > >
> > > > I filed a request to update that info in Bspec, but for now let's
> > > > assume a minimal set of platforms where the command is supported.
> > > >
> > > > Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103337
> > > > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > > > ---
> > > > drivers/gpu/drm/i915/i915_debugfs.c | 24 +++++++++++++++---------
> > > > 1 file changed, 15 insertions(+), 9 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > > > index 2bdce9fea671..8f9045fae3cf 100644
> > > > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > > > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > > > @@ -1484,9 +1484,12 @@ static int gen6_drpc_info(struct seq_file *m)
> > > > gen9_powergate_status = I915_READ(GEN9_PWRGT_DOMAIN_STATUS);
> > > > }
> > > >
> > > > - mutex_lock(&dev_priv->pcu_lock);
> > > > - sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS, &rc6vids);
> > > > - mutex_unlock(&dev_priv->pcu_lock);
> > > > + if (INTEL_GEN(dev_priv) <= 7) {
> > > > + mutex_lock(&dev_priv->pcu_lock);
> > > > + sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS,
> > > > + &rc6vids);
> > > > + mutex_unlock(&dev_priv->pcu_lock);
> > > > + }
> > > >
> > > > seq_printf(m, "RC1e Enabled: %s\n",
> > > > yesno(rcctl1 & GEN6_RC_CTL_RC1e_ENABLE));
> > > > @@ -1542,12 +1545,15 @@ static int gen6_drpc_info(struct seq_file *m)
> > > > print_rc6_res(m, "RC6+ residency since boot:", GEN6_GT_GFX_RC6p);
> > > > print_rc6_res(m, "RC6++ residency since boot:", GEN6_GT_GFX_RC6pp);
> > > >
> > > > - seq_printf(m, "RC6 voltage: %dmV\n",
> > > > - GEN6_DECODE_RC6_VID(((rc6vids >> 0) & 0xff)));
> > > > - seq_printf(m, "RC6+ voltage: %dmV\n",
> > > > - GEN6_DECODE_RC6_VID(((rc6vids >> 8) & 0xff)));
> > > > - seq_printf(m, "RC6++ voltage: %dmV\n",
> > > > - GEN6_DECODE_RC6_VID(((rc6vids >> 16) & 0xff)));
> > > > + if (INTEL_GEN(dev_priv) <= 7) {
> > >
> > > I expect this will confuse gcc-4.4 and it will emit a
> > > maybe-used-uninitialised. I would set rc6vids=0 and then test if
> > > (rc6vids) here.
> >
> > It's inited already to 0, so shouldn't warn. (0 is a valid value
> > otherwise).
>
> (Valid but not validated ;)
True, so we don't know if the platforms returning 0 (with the PCODE
command otherwise succeeding) return an actually correct value. Checking
again it's only SNB where we use the value (so not even IVB/HSW) and
that's the only one returning a non-zero value. I hope someone will
follow-up on my bspec update request and clarify this.
>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> -Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
2018-02-12 10:33 ` [PATCH] " Jani Nikula
@ 2018-02-12 12:01 ` Imre Deak
0 siblings, 0 replies; 10+ messages in thread
From: Imre Deak @ 2018-02-12 12:01 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Mon, Feb 12, 2018 at 12:33:57PM +0200, Jani Nikula wrote:
> On Thu, 08 Feb 2018, Imre Deak <imre.deak@intel.com> wrote:
> > On BXT/GLK GEN6_PCODE_READ_RC6VIDS fails with
> > MAILBOX_P24C_CC_ILLEGAL_CMD, so don't try to do the query on these
> > platforms. Do it only on SNB, IVB and HSW, where we use this command
> > anyway for RC6 enabling.
> >
> > Based on my tests the command also succeeds on all LLC platforms, but
> > it's not clear if it's really supported on those (it returns 0 aka 245mv
> > for all RC6 states everywhere except on SNB). BSpec lists the command as
> > supported on SKL+ (see P24C_PCODE_MAILBOX_INTERFACE) but that's clearly
> > incorrect, since on SKL/KBL the same command ID is used for
> > SKL_PCODE_LOAD_HDCP_KEYS. Since the command fails on BXT/GLK, the BSpec
> > command list is also incorrect for those platforms (see
> > P_CR_P24C_PCODE_MAILBOX_INTERFACE_0_2_0_GTTMMADR).
> >
> > I filed a request to update that info in Bspec, but for now let's
> > assume a minimal set of platforms where the command is supported.
> >
> > Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103337
>
> If the patch fixes the bug, please use Bugzilla:.
>
> If the patch is related to the bug, please use References:.
It fixes a bug reported in that bug, but there are multiple issues
included in the report. So I suppose References: is the correct tag
then.
>
>
> BR,
> Jani.
>
>
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_debugfs.c | 24 +++++++++++++++---------
> > 1 file changed, 15 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > index 2bdce9fea671..8f9045fae3cf 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -1484,9 +1484,12 @@ static int gen6_drpc_info(struct seq_file *m)
> > gen9_powergate_status = I915_READ(GEN9_PWRGT_DOMAIN_STATUS);
> > }
> >
> > - mutex_lock(&dev_priv->pcu_lock);
> > - sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS, &rc6vids);
> > - mutex_unlock(&dev_priv->pcu_lock);
> > + if (INTEL_GEN(dev_priv) <= 7) {
> > + mutex_lock(&dev_priv->pcu_lock);
> > + sandybridge_pcode_read(dev_priv, GEN6_PCODE_READ_RC6VIDS,
> > + &rc6vids);
> > + mutex_unlock(&dev_priv->pcu_lock);
> > + }
> >
> > seq_printf(m, "RC1e Enabled: %s\n",
> > yesno(rcctl1 & GEN6_RC_CTL_RC1e_ENABLE));
> > @@ -1542,12 +1545,15 @@ static int gen6_drpc_info(struct seq_file *m)
> > print_rc6_res(m, "RC6+ residency since boot:", GEN6_GT_GFX_RC6p);
> > print_rc6_res(m, "RC6++ residency since boot:", GEN6_GT_GFX_RC6pp);
> >
> > - seq_printf(m, "RC6 voltage: %dmV\n",
> > - GEN6_DECODE_RC6_VID(((rc6vids >> 0) & 0xff)));
> > - seq_printf(m, "RC6+ voltage: %dmV\n",
> > - GEN6_DECODE_RC6_VID(((rc6vids >> 8) & 0xff)));
> > - seq_printf(m, "RC6++ voltage: %dmV\n",
> > - GEN6_DECODE_RC6_VID(((rc6vids >> 16) & 0xff)));
> > + if (INTEL_GEN(dev_priv) <= 7) {
> > + seq_printf(m, "RC6 voltage: %dmV\n",
> > + GEN6_DECODE_RC6_VID(((rc6vids >> 0) & 0xff)));
> > + seq_printf(m, "RC6+ voltage: %dmV\n",
> > + GEN6_DECODE_RC6_VID(((rc6vids >> 8) & 0xff)));
> > + seq_printf(m, "RC6++ voltage: %dmV\n",
> > + GEN6_DECODE_RC6_VID(((rc6vids >> 16) & 0xff)));
> > + }
> > +
> > return i915_forcewake_domains(m, NULL);
> > }
>
> --
> Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: ✓ Fi.CI.IGT: success for drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
2018-02-09 3:24 ` ✓ Fi.CI.IGT: success for " Patchwork
@ 2018-02-12 15:41 ` Imre Deak
0 siblings, 0 replies; 10+ messages in thread
From: Imre Deak @ 2018-02-12 15:41 UTC (permalink / raw)
To: intel-gfx, Chris Wilson, Jani Nikula
On Fri, Feb 09, 2018 at 03:24:28AM +0000, Patchwork wrote:
> == Series Details ==
>
> Series: drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it
> URL : https://patchwork.freedesktop.org/series/37936/
> State : success
Pushed it to -dinq with the s/Reference:/References:/ change. Thanks for
the review.
>
> == Summary ==
>
> Test kms_cursor_crc:
> Subgroup cursor-64x64-offscreen:
> skip -> PASS (shard-apl)
> Test gem_exec_suspend:
> Subgroup basic-s4:
> skip -> FAIL (shard-snb) fdo#103375
> Test drv_suspend:
> Subgroup debugfs-reader:
> skip -> PASS (shard-snb) fdo#102365 +1
> Test gem_eio:
> Subgroup in-flight-contexts:
> pass -> FAIL (shard-hsw) fdo#104676 +1
> Test kms_sysfs_edid_timing:
> warn -> PASS (shard-apl) fdo#100047
> Test kms_flip:
> Subgroup 2x-plain-flip-fb-recreate-interruptible:
> fail -> PASS (shard-hsw)
> Test kms_frontbuffer_tracking:
> Subgroup fbc-1p-primscrn-cur-indfb-draw-mmap-gtt:
> pass -> FAIL (shard-apl) fdo#101623
> Test perf_pmu:
> Subgroup semaphore-wait-idle-bcs0:
> fail -> PASS (shard-apl) fdo#105011
> Test kms_cursor_legacy:
> Subgroup cursor-vs-flip-legacy:
> fail -> PASS (shard-apl) fdo#103355
> Test kms_plane:
> Subgroup plane-panning-bottom-right-suspend-pipe-b-planes:
> pass -> SKIP (shard-hsw) fdo#103540
>
> fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
> fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
> fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
> fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
> fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
> fdo#105011 https://bugs.freedesktop.org/show_bug.cgi?id=105011
> fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
> fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
>
> shard-apl total:3354 pass:1738 dwarn:1 dfail:0 fail:20 skip:1594 time:12341s
> shard-hsw total:3444 pass:1759 dwarn:1 dfail:0 fail:11 skip:1672 time:11773s
> shard-snb total:3444 pass:1350 dwarn:1 dfail:0 fail:11 skip:2082 time:6581s
> Blacklisted hosts:
> shard-kbl total:3380 pass:1876 dwarn:1 dfail:0 fail:21 skip:1481 time:9422s
>
> == Logs ==
>
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7959/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-02-12 15:42 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-08 17:41 [PATCH] drm/i915: Don't query PCODE RC6VIDS on platforms not supporting it Imre Deak
2018-02-08 18:30 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-02-08 18:33 ` [PATCH] " Chris Wilson
2018-02-08 18:44 ` Imre Deak
2018-02-12 11:19 ` Chris Wilson
2018-02-12 11:55 ` Imre Deak
2018-02-09 3:24 ` ✓ Fi.CI.IGT: success for " Patchwork
2018-02-12 15:41 ` Imre Deak
2018-02-12 10:33 ` [PATCH] " Jani Nikula
2018-02-12 12:01 ` Imre Deak
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.