Skip to contentSkip to conversation

drm/i915: Update forcewake ack register used in debugfs

PATCH In review Oscar Mateo 3 participants 4 messages Dec 22, 2017 – Dec 23, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Update forcewake ack register used in debugfs

Different GENs have a different ACK register. Use the correct one for each case.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_debugfs.c +14 -1
index e968aea..36f40ab 100644
@@ -1465,8 +1465,21 @@ static int gen6_drpc_info(struct seq_file *m)
 		seq_puts(m, "RC information inaccurate because somebody "
 			    "holds a forcewake reference \n");
 	} else {
+		i915_reg_t reg_ack;
+
+		if (INTEL_GEN(dev_priv) >= 9)
+			reg_ack = FORCEWAKE_ACK_RENDER_GEN9;
+		else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
+			reg_ack = FORCEWAKE_ACK_VLV;
+		else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
+			reg_ack = FORCEWAKE_ACK_HSW;
+		else if (IS_IVYBRIDGE(dev_priv))
+			reg_ack = FORCEWAKE_MT_ACK;
+		else
+			reg_ack = FORCEWAKE_ACK;
+
 		/* NB: we cannot use forcewake, else we read the wrong values */
-		while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_ACK) & 1))
+		while (count++ < 50 && (I915_READ_NOTRACE(reg_ack) & 1))
 			udelay(10);
 		seq_printf(m, "RC information accurate: %s\n", yesno(count < 51));
 	}
Signature · 6 lines
1.9.1

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

Quoting Oscar Mateo (2017-12-22 22:10:00)

Quoted 26 lines

Different GENs have a different ACK register. Use the correct one for each case.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_debugfs.c +8 -0
index e968aea..36f40ab 100644
@@ -1465,8 +1465,21 @@ static int gen6_drpc_info(struct seq_file *m)
                seq_puts(m, "RC information inaccurate because somebody "
                            "holds a forcewake reference \n");
        } else {
+               i915_reg_t reg_ack;
+
+               if (INTEL_GEN(dev_priv) >= 9)
+                       reg_ack = FORCEWAKE_ACK_RENDER_GEN9;
+               else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
+                       reg_ack = FORCEWAKE_ACK_VLV;
+               else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
+                       reg_ack = FORCEWAKE_ACK_HSW;

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

Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +6 -1
+               else if (IS_IVYBRIDGE(dev_priv))
+                       reg_ack = FORCEWAKE_MT_ACK;
+               else
+                       reg_ack = FORCEWAKE_ACK;
+
                /* NB: we cannot use forcewake, else we read the wrong values */
-               while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_ACK) & 1))
+               while (count++ < 50 && (I915_READ_NOTRACE(reg_ack) & 1))
                        udelay(10);
                seq_printf(m, "RC information accurate: %s\n", yesno(count < 51));

Just delete the code. It's telling us whether we have forcewake enabled, which is the same as what the status register will tell us. Since it doesn't lock out fw anyway, it is worse than useless as it is misleading.

Note that information will be more interesting over in i915_forcewake_domains().
-Chris
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

Quoting Chris Wilson (2017-12-22 22:19:01)

Quoted 34 lines

Quoting Oscar Mateo (2017-12-22 22:10:00)

Quoted 33 lines

Different GENs have a different ACK register. Use the correct one for each case.

---
 drivers/gpu/drm/i915/i915_debugfs.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_debugfs.c +13 -1
index e968aea..36f40ab 100644
@@ -1465,8 +1465,21 @@ static int gen6_drpc_info(struct seq_file *m)
                seq_puts(m, "RC information inaccurate because somebody "
                            "holds a forcewake reference \n");
        } else {
+               i915_reg_t reg_ack;
+
+               if (INTEL_GEN(dev_priv) >= 9)
+                       reg_ack = FORCEWAKE_ACK_RENDER_GEN9;
+               else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
+                       reg_ack = FORCEWAKE_ACK_VLV;
+               else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
+                       reg_ack = FORCEWAKE_ACK_HSW;
+               else if (IS_IVYBRIDGE(dev_priv))
+                       reg_ack = FORCEWAKE_MT_ACK;
+               else
+                       reg_ack = FORCEWAKE_ACK;
+
                /* NB: we cannot use forcewake, else we read the wrong values */
-               while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_ACK) & 1))
Quoted 8 lines

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

Quoted 3 lines
drivers/gpu/drm/i915/i915_debugfs.c +1 -0
+               while (count++ < 50 && (I915_READ_NOTRACE(reg_ack) & 1))
                        udelay(10);
                seq_printf(m, "RC information accurate: %s\n", yesno(count < 51));

Just delete the code. It's telling us whether we have forcewake enabled, which is the same as what the status register will tell us. Since it doesn't lock out fw anyway, it is worse than useless as it is misleading.

Further to the argument of just delete it, we aren't even checking the right bits for MT forcewake (for the "accurate" picture). -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

✗ Fi.CI.BAT: failure for drm/i915: Update forcewake ack register used in debugfs

In reply to Oscar Mateo
== Series Details ==

== Series Details ==

Series: drm/i915: Update forcewake ack register used in debugfs
URL : https://patchwork.freedesktop.org/series/35742/
State : failure

== Summary ==

Series 35742v1 drm/i915: Update forcewake ack register used in debugfs
https://patchwork.freedesktop.org/api/1.0/series/35742/revisions/1/mbox/

Test debugfs_test:

        Subgroup read_all_entries:
                dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_sync:
        Subgroup basic-all:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-each:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-many-each:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-store-all:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-store-each:
                skip       -> PASS       (fi-pnv-d510)
Test gem_tiled_blits:
        Subgroup basic:
                skip       -> PASS       (fi-pnv-d510)
Test gem_tiled_fence_blits:
        Subgroup basic:
                skip       -> PASS       (fi-pnv-d510)
Test gem_wait:
        Subgroup basic-busy-all:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-wait-all:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-await-all:
                skip       -> PASS       (fi-pnv-d510)
Test kms_busy:
        Subgroup basic-flip-a:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-flip-b:
                skip       -> PASS       (fi-pnv-d510)
Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-legacy:
                skip       -> PASS       (fi-pnv-d510)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                pass       -> DMESG-WARN (fi-kbl-r) fdo#104172 +1
        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713
                pass       -> INCOMPLETE (fi-bdw-5557u)
Test kms_psr_sink_crc:
        Subgroup psr_basic:
                pass       -> DMESG-WARN (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u     total:245  pass:227  dwarn:0   dfail:0   fail:0   skip:17 
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:447s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:383s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:495s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:276s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:490s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:496s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:482s
fi-elk-e7500     total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:262s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:528s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:402s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:413s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:478s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:427s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:473s
fi-kbl-7560u     total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  time:522s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:472s
fi-kbl-r         total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:519s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:578s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:443s
fi-skl-6600u     total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:536s
fi-skl-6700hq    total:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  time:558s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:505s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:502s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:434s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:548s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:406s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:587s
fi-glk-dsi       total:288  pass:257  dwarn:1   dfail:0   fail:0   skip:30  time:480s

fi-byt-n2820 failed to collect. IGT log at Patchwork_7575/fi-byt-n2820/igt.log

7223e9864a303d6401054b0815acb5262726adf8 drm-tip: 2017y-12m-22d-21h-51m-04s UTC integration manifest 06e2f90edb54 drm/i915: Update forcewake ack register used in debugfs

== Logs ==

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