From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Dave Gordon <david.s.gordon@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915/guc: add doorbell map to debugfs/i915_guc_info
Date: Wed, 8 Jun 2016 13:32:56 +0100 [thread overview]
Message-ID: <57581078.1030201@linux.intel.com> (raw)
In-Reply-To: <1465383329-14885-2-git-send-email-david.s.gordon@intel.com>
On 08/06/16 11:55, 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 | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index e4f2c55..fbb4b16 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2560,6 +2560,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;
> @@ -2574,6 +2575,14 @@ static int i915_guc_info(struct seq_file *m, void *data)
>
> mutex_unlock(&dev->struct_mutex);
>
> + seq_printf(m, "Doorbell map:\n");
> + BUILD_BUG_ON(ARRAY_SIZE(guc.doorbell_bitmap) % 4);
> + for (i = 0; i < ARRAY_SIZE(guc.doorbell_bitmap) - 3; i += 4)
> + seq_printf(m, "\t%016lx %016lx %016lx %016lx\n",
Bitmap is unsigned long so 32-bit or 64-bit depending on the kernel
build. Which makes the format wrong for 32-bit. And the ARRAY_SIZE will
be different as well. So I think output should be made consistent
between the two. Probably either pick u32 or u64 and dump it like that.
#define DECLARE_BITMAP(name,bits) \
unsigned long name[BITS_TO_LONGS(bits)]
DECLARE_BITMAP(doorbell_bitmap, GUC_MAX_DOORBELLS);
> + 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);
>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-06-08 12:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-08 10:55 [PATCH 0/4] drm/i915: updates to GuC doorbell handling Dave Gordon
2016-06-08 10:55 ` [PATCH 1/4] drm/i915/guc: add doorbell map to debugfs/i915_guc_info Dave Gordon
2016-06-08 12:32 ` Tvrtko Ursulin [this message]
2016-06-08 10:55 ` [PATCH 2/4] drm/i915/guc: move guc_ring_doorbell() nearer to callsite Dave Gordon
2016-06-08 12:47 ` Tvrtko Ursulin
2016-06-08 10:55 ` [PATCH 3/4] drm/i915/guc: refactor doorbell management code Dave Gordon
2016-06-08 13:11 ` Tvrtko Ursulin
2016-06-10 11:37 ` Dave Gordon
2016-06-08 10:55 ` [PATCH 4/4] drm/i915/guc: (re)initialise doorbell h/w when enabling GuC submission Dave Gordon
2016-06-08 11:41 ` ✓ Ro.CI.BAT: success for drm/i915: updates to GuC doorbell handling Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57581078.1030201@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=david.s.gordon@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox