diff mbox

[3/3] drm/i915/guc: Remove last submission result from debugfs

Message ID 20170518113104.54400-3-michal.wajdeczko@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michal Wajdeczko May 18, 2017, 11:31 a.m. UTC
Debugfs does not seems to be a right place to display transient data.
If we want to capture errors, we should log them.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c        | 1 -
 drivers/gpu/drm/i915/i915_guc_submission.c | 1 -
 drivers/gpu/drm/i915/intel_uc.h            | 2 --
 3 files changed, 4 deletions(-)

Comments

Chris Wilson May 19, 2017, 8:30 a.m. UTC | #1
On Thu, May 18, 2017 at 11:31:04AM +0000, Michal Wajdeczko wrote:
> Debugfs does not seems to be a right place to display transient data.
> If we want to capture errors, we should log them.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

All 3 Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Joonas Lahtinen May 19, 2017, 8:38 a.m. UTC | #2
On to, 2017-05-18 at 11:31 +0000, Michal Wajdeczko wrote:
> Debugfs does not seems to be a right place to display transient data.
> If we want to capture errors, we should log them.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

<SNIP>

> @@ -2482,7 +2482,6 @@ static void i915_guc_client_info(struct seq_file *m,
>  		client->wq_size, client->wq_offset, client->wq_tail);
>  
>  	seq_printf(m, "\tWork queue full: %u\n", client->no_wq_space);

This seems like a valid candidate for removal too, the error will be
propagated (although, -EINVAL seems odd, -ENOSPC might make more
sense).

Regards, Joonas
Michal Wajdeczko May 19, 2017, 8:55 a.m. UTC | #3
On Fri, May 19, 2017 at 11:38:29AM +0300, Joonas Lahtinen wrote:
> On to, 2017-05-18 at 11:31 +0000, Michal Wajdeczko wrote:
> > Debugfs does not seems to be a right place to display transient data.
> > If we want to capture errors, we should log them.
> > 
> > Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> <SNIP>
> 
> > @@ -2482,7 +2482,6 @@ static void i915_guc_client_info(struct seq_file *m,
> >  		client->wq_size, client->wq_offset, client->wq_tail);
> >  
> >  	seq_printf(m, "\tWork queue full: %u\n", client->no_wq_space);
> 
> This seems like a valid candidate for removal too, the error will be
> propagated (although, -EINVAL seems odd, -ENOSPC might make more
> sense).

This removal is included in other patch:

	[PATCH 3/6] drm/i915/guc: Remove GuC wq reservation
	https://patchwork.freedesktop.org/patch/157088/

Michal

> 
> Regards, Joonas
> -- 
> Joonas Lahtinen
> Open Source Technology Center
> Intel Corporation
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 207175e..6bdc903 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2482,7 +2482,6 @@  static void i915_guc_client_info(struct seq_file *m,
 		client->wq_size, client->wq_offset, client->wq_tail);
 
 	seq_printf(m, "\tWork queue full: %u\n", client->no_wq_space);
-	seq_printf(m, "\tLast submission result: %d\n", client->retcode);
 
 	for_each_engine(engine, dev_priv, id) {
 		u64 submissions = client->submissions[id];
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index dc84311..ee32fa9 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -614,7 +614,6 @@  static void __i915_guc_submit(struct drm_i915_gem_request *rq)
 	b_ret = guc_ring_doorbell(client);
 
 	client->submissions[engine_id] += 1;
-	client->retcode = b_ret;
 
 	guc->submissions[engine_id] += 1;
 	guc->last_seqno[engine_id] = rq->global_seqno;
diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h
index 398a491..33c8f77 100644
--- a/drivers/gpu/drm/i915/intel_uc.h
+++ b/drivers/gpu/drm/i915/intel_uc.h
@@ -59,7 +59,6 @@  struct drm_i915_gem_request;
  *                available in the work queue (note, the queue is shared,
  *                not per-engine). It is OK for this to be nonzero, but
  *                it should not be huge!
- *   retcode: errno from last guc_submit()
  */
 struct i915_guc_client {
 	struct i915_vma *vma;
@@ -82,7 +81,6 @@  struct i915_guc_client {
 	uint32_t wq_tail;
 	uint32_t wq_rsvd;
 	uint32_t no_wq_space;
-	int retcode;
 
 	/* Per-engine counts of GuC submissions */
 	uint64_t submissions[I915_NUM_ENGINES];