* [PATCH] drm/i915/guc: index host arrays by i915 engine ID, not guc_id
@ 2016-06-17 16:29 Dave Gordon
2016-06-20 9:37 ` Chris Wilson
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Dave Gordon @ 2016-06-17 16:29 UTC (permalink / raw)
To: intel-gfx
The ONLY places that guc_id (aka hw_id) should be used are those where
the value or address is determined by and shared with the GuC firmware;
specifically, when filling in the GuC-context-descriptor or the GuC
addon data, or putting an entry in the GuC's work queue.
It need not (and therefore should not) be used to index GuC statistics
or similar host-managed tracking data. In particular, i915_guc_submit()
produces (and debugfs decodes) GuC submission statistics which should be
indexed by driver-engine-id rather then guc-engine-id.
Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++-----
drivers/gpu/drm/i915/i915_guc_submission.c | 2 +-
drivers/gpu/drm/i915/intel_guc.h | 7 ++++---
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 5b75266..7d63af0 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2544,9 +2544,9 @@ static void i915_guc_client_info(struct seq_file *m,
for_each_engine(engine, dev_priv) {
seq_printf(m, "\tSubmissions: %llu %s\n",
- client->submissions[engine->guc_id],
+ client->submissions[engine->id],
engine->name);
- tot += client->submissions[engine->guc_id];
+ tot += client->submissions[engine->id];
}
seq_printf(m, "\tTotal: %llu\n", tot);
}
@@ -2587,9 +2587,9 @@ static int i915_guc_info(struct seq_file *m, void *data)
seq_printf(m, "\nGuC submissions:\n");
for_each_engine(engine, dev_priv) {
seq_printf(m, "\t%-24s: %10llu, last seqno 0x%08x\n",
- engine->name, guc.submissions[engine->guc_id],
- guc.last_seqno[engine->guc_id]);
- total += guc.submissions[engine->guc_id];
+ engine->name, guc.submissions[engine->id],
+ guc.last_seqno[engine->id]);
+ total += guc.submissions[engine->id];
}
seq_printf(m, "\t%s: %llu\n", "Total", total);
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 22a55ac..01c7cdf 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -582,7 +582,7 @@ static int guc_ring_doorbell(struct i915_guc_client *gc)
*/
int i915_guc_submit(struct drm_i915_gem_request *rq)
{
- unsigned int engine_id = rq->engine->guc_id;
+ unsigned int engine_id = rq->engine->id;
struct intel_guc *guc = &rq->i915->guc;
struct i915_guc_client *client = guc->execbuf_client;
int b_ret;
diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h
index 4df80cc..3e3e743 100644
--- a/drivers/gpu/drm/i915/intel_guc.h
+++ b/drivers/gpu/drm/i915/intel_guc.h
@@ -26,6 +26,7 @@
#include "intel_guc_fwif.h"
#include "i915_guc_reg.h"
+#include "intel_ringbuffer.h"
struct drm_i915_gem_request;
@@ -86,7 +87,7 @@ struct i915_guc_client {
int retcode;
/* Per-engine counts of GuC submissions */
- uint64_t submissions[GUC_MAX_ENGINES_NUM];
+ uint64_t submissions[I915_NUM_ENGINES];
};
enum intel_guc_fw_status {
@@ -143,8 +144,8 @@ struct intel_guc {
uint32_t action_fail; /* Total number of failures */
int32_t action_err; /* Last error code */
- uint64_t submissions[GUC_MAX_ENGINES_NUM];
- uint32_t last_seqno[GUC_MAX_ENGINES_NUM];
+ uint64_t submissions[I915_NUM_ENGINES];
+ uint32_t last_seqno[I915_NUM_ENGINES];
};
/* intel_guc_loader.c */
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] drm/i915/guc: index host arrays by i915 engine ID, not guc_id
2016-06-17 16:29 [PATCH] drm/i915/guc: index host arrays by i915 engine ID, not guc_id Dave Gordon
@ 2016-06-20 9:37 ` Chris Wilson
2016-06-20 14:18 ` [Resend-for-CI] " Dave Gordon
2016-06-20 15:04 ` ✓ Ro.CI.BAT: success for drm/i915/guc: index host arrays by i915 engine ID, not guc_id (rev2) Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2016-06-20 9:37 UTC (permalink / raw)
To: Dave Gordon; +Cc: intel-gfx
On Fri, Jun 17, 2016 at 05:29:12PM +0100, Dave Gordon wrote:
> The ONLY places that guc_id (aka hw_id) should be used are those where
> the value or address is determined by and shared with the GuC firmware;
> specifically, when filling in the GuC-context-descriptor or the GuC
> addon data, or putting an entry in the GuC's work queue.
>
> It need not (and therefore should not) be used to index GuC statistics
> or similar host-managed tracking data. In particular, i915_guc_submit()
> produces (and debugfs decodes) GuC submission statistics which should be
> indexed by driver-engine-id rather then guc-engine-id.
>
> Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Resend-for-CI] drm/i915/guc: index host arrays by i915 engine ID, not guc_id
2016-06-17 16:29 [PATCH] drm/i915/guc: index host arrays by i915 engine ID, not guc_id Dave Gordon
2016-06-20 9:37 ` Chris Wilson
@ 2016-06-20 14:18 ` Dave Gordon
2016-06-20 15:04 ` ✓ Ro.CI.BAT: success for drm/i915/guc: index host arrays by i915 engine ID, not guc_id (rev2) Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Dave Gordon @ 2016-06-20 14:18 UTC (permalink / raw)
To: intel-gfx
The ONLY places that guc_id (aka hw_id) should be used are those where
the value or address is determined by and shared with the GuC firmware;
specifically, when filling in the GuC-context-descriptor or the GuC
addon data, or putting an entry in the GuC's work queue.
It need not (and therefore should not) be used to index GuC statistics
or similar host-managed tracking data. In particular, i915_guc_submit()
produces (and debugfs decodes) GuC submission statistics which should be
indexed by driver-engine-id rather then guc-engine-id.
Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++-----
drivers/gpu/drm/i915/i915_guc_submission.c | 2 +-
drivers/gpu/drm/i915/intel_guc.h | 7 ++++---
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 5b75266..7d63af0 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2544,9 +2544,9 @@ static void i915_guc_client_info(struct seq_file *m,
for_each_engine(engine, dev_priv) {
seq_printf(m, "\tSubmissions: %llu %s\n",
- client->submissions[engine->guc_id],
+ client->submissions[engine->id],
engine->name);
- tot += client->submissions[engine->guc_id];
+ tot += client->submissions[engine->id];
}
seq_printf(m, "\tTotal: %llu\n", tot);
}
@@ -2587,9 +2587,9 @@ static int i915_guc_info(struct seq_file *m, void *data)
seq_printf(m, "\nGuC submissions:\n");
for_each_engine(engine, dev_priv) {
seq_printf(m, "\t%-24s: %10llu, last seqno 0x%08x\n",
- engine->name, guc.submissions[engine->guc_id],
- guc.last_seqno[engine->guc_id]);
- total += guc.submissions[engine->guc_id];
+ engine->name, guc.submissions[engine->id],
+ guc.last_seqno[engine->id]);
+ total += guc.submissions[engine->id];
}
seq_printf(m, "\t%s: %llu\n", "Total", total);
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 22a55ac..01c7cdf 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -582,7 +582,7 @@ static int guc_ring_doorbell(struct i915_guc_client *gc)
*/
int i915_guc_submit(struct drm_i915_gem_request *rq)
{
- unsigned int engine_id = rq->engine->guc_id;
+ unsigned int engine_id = rq->engine->id;
struct intel_guc *guc = &rq->i915->guc;
struct i915_guc_client *client = guc->execbuf_client;
int b_ret;
diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h
index 4df80cc..3e3e743 100644
--- a/drivers/gpu/drm/i915/intel_guc.h
+++ b/drivers/gpu/drm/i915/intel_guc.h
@@ -26,6 +26,7 @@
#include "intel_guc_fwif.h"
#include "i915_guc_reg.h"
+#include "intel_ringbuffer.h"
struct drm_i915_gem_request;
@@ -86,7 +87,7 @@ struct i915_guc_client {
int retcode;
/* Per-engine counts of GuC submissions */
- uint64_t submissions[GUC_MAX_ENGINES_NUM];
+ uint64_t submissions[I915_NUM_ENGINES];
};
enum intel_guc_fw_status {
@@ -143,8 +144,8 @@ struct intel_guc {
uint32_t action_fail; /* Total number of failures */
int32_t action_err; /* Last error code */
- uint64_t submissions[GUC_MAX_ENGINES_NUM];
- uint32_t last_seqno[GUC_MAX_ENGINES_NUM];
+ uint64_t submissions[I915_NUM_ENGINES];
+ uint32_t last_seqno[I915_NUM_ENGINES];
};
/* intel_guc_loader.c */
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread* ✓ Ro.CI.BAT: success for drm/i915/guc: index host arrays by i915 engine ID, not guc_id (rev2)
2016-06-17 16:29 [PATCH] drm/i915/guc: index host arrays by i915 engine ID, not guc_id Dave Gordon
2016-06-20 9:37 ` Chris Wilson
2016-06-20 14:18 ` [Resend-for-CI] " Dave Gordon
@ 2016-06-20 15:04 ` Patchwork
2016-06-21 10:26 ` Tvrtko Ursulin
2 siblings, 1 reply; 5+ messages in thread
From: Patchwork @ 2016-06-20 15:04 UTC (permalink / raw)
To: Dave Gordon; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/guc: index host arrays by i915 engine ID, not guc_id (rev2)
URL : https://patchwork.freedesktop.org/series/8848/
State : success
== Summary ==
Series 8848v2 drm/i915/guc: index host arrays by i915 engine ID, not guc_id
http://patchwork.freedesktop.org/api/1.0/series/8848/revisions/2/mbox
fi-skl-i5-6260u total:223 pass:200 dwarn:0 dfail:0 fail:2 skip:21
fi-skl-i7-6700k total:223 pass:186 dwarn:0 dfail:0 fail:2 skip:35
fi-snb-i7-2600 total:223 pass:172 dwarn:0 dfail:0 fail:2 skip:49
ro-bdw-i5-5250u total:223 pass:195 dwarn:2 dfail:0 fail:2 skip:24
ro-bdw-i7-5600u total:223 pass:183 dwarn:0 dfail:0 fail:2 skip:38
ro-bsw-n3050 total:223 pass:170 dwarn:0 dfail:0 fail:4 skip:49
ro-byt-n2820 total:223 pass:171 dwarn:0 dfail:0 fail:5 skip:47
ro-hsw-i3-4010u total:223 pass:188 dwarn:0 dfail:0 fail:2 skip:33
ro-hsw-i7-4770r total:223 pass:188 dwarn:0 dfail:0 fail:2 skip:33
ro-ilk-i7-620lm total:223 pass:148 dwarn:0 dfail:0 fail:3 skip:72
ro-ilk1-i5-650 total:218 pass:148 dwarn:0 dfail:0 fail:3 skip:67
ro-ivb-i7-3770 total:223 pass:179 dwarn:0 dfail:0 fail:2 skip:42
ro-ivb2-i7-3770 total:223 pass:183 dwarn:0 dfail:0 fail:2 skip:38
ro-skl3-i5-6260u total:223 pass:199 dwarn:1 dfail:0 fail:2 skip:21
ro-snb-i7-2620M total:223 pass:172 dwarn:0 dfail:0 fail:3 skip:48
fi-hsw-i7-4770k failed to connect after reboot
ro-bdw-i7-5557U failed to connect after reboot
Results at /archive/results/CI_IGT_test/RO_Patchwork_1240/
f586720 drm-intel-nightly: 2016y-06m-20d-13h-24m-46s UTC integration manifest
fb74e49 drm/i915/guc: index host arrays by i915 engine ID, not guc_id
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ✓ Ro.CI.BAT: success for drm/i915/guc: index host arrays by i915 engine ID, not guc_id (rev2)
2016-06-20 15:04 ` ✓ Ro.CI.BAT: success for drm/i915/guc: index host arrays by i915 engine ID, not guc_id (rev2) Patchwork
@ 2016-06-21 10:26 ` Tvrtko Ursulin
0 siblings, 0 replies; 5+ messages in thread
From: Tvrtko Ursulin @ 2016-06-21 10:26 UTC (permalink / raw)
To: intel-gfx, Dave Gordon
On 20/06/16 16:04, Patchwork wrote:
> == Series Details ==
>
> Series: drm/i915/guc: index host arrays by i915 engine ID, not guc_id (rev2)
> URL : https://patchwork.freedesktop.org/series/8848/
> State : success
>
> == Summary ==
>
> Series 8848v2 drm/i915/guc: index host arrays by i915 engine ID, not guc_id
> http://patchwork.freedesktop.org/api/1.0/series/8848/revisions/2/mbox
>
>
> fi-skl-i5-6260u total:223 pass:200 dwarn:0 dfail:0 fail:2 skip:21
> fi-skl-i7-6700k total:223 pass:186 dwarn:0 dfail:0 fail:2 skip:35
> fi-snb-i7-2600 total:223 pass:172 dwarn:0 dfail:0 fail:2 skip:49
> ro-bdw-i5-5250u total:223 pass:195 dwarn:2 dfail:0 fail:2 skip:24
> ro-bdw-i7-5600u total:223 pass:183 dwarn:0 dfail:0 fail:2 skip:38
> ro-bsw-n3050 total:223 pass:170 dwarn:0 dfail:0 fail:4 skip:49
> ro-byt-n2820 total:223 pass:171 dwarn:0 dfail:0 fail:5 skip:47
> ro-hsw-i3-4010u total:223 pass:188 dwarn:0 dfail:0 fail:2 skip:33
> ro-hsw-i7-4770r total:223 pass:188 dwarn:0 dfail:0 fail:2 skip:33
> ro-ilk-i7-620lm total:223 pass:148 dwarn:0 dfail:0 fail:3 skip:72
> ro-ilk1-i5-650 total:218 pass:148 dwarn:0 dfail:0 fail:3 skip:67
> ro-ivb-i7-3770 total:223 pass:179 dwarn:0 dfail:0 fail:2 skip:42
> ro-ivb2-i7-3770 total:223 pass:183 dwarn:0 dfail:0 fail:2 skip:38
> ro-skl3-i5-6260u total:223 pass:199 dwarn:1 dfail:0 fail:2 skip:21
> ro-snb-i7-2620M total:223 pass:172 dwarn:0 dfail:0 fail:3 skip:48
> fi-hsw-i7-4770k failed to connect after reboot
> ro-bdw-i7-5557U failed to connect after reboot
>
> Results at /archive/results/CI_IGT_test/RO_Patchwork_1240/
>
> f586720 drm-intel-nightly: 2016y-06m-20d-13h-24m-46s UTC integration manifest
> fb74e49 drm/i915/guc: index host arrays by i915 engine ID, not guc_id
Merged to dinq, thanks for the patch and review.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-21 10:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-17 16:29 [PATCH] drm/i915/guc: index host arrays by i915 engine ID, not guc_id Dave Gordon
2016-06-20 9:37 ` Chris Wilson
2016-06-20 14:18 ` [Resend-for-CI] " Dave Gordon
2016-06-20 15:04 ` ✓ Ro.CI.BAT: success for drm/i915/guc: index host arrays by i915 engine ID, not guc_id (rev2) Patchwork
2016-06-21 10:26 ` Tvrtko Ursulin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox