Skip to contentSkip to conversation

drm/i915: Add GuC support for engine busy stats

PATCH In review Tvrtko Ursulin 4 participants 8 messages Nov 29, 2017 – Dec 22, 2017

Subsystems (2)
lore
Share & tools
lore

Tvrtko Ursulin

author maintainer
#0 lore raw

PATCH 1/2 drm/i915: Add GuC support for engine busy stats

From: Tvrtko Ursulin <[email protected]>

Wire up the engine busy stats accounting to the GuC submission backend.

Since there is not context out interrupt we need to place the accounting callbacks per-request in order to correctly pair with user interrupts.

v2: Rebase.
v3: Commit update.

---
 drivers/gpu/drm/i915/intel_guc_submission.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_guc_submission.c +2 -2
index 912ff143d531..d80d2a3214da 100644
@@ -781,6 +781,7 @@ static void guc_dequeue(struct intel_engine_cs *engine)
 			INIT_LIST_HEAD(&rq->priotree.link);
 
 			__i915_gem_request_submit(rq);
+			intel_engine_context_in(rq->engine);
 			trace_i915_gem_request_in(rq,
 						  port_index(port, execlists));
 			last = rq;
@@ -813,6 +814,7 @@ static void guc_submission_tasklet(unsigned long data)
 
 	rq = port_request(&port[0]);
 	while (rq && i915_gem_request_completed(rq)) {
+		intel_engine_context_out(rq->engine);
 		trace_i915_gem_request_out(rq);
 		i915_gem_request_put(rq);
 
@@ -1453,8 +1455,6 @@ int intel_guc_submission_enable(struct intel_guc *guc)
 		execlists->tasklet.func = guc_submission_tasklet;
 		engine->park = guc_submission_park;
 		engine->unpark = guc_submission_unpark;
-
-		engine->flags &= ~I915_ENGINE_SUPPORTS_STATS;
 	}
 
 	return 0;
Signature · 6 lines
2.14.1

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

PATCH 2/2 drm/i915: HACK enable GuC for testing

From: Tvrtko Ursulin <[email protected]>

---
 drivers/gpu/drm/i915/i915_params.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_params.h +2 -2
index 8321bd86cba5..69ee2484c6bb 100644
@@ -42,8 +42,8 @@
 	param(int, disable_power_well, -1) \
 	param(int, enable_ips, 1) \
 	param(int, invert_brightness, 0) \
-	param(int, enable_guc_loading, 0) \
-	param(int, enable_guc_submission, 0) \
+	param(int, enable_guc_loading, 1) \
+	param(int, enable_guc_submission, 1) \
 	param(int, guc_log_level, -1) \
 	param(char *, guc_firmware_path, NULL) \
 	param(char *, huc_firmware_path, NULL) \
Signature · 6 lines
2.14.1

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

✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Add GuC support for engine busy stats

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/i915: Add GuC support for engine busy stats
URL : https://patchwork.freedesktop.org/series/34617/
State : failure

== Summary ==

Series 34617v1 series starting with [1/2] drm/i915: Add GuC support for engine busy stats
https://patchwork.freedesktop.org/api/1.0/series/34617/revisions/1/mbox/

Test debugfs_test:

        Subgroup read_all_entries:
                pass       -> DMESG-WARN (fi-skl-6260u)
                pass       -> DMESG-WARN (fi-skl-6600u)
                pass       -> DMESG-WARN (fi-skl-6700hq)
                pass       -> DMESG-WARN (fi-skl-6700k)
                pass       -> DMESG-WARN (fi-skl-6770hq)
                pass       -> DMESG-WARN (fi-skl-gvtdvm)
                pass       -> DMESG-WARN (fi-bxt-dsi)
                pass       -> DMESG-WARN (fi-bxt-j4205)
                pass       -> DMESG-WARN (fi-kbl-7500u) fdo#103285
                pass       -> DMESG-WARN (fi-kbl-7560u)
                pass       -> DMESG-WARN (fi-kbl-7567u)
                pass       -> DMESG-WARN (fi-kbl-r)
                pass       -> DMESG-WARN (fi-glk-1)
Test gem_exec_suspend:
        Subgroup basic-s3:
                pass       -> INCOMPLETE (fi-skl-6260u)
                pass       -> INCOMPLETE (fi-skl-6600u)
                pass       -> INCOMPLETE (fi-skl-6700hq)
                pass       -> INCOMPLETE (fi-skl-6700k)
                pass       -> INCOMPLETE (fi-skl-6770hq)
                pass       -> INCOMPLETE (fi-skl-gvtdvm)
                pass       -> INCOMPLETE (fi-bxt-dsi)
                pass       -> INCOMPLETE (fi-bxt-j4205)
                pass       -> INCOMPLETE (fi-kbl-7500u)
                pass       -> INCOMPLETE (fi-kbl-7560u)
                pass       -> INCOMPLETE (fi-kbl-7567u)
                pass       -> INCOMPLETE (fi-kbl-r)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#103285 https://bugs.freedesktop.org/show_bug.cgi?id=103285
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:439s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:381s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:505s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:280s
fi-bxt-dsi       total:108  pass:94   dwarn:1   dfail:0   fail:0   skip:12 
fi-bxt-j4205     total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:485s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:478s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:424s
fi-glk-1         total:288  pass:259  dwarn:1   dfail:0   fail:0   skip:28  time:523s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:374s
fi-hsw-4770r     total:288  pass:224  dwarn:0   dfail:0   fail:0   skip:64  time:270s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:479s
fi-kbl-7500u     total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-kbl-7560u     total:108  pass:103  dwarn:1   dfail:0   fail:0   skip:3  
fi-kbl-7567u     total:108  pass:103  dwarn:1   dfail:0   fail:0   skip:3  
fi-kbl-r         total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:588s
fi-skl-6260u     total:108  pass:103  dwarn:1   dfail:0   fail:0   skip:3  
fi-skl-6600u     total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-skl-6700hq    total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-skl-6700k     total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-skl-6770hq    total:108  pass:103  dwarn:1   dfail:0   fail:0   skip:3  
fi-skl-gvtdvm    total:108  pass:102  dwarn:1   dfail:0   fail:0   skip:4  
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:418s
Blacklisted hosts:
fi-cfl-s2        total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-cnl-y         total:244  pass:219  dwarn:0   dfail:0   fail:0   skip:24 
fi-glk-dsi       total:288  pass:257  dwarn:1   dfail:0   fail:0   skip:30  time:471s

0645c6db8ac8375db3cb9f6741cfccb671ad5a0c drm-tip: 2017y-11m-29d-12h-29m-51s UTC integration manifest 965fb47f5085 drm/i915: HACK enable GuC for testing
dbe7a687455e drm/i915: Add GuC support for engine busy stats

== Logs ==

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

#3 lore raw

Re: ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Add GuC support for engine busy stats

Quoted 12 lines · Patchwork

== Series Details ==

Series: series starting with [1/2] drm/i915: Add GuC support for engine busy stats
URL : https://patchwork.freedesktop.org/series/34617/
State : failure

== Summary ==

Series 34617v1 series starting with [1/2] drm/i915: Add GuC support for engine busy stats
https://patchwork.freedesktop.org/api/1.0/series/34617/revisions/1/mbox/

Test debugfs_test:

Quoted 14 lines
         Subgroup read_all_entries:
                 pass       -> DMESG-WARN (fi-skl-6260u)
                 pass       -> DMESG-WARN (fi-skl-6600u)
                 pass       -> DMESG-WARN (fi-skl-6700hq)
                 pass       -> DMESG-WARN (fi-skl-6700k)
                 pass       -> DMESG-WARN (fi-skl-6770hq)
                 pass       -> DMESG-WARN (fi-skl-gvtdvm)
                 pass       -> DMESG-WARN (fi-bxt-dsi)
                 pass       -> DMESG-WARN (fi-bxt-j4205)
                 pass       -> DMESG-WARN (fi-kbl-7500u) fdo#103285
                 pass       -> DMESG-WARN (fi-kbl-7560u)
                 pass       -> DMESG-WARN (fi-kbl-7567u)
                 pass       -> DMESG-WARN (fi-kbl-r)
                 pass       -> DMESG-WARN (fi-glk-1)

Looks like another case of alloc_workqueue under struct_mutex in the GuC code. Anyone in the mood to untangle it? :)

Regards,

Tvrtko

Quoted 56 lines

Test gem_exec_suspend:

         Subgroup basic-s3:
                 pass       -> INCOMPLETE (fi-skl-6260u)
                 pass       -> INCOMPLETE (fi-skl-6600u)
                 pass       -> INCOMPLETE (fi-skl-6700hq)
                 pass       -> INCOMPLETE (fi-skl-6700k)
                 pass       -> INCOMPLETE (fi-skl-6770hq)
                 pass       -> INCOMPLETE (fi-skl-gvtdvm)
                 pass       -> INCOMPLETE (fi-bxt-dsi)
                 pass       -> INCOMPLETE (fi-bxt-j4205)
                 pass       -> INCOMPLETE (fi-kbl-7500u)
                 pass       -> INCOMPLETE (fi-kbl-7560u)
                 pass       -> INCOMPLETE (fi-kbl-7567u)
                 pass       -> INCOMPLETE (fi-kbl-r)
Test kms_pipe_crc_basic:
         Subgroup suspend-read-crc-pipe-b:
                 pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#103285 https://bugs.freedesktop.org/show_bug.cgi?id=103285
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:439s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:381s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:505s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:280s
fi-bxt-dsi       total:108  pass:94   dwarn:1   dfail:0   fail:0   skip:12
fi-bxt-j4205     total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:485s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:478s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:424s
fi-glk-1         total:288  pass:259  dwarn:1   dfail:0   fail:0   skip:28  time:523s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:374s
fi-hsw-4770r     total:288  pass:224  dwarn:0   dfail:0   fail:0   skip:64  time:270s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:479s
fi-kbl-7500u     total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11
fi-kbl-7560u     total:108  pass:103  dwarn:1   dfail:0   fail:0   skip:3
fi-kbl-7567u     total:108  pass:103  dwarn:1   dfail:0   fail:0   skip:3
fi-kbl-r         total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:588s
fi-skl-6260u     total:108  pass:103  dwarn:1   dfail:0   fail:0   skip:3
fi-skl-6600u     total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11
fi-skl-6700hq    total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11
fi-skl-6700k     total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11
fi-skl-6770hq    total:108  pass:103  dwarn:1   dfail:0   fail:0   skip:3
fi-skl-gvtdvm    total:108  pass:102  dwarn:1   dfail:0   fail:0   skip:4
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:418s
Blacklisted hosts:
fi-cfl-s2        total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11
fi-cnl-y         total:244  pass:219  dwarn:0   dfail:0   fail:0   skip:24
fi-glk-dsi       total:288  pass:257  dwarn:1   dfail:0   fail:0   skip:30  time:471s

0645c6db8ac8375db3cb9f6741cfccb671ad5a0c drm-tip: 2017y-11m-29d-12h-29m-51s UTC integration manifest 965fb47f5085 drm/i915: HACK enable GuC for testing
dbe7a687455e drm/i915: Add GuC support for engine busy stats

Quoted 8 lines

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7339/
_______________________________________________
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

#4 lore raw

✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Add GuC support for engine busy stats

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/i915: Add GuC support for engine busy stats
URL : https://patchwork.freedesktop.org/series/34617/
State : failure

== Summary ==

Series 34617v1 series starting with [1/2] drm/i915: Add GuC support for engine busy stats
https://patchwork.freedesktop.org/api/1.0/series/34617/revisions/1/mbox/

Test debugfs_test:

        Subgroup read_all_entries:
                dmesg-warn -> DMESG-FAIL (fi-elk-e7500) fdo#103989
                pass       -> DMESG-WARN (fi-skl-6260u)
                pass       -> DMESG-WARN (fi-skl-6600u)
                pass       -> DMESG-WARN (fi-skl-6700hq)
                pass       -> DMESG-WARN (fi-skl-6700k)
                pass       -> DMESG-WARN (fi-skl-6770hq)
                pass       -> DMESG-WARN (fi-skl-gvtdvm)
                pass       -> DMESG-WARN (fi-bxt-dsi)
                pass       -> DMESG-WARN (fi-bxt-j4205)
                pass       -> DMESG-WARN (fi-kbl-7500u) fdo#103285
                pass       -> DMESG-WARN (fi-kbl-7560u)
                pass       -> DMESG-WARN (fi-kbl-7567u)
                pass       -> DMESG-WARN (fi-kbl-r)
                pass       -> DMESG-WARN (fi-glk-1)
Test gem_exec_suspend:
        Subgroup basic-s3:
                pass       -> INCOMPLETE (fi-skl-6260u)
                pass       -> INCOMPLETE (fi-skl-6600u)
                pass       -> INCOMPLETE (fi-skl-6700hq)
                pass       -> INCOMPLETE (fi-skl-6700k)
                pass       -> INCOMPLETE (fi-skl-6770hq)
                pass       -> INCOMPLETE (fi-skl-gvtdvm)
                pass       -> INCOMPLETE (fi-bxt-dsi)
                pass       -> INCOMPLETE (fi-bxt-j4205)
                pass       -> INCOMPLETE (fi-kbl-7500u)
                pass       -> INCOMPLETE (fi-kbl-7560u)
                pass       -> INCOMPLETE (fi-kbl-7567u)
                pass       -> INCOMPLETE (fi-kbl-r)
Test gem_mmap_gtt:
        Subgroup basic-small-bo-tiledx:
                pass       -> FAIL       (fi-gdg-551) fdo#102575

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103285 https://bugs.freedesktop.org/show_bug.cgi?id=103285
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:436s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:439s
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:520s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:281s
fi-bxt-dsi       total:108  pass:94   dwarn:1   dfail:0   fail:0   skip:12 
fi-bxt-j4205     total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:487s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:477s
fi-elk-e7500     total:224  pass:162  dwarn:15  dfail:1   fail:0   skip:45 
fi-gdg-551       total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 time:270s
fi-glk-1         total:288  pass:259  dwarn:1   dfail:0   fail:0   skip:28  time:522s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:373s
fi-hsw-4770r     total:288  pass:224  dwarn:0   dfail:0   fail:0   skip:64  time:261s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:391s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:473s
fi-ivb-3770      total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:442s
fi-kbl-7500u     total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-kbl-7560u     total:108  pass:103  dwarn:1   dfail:0   fail:0   skip:3  
fi-kbl-7567u     total:108  pass:103  dwarn:1   dfail:0   fail:0   skip:3  
fi-kbl-r         total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:588s
fi-skl-6260u     total:108  pass:103  dwarn:1   dfail:0   fail:0   skip:3  
fi-skl-6600u     total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-skl-6700hq    total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-skl-6700k     total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-skl-6770hq    total:108  pass:103  dwarn:1   dfail:0   fail:0   skip:3  
fi-skl-gvtdvm    total:108  pass:102  dwarn:1   dfail:0   fail:0   skip:4  
fi-snb-2520m     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:553s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:423s
Blacklisted hosts:
fi-cfl-s2        total:108  pass:95   dwarn:1   dfail:0   fail:0   skip:11 
fi-cnl-y         total:288  pass:258  dwarn:3   dfail:0   fail:0   skip:27  time:553s
fi-glk-dsi       total:288  pass:257  dwarn:1   dfail:0   fail:0   skip:30  time:473s

0c2cf368f9fbb26cdf4e355f01c7ddf16e65d25a drm-tip: 2017y-11m-30d-15h-54m-58s UTC integration manifest 1aa0f08a25c3 drm/i915: HACK enable GuC for testing
f5b1904fa734 drm/i915: Add GuC support for engine busy stats

== Logs ==

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

#5 lore raw
In reply to Tvrtko Ursulin

Hi guys,

Anyone has the bandwidth to review the below tiny patch, or suggest some else as potential reviewer?

Truth be told I only tested it lightly, but it passed the perf_pmu unit tests. Goal is to bring engine busyness PMU reporting accuracy to the same level as execlists.

Regards,

Tvrtko

Quoted 37 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Wire up the engine busy stats accounting to the GuC submission backend.

Since there is not context out interrupt we need to place the accounting callbacks per-request in order to correctly pair with user interrupts.

v2: Rebase.
v3: Commit update.

---
  drivers/gpu/drm/i915/intel_guc_submission.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_guc_submission.c +2 -0
index 912ff143d531..d80d2a3214da 100644
@@ -781,6 +781,7 @@ static void guc_dequeue(struct intel_engine_cs *engine)
  			INIT_LIST_HEAD(&rq->priotree.link);
 
  			__i915_gem_request_submit(rq);
+			intel_engine_context_in(rq->engine);
  			trace_i915_gem_request_in(rq,
  						  port_index(port, execlists));
  			last = rq;
@@ -813,6 +814,7 @@ static void guc_submission_tasklet(unsigned long data)
 
  	rq = port_request(&port[0]);
  	while (rq && i915_gem_request_completed(rq)) {
+		intel_engine_context_out(rq->engine);
  		trace_i915_gem_request_out(rq);
  		i915_gem_request_put(rq);
 

drivers/gpu/drm/i915/intel_guc_submission.c int intel_guc_submission_enable(struct intel_guc *guc) · line 1460

Quoted 8 lines
drivers/gpu/drm/i915/intel_guc_submission.c +0 -2
@@ -1453,8 +1455,6 @@ int intel_guc_submission_enable(struct intel_guc *guc)
  		execlists->tasklet.func = guc_submission_tasklet;
  		engine->park = guc_submission_park;
  		engine->unpark = guc_submission_unpark;
-
-		engine->flags &= ~I915_ENGINE_SUPPORTS_STATS;
  	}
 
  	return 0;

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

#6 lore raw
In reply to Tvrtko Ursulin
Quoted 5 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Wire up the engine busy stats accounting to the GuC submission backend.

Since there is not

no

Quoted 16 lines

context out interrupt we need to place the accounting
callbacks per-request in order to correctly pair with user interrupts.

v2: Rebase.
v3: Commit update.

---
  drivers/gpu/drm/i915/intel_guc_submission.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_guc_submission.c +0 -0
index 912ff143d531..d80d2a3214da 100644

drivers/gpu/drm/i915/intel_guc_submission.c static void guc_dequeue(struct intel_engine_cs *engine) · line 784

Quoted 4 lines
drivers/gpu/drm/i915/intel_guc_submission.c +1 -0
@@ -781,6 +781,7 @@ static void guc_dequeue(struct intel_engine_cs *engine)
  			INIT_LIST_HEAD(&rq->priotree.link);
 
  			__i915_gem_request_submit(rq);
+			intel_engine_context_in(rq->engine);

Shouldn't we also invoke execlists_context_status_change for GVT-g.

Quoted 12 lines
drivers/gpu/drm/i915/intel_guc_submission.c +1 -0
  			trace_i915_gem_request_in(rq,
  						  port_index(port, execlists));
  			last = rq;
@@ -813,6 +814,7 @@ static void guc_submission_tasklet(unsigned long data)
 
  	rq = port_request(&port[0]);
  	while (rq && i915_gem_request_completed(rq)) {
+		intel_engine_context_out(rq->engine);
  		trace_i915_gem_request_out(rq);
  		i915_gem_request_put(rq);
 

drivers/gpu/drm/i915/intel_guc_submission.c int intel_guc_submission_enable(struct intel_guc *guc) · line 1457

Quoted 5 lines
drivers/gpu/drm/i915/intel_guc_submission.c +0 -2
@@ -1453,8 +1455,6 @@ int intel_guc_submission_enable(struct intel_guc *guc)
  		execlists->tasklet.func = guc_submission_tasklet;
  		engine->park = guc_submission_park;
  		engine->unpark = guc_submission_unpark;
-
-		engine->flags &= ~I915_ENGINE_SUPPORTS_STATS;

Should we explicitly set this flag even though execlists is setting it.

drivers/gpu/drm/i915/intel_guc_submission.c int intel_guc_submission_enable(struct intel_guc *guc) · line 1460

Quoted 3 lines
drivers/gpu/drm/i915/intel_guc_submission.c +0 -0
  	}
 
  	return 0;

Overall change looks good to me.
GuC publishing engine data will make it more precise as we understand.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw
Quoted 7 lines · Sagar Arun Kamble
Quoted 5 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Wire up the engine busy stats accounting to the GuC submission backend.

Since there is not

no

Yeah. :)

Quoted 11 lines
Quoted 11 lines

  context out interrupt we need to place the accounting callbacks per-request in order to correctly pair with user interrupts.

v2: Rebase.
v3: Commit update.

---
  drivers/gpu/drm/i915/intel_guc_submission.c | 4 ++--

  1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 10 lines

drivers/gpu/drm/i915/intel_guc_submission.c static void guc_dequeue(struct intel_engine_cs · line 784

Quoted 9 lines
drivers/gpu/drm/i915/intel_guc_submission.c +1 -0
index 912ff143d531..d80d2a3214da 100644
@@ -781,6 +781,7 @@ static void guc_dequeue(struct intel_engine_cs 
 *engine)
               INIT_LIST_HEAD(&rq->priotree.link);
               __i915_gem_request_submit(rq);
+            intel_engine_context_in(rq->engine);

Shouldn't we also invoke execlists_context_status_change for GVT-g.

Not currently in GuC paths so I think not, or if yes, then it should be added separately.

Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/i915/intel_guc_submission.c +1 -0
               trace_i915_gem_request_in(rq,
                             port_index(port, execlists));
               last = rq;
@@ -813,6 +814,7 @@ static void guc_submission_tasklet(unsigned long 
 data)
       rq = port_request(&port[0]);
       while (rq && i915_gem_request_completed(rq)) {
+        intel_engine_context_out(rq->engine);
           trace_i915_gem_request_out(rq);
           i915_gem_request_put(rq);
Quoted 8 lines

drivers/gpu/drm/i915/intel_guc_submission.c int intel_guc_submission_enable(struct intel_guc · line 1458

Quoted 7 lines
drivers/gpu/drm/i915/intel_guc_submission.c +0 -2
@@ -1453,8 +1455,6 @@ int intel_guc_submission_enable(struct intel_guc 
 *guc)
           execlists->tasklet.func = guc_submission_tasklet;
           engine->park = guc_submission_park;
           engine->unpark = guc_submission_unpark;
-
-        engine->flags &= ~I915_ENGINE_SUPPORTS_STATS;

Should we explicitly set this flag even though execlists is setting it.

AFAIR we settled on this approach while discussing the parent patch. Parent = the patch which added the I915_ENGINE_SUPPORTS_STATS.

Quoted 4 lines

drivers/gpu/drm/i915/intel_guc_submission.c int intel_guc_submission_enable(struct intel_guc *guc) · line 1460

Quoted 2 lines
drivers/gpu/drm/i915/intel_guc_submission.c +0 -0
       }
       return 0;

Overall change looks good to me.
GuC publishing engine data will make it more precise as we understand.

Hopefully yes.

Regards,

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