From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 3/5] drm/i915/guc: Provide debugfs for log relay sub-buf info
Date: Wed, 07 Dec 2022 08:43:26 -0800 [thread overview]
Message-ID: <87tu27cggh.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20221206092100.274195-4-alan.previn.teres.alexis@intel.com>
On Tue, 06 Dec 2022 01:20:58 -0800, Alan Previn wrote:
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c
> index ddfbe334689f..27756640338e 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c
> @@ -105,6 +105,38 @@ DEFINE_SIMPLE_ATTRIBUTE(guc_log_level_fops,
> guc_log_level_get, guc_log_level_set,
> "%lld\n");
>
> +static int guc_log_relay_subbuf_size_get(void *data, u64 *val)
> +{
> + struct intel_guc_log *log = data;
> +
> + if (!log->vma)
> + return -ENODEV;
For the record, from the other email thread, the issue here is whether this
check is needed.
Also, the issue is what happens if the relay is open and we unload the
module, what happens?
> +
> + *val = (u64)intel_guc_log_size(log);
Don't cast, shouldn't need it.
> +
> + return 0;
> +}
> +
> +DEFINE_SIMPLE_ATTRIBUTE(guc_log_relay_subbuf_size_fops,
> + guc_log_relay_subbuf_size_get, NULL,
> + "%lld\n");
> +
> +static int guc_log_relay_subbuf_count_get(void *data, u64 *val)
> +{
> + struct intel_guc_log *log = data;
> +
> + if (!log->vma)
> + return -ENODEV;
Same for this check too.
> +
> + *val = intel_guc_log_relay_subbuf_count(log);
> +
> + return 0;
> +}
> +
> +DEFINE_SIMPLE_ATTRIBUTE(guc_log_relay_subbuf_count_fops,
> + guc_log_relay_subbuf_count_get, NULL,
> + "%lld\n");
> +
> static int guc_log_relay_open(struct inode *inode, struct file *file)
> {
> struct intel_guc_log *log = inode->i_private;
> @@ -166,6 +198,8 @@ void intel_guc_log_debugfs_register(struct intel_guc_log *log,
> { "guc_load_err_log_dump", &guc_load_err_log_dump_fops, NULL },
> { "guc_log_level", &guc_log_level_fops, NULL },
> { "guc_log_relay", &guc_log_relay_fops, NULL },
> + { "guc_log_relay_subbuf_size", &guc_log_relay_subbuf_size_fops, NULL },
> + { "guc_log_relay_subbuf_count", &guc_log_relay_subbuf_count_fops, NULL },
> };
>
> if (!intel_guc_is_supported(log_to_guc(log)))
Thanks.
--
Ashutosh
next prev parent reply other threads:[~2022-12-07 16:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-06 9:20 [Intel-gfx] [PATCH v2 0/5] drm/i915/guc: Update GuC relay logging debugfs Alan Previn
2022-12-06 9:20 ` [Intel-gfx] [PATCH v2 1/5] drm/i915/guc: Fix GuC relay log debugfs failing open Alan Previn
2022-12-06 9:20 ` [Intel-gfx] [PATCH v2 2/5] drm/i915/guc: Add unaligned wc memcpy for copying GuC Log Alan Previn
2022-12-06 10:14 ` Tvrtko Ursulin
2022-12-06 21:35 ` Teres Alexis, Alan Previn
2022-12-07 9:20 ` Teres Alexis, Alan Previn
2022-12-07 10:17 ` Tvrtko Ursulin
2022-12-07 18:15 ` Teres Alexis, Alan Previn
2022-12-06 9:20 ` [Intel-gfx] [PATCH v2 3/5] drm/i915/guc: Provide debugfs for log relay sub-buf info Alan Previn
2022-12-07 16:43 ` Dixit, Ashutosh [this message]
2023-03-09 23:29 ` Teres Alexis, Alan Previn
2023-03-14 22:09 ` Teres Alexis, Alan Previn
2022-12-06 9:20 ` [Intel-gfx] [PATCH v2 4/5] drm/i915/guc: Rename GuC log relay debugfs descriptively Alan Previn
2022-12-07 16:50 ` Dixit, Ashutosh
2023-03-09 23:36 ` Teres Alexis, Alan Previn
2023-03-10 5:41 ` Teres Alexis, Alan Previn
2022-12-06 9:21 ` [Intel-gfx] [PATCH v2 5/5] drm/i915/guc: Move guc_log_relay_chan debugfs path to uc Alan Previn
2022-12-07 17:24 ` Dixit, Ashutosh
2023-03-09 23:37 ` Teres Alexis, Alan Previn
2022-12-06 13:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/guc: Update GuC relay logging debugfs Patchwork
2022-12-06 17:42 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=87tu27cggh.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=alan.previn.teres.alexis@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;
as well as URLs for NNTP newsgroup(s).