提交 0b63bb14 编写于 作者: D Dave Gordon 提交者: Tvrtko Ursulin

drm/i915/guc: index host arrays by i915 engine ID, not guc_id

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: NDave Gordon <david.s.gordon@intel.com>
Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1466432287-5799-1-git-send-email-david.s.gordon@intel.com
上级 e77018f7
...@@ -2544,9 +2544,9 @@ static void i915_guc_client_info(struct seq_file *m, ...@@ -2544,9 +2544,9 @@ static void i915_guc_client_info(struct seq_file *m,
for_each_engine(engine, dev_priv) { for_each_engine(engine, dev_priv) {
seq_printf(m, "\tSubmissions: %llu %s\n", seq_printf(m, "\tSubmissions: %llu %s\n",
client->submissions[engine->guc_id], client->submissions[engine->id],
engine->name); engine->name);
tot += client->submissions[engine->guc_id]; tot += client->submissions[engine->id];
} }
seq_printf(m, "\tTotal: %llu\n", tot); seq_printf(m, "\tTotal: %llu\n", tot);
} }
...@@ -2587,9 +2587,9 @@ static int i915_guc_info(struct seq_file *m, void *data) ...@@ -2587,9 +2587,9 @@ static int i915_guc_info(struct seq_file *m, void *data)
seq_printf(m, "\nGuC submissions:\n"); seq_printf(m, "\nGuC submissions:\n");
for_each_engine(engine, dev_priv) { for_each_engine(engine, dev_priv) {
seq_printf(m, "\t%-24s: %10llu, last seqno 0x%08x\n", seq_printf(m, "\t%-24s: %10llu, last seqno 0x%08x\n",
engine->name, guc.submissions[engine->guc_id], engine->name, guc.submissions[engine->id],
guc.last_seqno[engine->guc_id]); guc.last_seqno[engine->id]);
total += guc.submissions[engine->guc_id]; total += guc.submissions[engine->id];
} }
seq_printf(m, "\t%s: %llu\n", "Total", total); seq_printf(m, "\t%s: %llu\n", "Total", total);
......
...@@ -582,7 +582,7 @@ static int guc_ring_doorbell(struct i915_guc_client *gc) ...@@ -582,7 +582,7 @@ static int guc_ring_doorbell(struct i915_guc_client *gc)
*/ */
int i915_guc_submit(struct drm_i915_gem_request *rq) 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 intel_guc *guc = &rq->i915->guc;
struct i915_guc_client *client = guc->execbuf_client; struct i915_guc_client *client = guc->execbuf_client;
int b_ret; int b_ret;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "intel_guc_fwif.h" #include "intel_guc_fwif.h"
#include "i915_guc_reg.h" #include "i915_guc_reg.h"
#include "intel_ringbuffer.h"
struct drm_i915_gem_request; struct drm_i915_gem_request;
...@@ -86,7 +87,7 @@ struct i915_guc_client { ...@@ -86,7 +87,7 @@ struct i915_guc_client {
int retcode; int retcode;
/* Per-engine counts of GuC submissions */ /* Per-engine counts of GuC submissions */
uint64_t submissions[GUC_MAX_ENGINES_NUM]; uint64_t submissions[I915_NUM_ENGINES];
}; };
enum intel_guc_fw_status { enum intel_guc_fw_status {
...@@ -143,8 +144,8 @@ struct intel_guc { ...@@ -143,8 +144,8 @@ struct intel_guc {
uint32_t action_fail; /* Total number of failures */ uint32_t action_fail; /* Total number of failures */
int32_t action_err; /* Last error code */ int32_t action_err; /* Last error code */
uint64_t submissions[GUC_MAX_ENGINES_NUM]; uint64_t submissions[I915_NUM_ENGINES];
uint32_t last_seqno[GUC_MAX_ENGINES_NUM]; uint32_t last_seqno[I915_NUM_ENGINES];
}; };
/* intel_guc_loader.c */ /* intel_guc_loader.c */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册