Skip to contentSkip to conversation

drm/i915/snb+: Remove incorrect forcewake check in debugfs/i915_drpc_info

PATCH In review Imre Deak 4 participants 6 messages Feb 8, 2018 – Feb 9, 2018

Subsystems (2)
lore
Share & tools
lore

Imre Deak

author
#0 lore raw

PATCH 1/1 drm/i915/snb+: Remove incorrect forcewake check in debugfs/i915_drpc_info

FORCEWAKE_ACK is depricated by BSpec at least starting from BDW, referring to the multi-threaded version of it instead. Accessing FORCEWAKE_ACK triggers an unclaimed register access error - at least on GLK - see the Reference: below.

The correct registers to use would be FORCEWAKE_MT_ACK on IVB+ and FORCEWAKE_ACK_RENDER_GEN9 on SKL+ like it's done elsewhere in the driver.

The forcewake check itself is inconsistent and redundant, since there could be other forcewake requesters besides the kernel (being the multithreaded version of the register) and the kernel's per-domain forcewake counters are shown anyway at the end of the file. So let's just remove the check.

Cc Ville Syrjälä <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Mika Kuoppala <[email protected]>

Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103337

---
 drivers/gpu/drm/i915/i915_debugfs.c | 13 -------------
 1 file changed, 13 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +0 -13
index 2bdce9fea671..eff5548ec093 100644
@@ -1461,19 +1461,6 @@ static int gen6_drpc_info(struct seq_file *m)
 	struct drm_i915_private *dev_priv = node_to_i915(m->private);
 	u32 gt_core_status, rcctl1, rc6vids = 0;
 	u32 gen9_powergate_enable = 0, gen9_powergate_status = 0;
-	unsigned forcewake_count;
-	int count = 0;
-
-	forcewake_count = READ_ONCE(dev_priv->uncore.fw_domain[FW_DOMAIN_ID_RENDER].wake_count);
-	if (forcewake_count) {
-		seq_puts(m, "RC information inaccurate because somebody "
-			    "holds a forcewake reference \n");
-	} else {
-		/* NB: we cannot use forcewake, else we read the wrong values */
-		while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_ACK) & 1))
-			udelay(10);
-		seq_printf(m, "RC information accurate: %s\n", yesno(count < 51));
-	}
 
 	gt_core_status = I915_READ_FW(GEN6_GT_CORE_STATUS);
 	trace_i915_reg_rw(false, GEN6_GT_CORE_STATUS, gt_core_status, 4, true);
Signature · 6 lines
2.13.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw

Quoting Imre Deak (2018-02-08 11:23:31)

Quoted 15 lines

FORCEWAKE_ACK is depricated by BSpec at least starting from BDW, referring to the multi-threaded version of it instead. Accessing FORCEWAKE_ACK triggers an unclaimed register access error - at least on GLK - see the Reference: below.

The correct registers to use would be FORCEWAKE_MT_ACK on IVB+ and FORCEWAKE_ACK_RENDER_GEN9 on SKL+ like it's done elsewhere in the driver.

The forcewake check itself is inconsistent and redundant, since there could be other forcewake requesters besides the kernel (being the multithreaded version of the register) and the kernel's per-domain forcewake counters are shown anyway at the end of the file. So let's just remove the check.

Quoted 6 lines
Cc Ville Syrjälä <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Mika Kuoppala <[email protected]>

Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103337

Works for me,

-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.BAT: success for drm/i915/snb+: Remove incorrect forcewake check in debugfs/i915_drpc_info

In reply to Imre Deak
== Series Details ==

== Series Details ==

Series: drm/i915/snb+: Remove incorrect forcewake check in debugfs/i915_drpc_info
URL : https://patchwork.freedesktop.org/series/37901/
State : success

== Summary ==

Series 37901v1 drm/i915/snb+: Remove incorrect forcewake check in debugfs/i915_drpc_info
https://patchwork.freedesktop.org/api/1.0/series/37901/revisions/1/mbox/

Test gem_exec_suspend:

        Subgroup basic-s3:
                dmesg-warn -> PASS       (fi-skl-6700k2) fdo#104108
Test kms_chamelium:
        Subgroup dp-crc-fast:
                pass       -> DMESG-FAIL (fi-kbl-7500u) fdo#103841
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713
        Subgroup suspend-read-crc-pipe-c:
                pass       -> DMESG-WARN (fi-cnl-y3) fdo#104951

fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
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:416s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:428s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:375s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:496s
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:479s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:480s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:467s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:455s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:566s
fi-cnl-y3        total:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  time:586s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:418s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:284s
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:447s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:414s
fi-kbl-7500u     total:288  pass:262  dwarn:1   dfail:1   fail:0   skip:24  time:459s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:499s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:454s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:503s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:598s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:428s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:510s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:524s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:482s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:488s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:415s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:427s
fi-snb-2520m     total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:394s

Blacklisted hosts:
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:462s

7e8e10600ecdf464aa7463c0142b82c063eb04c8 drm-tip: 2018y-02m-08d-11h-45m-09s UTC integration manifest 55e1ea3abc0a drm/i915/snb+: Remove incorrect forcewake check in debugfs/i915_drpc_info

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7950/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Tested-by on v1 1/1
#3 lore raw
In reply to Imre Deak
Quoted 15 lines · Imre Deak

FORCEWAKE_ACK is depricated by BSpec at least starting from BDW, referring to the multi-threaded version of it instead. Accessing FORCEWAKE_ACK triggers an unclaimed register access error - at least on GLK - see the Reference: below.

The correct registers to use would be FORCEWAKE_MT_ACK on IVB+ and FORCEWAKE_ACK_RENDER_GEN9 on SKL+ like it's done elsewhere in the driver.

The forcewake check itself is inconsistent and redundant, since there could be other forcewake requesters besides the kernel (being the multithreaded version of the register) and the kernel's per-domain forcewake counters are shown anyway at the end of the file. So let's just remove the check.

Quoted 6 lines
Cc Ville Syrjälä <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Mika Kuoppala <[email protected]>

Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103337

On CNL.

Quoted 18 lines
---
  drivers/gpu/drm/i915/i915_debugfs.c | 13 -------------
  1 file changed, 13 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +0 -6
index 2bdce9fea671..eff5548ec093 100644
@@ -1461,19 +1461,6 @@ static int gen6_drpc_info(struct seq_file *m)
  	struct drm_i915_private *dev_priv = node_to_i915(m->private);
  	u32 gt_core_status, rcctl1, rc6vids = 0;
  	u32 gen9_powergate_enable = 0, gen9_powergate_status = 0;
-	unsigned forcewake_count;
-	int count = 0;
-
-	forcewake_count = READ_ONCE(dev_priv->uncore.fw_domain[FW_DOMAIN_ID_RENDER].wake_count);
-	if (forcewake_count) {
-		seq_puts(m, "RC information inaccurate because somebody "

drivers/gpu/drm/i915/i915_debugfs.c static int gen6_drpc_info(struct seq_file *m) · line 1466

Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +0 -7
-			    "holds a forcewake reference \n");
-	} else {
-		/* NB: we cannot use forcewake, else we read the wrong values */
-		while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_ACK) & 1))
-			udelay(10);
-		seq_printf(m, "RC information accurate: %s\n", yesno(count < 51));
-	}
 
  	gt_core_status = I915_READ_FW(GEN6_GT_CORE_STATUS);
  	trace_i915_reg_rw(false, GEN6_GT_CORE_STATUS, gt_core_status, 4, true);

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

✗ Fi.CI.IGT: warning for drm/i915/snb+: Remove incorrect forcewake check in debugfs/i915_drpc_info

In reply to Imre Deak
== Series Details ==

== Series Details ==

Series: drm/i915/snb+: Remove incorrect forcewake check in debugfs/i915_drpc_info
URL : https://patchwork.freedesktop.org/series/37901/
State : warning

== Summary ==

Test kms_flip:

        Subgroup basic-flip-vs-modeset:
                pass       -> DMESG-WARN (shard-hsw) fdo#102614
Test gem_eio:
        Subgroup in-flight:
                fail       -> PASS       (shard-hsw) fdo#104676
Test kms_cursor_legacy:
        Subgroup cursor-vs-flip-legacy:
                pass       -> FAIL       (shard-apl) fdo#103355
Test kms_plane_lowres:
        Subgroup pipe-b-tiling-none:
                pass       -> FAIL       (shard-apl) fdo#103166
Test gem_exec_suspend:
        Subgroup basic-s4:
                fail       -> SKIP       (shard-snb) fdo#103375
Test kms_atomic_interruptible:
        Subgroup universal-setplane-primary:
                pass       -> SKIP       (shard-snb)

fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375

shard-apl        total:3354 pass:1737 dwarn:1   dfail:0   fail:21  skip:1594 time:12306s
shard-hsw        total:3444 pass:1760 dwarn:2   dfail:0   fail:10  skip:1671 time:11820s
shard-snb        total:3444 pass:1350 dwarn:1   dfail:0   fail:9   skip:2084 time:6612s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7950/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#5 lore raw

Re: ✗ Fi.CI.IGT: warning for drm/i915/snb+: Remove incorrect forcewake check in debugfs/i915_drpc_info

Quoted 5 lines · Patchwork

== Series Details ==

Series: drm/i915/snb+: Remove incorrect forcewake check in debugfs/i915_drpc_info
URL : https://patchwork.freedesktop.org/series/37901/
State : warning

The warn is unrelated to the change see below.

Thanks for the review and testing I pushed the patch to -dinq.

--Imre

Quoted 13 lines

== Summary ==

Test kms_flip:

        Subgroup basic-flip-vs-modeset:
                pass       -> DMESG-WARN (shard-hsw) fdo#102614
Test gem_eio:
        Subgroup in-flight:
                fail       -> PASS       (shard-hsw) fdo#104676
Test kms_cursor_legacy:
        Subgroup cursor-vs-flip-legacy:
                pass       -> FAIL       (shard-apl) fdo#103355

Test kms_plane_lowres:

Quoted 8 lines
        Subgroup pipe-b-tiling-none:
                pass       -> FAIL       (shard-apl) fdo#103166
Test gem_exec_suspend:
        Subgroup basic-s4:
                fail       -> SKIP       (shard-snb) fdo#103375
Test kms_atomic_interruptible:
        Subgroup universal-setplane-primary:
                pass       -> SKIP       (shard-snb)

"No valid crtc/connector combinations found."

The only tests accessing i915_drpc_info is debugfs_tests/read_all_entries and drv_suspend/debugfs-reader* which weren't run before the above skip.

Quoted 7 lines

fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375

Quoted 7 lines
shard-apl        total:3354 pass:1737 dwarn:1   dfail:0   fail:21  skip:1594 time:12306s
shard-hsw        total:3444 pass:1760 dwarn:2   dfail:0   fail:10  skip:1671 time:11820s
shard-snb        total:3444 pass:1350 dwarn:1   dfail:0   fail:9   skip:2084 time:6612s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7950/shards.html

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx