Message ID | 1460049678-21918-2-git-send-email-david.s.gordon@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
LGTM. Reviewed-by: Alex Dai <yu.dai@intel.com> On 04/07/2016 10:21 AM, Dave Gordon wrote: > To properly verify the driver->doorbell->GuC functionality, validation > needs to know how the driver has assigned the doorbell cache lines and > registers, so make them visible through debugfs. > > Signed-off-by: Dave Gordon <david.s.gordon@intel.com> > --- > drivers/gpu/drm/i915/i915_debugfs.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > index be4bcdc..87a9f3e 100644 > --- a/drivers/gpu/drm/i915/i915_debugfs.c > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > @@ -2488,6 +2488,7 @@ static int i915_guc_info(struct seq_file *m, void *data) > struct i915_guc_client client = {}; > struct intel_engine_cs *engine; > u64 total = 0; > + int i; > > if (!HAS_GUC_SCHED(dev_priv)) > return 0; > @@ -2502,6 +2503,13 @@ static int i915_guc_info(struct seq_file *m, void *data) > > mutex_unlock(&dev->struct_mutex); > > + seq_printf(m, "Doorbell map:\n"); > + for (i = 0; i < BITS_TO_LONGS(GUC_MAX_DOORBELLS) - 3; i += 4) > + seq_printf(m, "\t%016lx %016lx %016lx %016lx\n", > + guc.doorbell_bitmap[i], guc.doorbell_bitmap[i+1], > + guc.doorbell_bitmap[i+2], guc.doorbell_bitmap[i+3]); > + seq_printf(m, "Doorbell next cacheline: 0x%x\n\n", guc.db_cacheline); > + > seq_printf(m, "GuC total action count: %llu\n", guc.action_count); > seq_printf(m, "GuC action failure count: %u\n", guc.action_fail); > seq_printf(m, "GuC last action command: 0x%x\n", guc.action_cmd);
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index be4bcdc..87a9f3e 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -2488,6 +2488,7 @@ static int i915_guc_info(struct seq_file *m, void *data) struct i915_guc_client client = {}; struct intel_engine_cs *engine; u64 total = 0; + int i; if (!HAS_GUC_SCHED(dev_priv)) return 0; @@ -2502,6 +2503,13 @@ static int i915_guc_info(struct seq_file *m, void *data) mutex_unlock(&dev->struct_mutex); + seq_printf(m, "Doorbell map:\n"); + for (i = 0; i < BITS_TO_LONGS(GUC_MAX_DOORBELLS) - 3; i += 4) + seq_printf(m, "\t%016lx %016lx %016lx %016lx\n", + guc.doorbell_bitmap[i], guc.doorbell_bitmap[i+1], + guc.doorbell_bitmap[i+2], guc.doorbell_bitmap[i+3]); + seq_printf(m, "Doorbell next cacheline: 0x%x\n\n", guc.db_cacheline); + seq_printf(m, "GuC total action count: %llu\n", guc.action_count); seq_printf(m, "GuC action failure count: %u\n", guc.action_fail); seq_printf(m, "GuC last action command: 0x%x\n", guc.action_cmd);
To properly verify the driver->doorbell->GuC functionality, validation needs to know how the driver has assigned the doorbell cache lines and registers, so make them visible through debugfs. Signed-off-by: Dave Gordon <david.s.gordon@intel.com> --- drivers/gpu/drm/i915/i915_debugfs.c | 8 ++++++++ 1 file changed, 8 insertions(+)