All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Goel, Akash" <akash.goel@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: sourab.gupta@intel.com, akash.goel@intel.com
Subject: Re: [PATCH 06/11] drm/i915: Add a relay backed debugfs interface for capturing GuC logs
Date: Tue, 28 Jun 2016 15:31:40 +0530	[thread overview]
Message-ID: <40333fbf-83b1-5c89-468f-3df652c4a4ad@intel.com> (raw)
In-Reply-To: <20160628094731.GJ25424@nuc-i3427.alporthouse.com>



On 6/28/2016 3:17 PM, Chris Wilson wrote:
> On Mon, Jun 27, 2016 at 05:46:53PM +0530, akash.goel@intel.com wrote:
>> +static void guc_remove_log_relay_file(struct intel_guc *guc)
>> +{
>> +	relay_close(guc->log_relay_chan);
>> +}
>> +
>> +static void guc_create_log_relay_file(struct intel_guc *guc)
>> +{
>> +	struct drm_i915_private *dev_priv = guc_to_i915(guc);
>> +	struct drm_device *dev = dev_priv->dev;
>> +	struct dentry *log_dir;
>> +	struct rchan *guc_log_relay_chan;
>> +	size_t n_subbufs, subbuf_size;
>> +
>> +	if (guc->log_relay_chan)
>> +		return;
>> +
>> +	/* If /sys/kernel/debug/dri/0 location do not exist, then debugfs is
>> +	 * not mounted and so can't create the relay file.
>> +	 * The relay API seems to fit well with debugfs only.
>> +	 */
>
> Ah. dev->primary->debugfs_root does not exist until the end of driver
> loading.
>
> You need to add an intel_guc_register() to the i915_driver_register()
> after we call drm_dev_rigster() (that then calls this function).
>
> Similarly, this needs to be torn down in unregister.

Yes, realized this today, that can’t get to the ‘dri’ directory until
the end of Driver load.
So will have to create the relay file after i915_driver_register().

>
>> +	if (!dev->primary->debugfs_root) {
>> +		/* logging will remain off */
>> +		i915.guc_log_level = -1;
>> +		return;
>> +	}
>> +
>> +	/* For now create the log file in /sys/kernel/debug/dri dir. */
>> +	log_dir = dev->primary->debugfs_root->d_parent;
>
> In future, this will be something like /sys/kernel/gpu/i915/guc_log, so
> I don't see a good argument for not being more canonical in the debugfs
> placement and using dev->primary->debugfs_root (i.e. /.../dri/0)

Yes can now use the dev->primary->debugfs_root itself.

Actually earlier 'i915_debugfs_files' were being created inside other
drm_minor directories also (i.e. dri/64 & dri/128), but now they are
restricted only to dri/0.

Best regards
Akash

> At the very least, you need to explain why we don't use dri/0/
> -Chris
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-06-28 10:01 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27 12:16 [PATCH v2 00/11] Support for sustained capturing of GuC firmware logs akash.goel
2016-06-27 12:16 ` [PATCH 01/11] drm/i915: Decouple GuC log setup from verbosity parameter akash.goel
2016-06-27 15:00   ` Tvrtko Ursulin
2016-06-27 15:32     ` Goel, Akash
2016-06-27 15:56       ` Tvrtko Ursulin
2016-06-27 16:25         ` Goel, Akash
2016-06-27 12:16 ` [PATCH 02/11] drm/i915: Add GuC ukernel logging related fields to fw interface file akash.goel
2016-06-27 15:09   ` Tvrtko Ursulin
2016-06-27 12:16 ` [PATCH 03/11] drm/i915: Add low level set of routines for programming PM IER/IIR/IMR register set akash.goel
2016-06-27 15:46   ` Tvrtko Ursulin
2016-06-27 16:35     ` Goel, Akash
2016-06-28  8:35       ` Tvrtko Ursulin
2016-06-28  9:21         ` Goel, Akash
2016-06-27 12:16 ` [PATCH 04/11] drm/i915: Support for GuC interrupts akash.goel
2016-06-28 10:03   ` Tvrtko Ursulin
2016-06-28 11:12     ` Goel, Akash
2016-06-28 13:44       ` Tvrtko Ursulin
2016-07-01  6:16         ` Goel, Akash
2016-07-01  8:47           ` Tvrtko Ursulin
2016-07-01  9:57             ` Goel, Akash
2016-06-27 12:16 ` [PATCH 05/11] drm/i915: Handle log buffer flush interrupt event from GuC akash.goel
2016-06-27 12:16 ` [PATCH 06/11] drm/i915: Add a relay backed debugfs interface for capturing GuC logs akash.goel
2016-06-27 14:23   ` kbuild test robot
2016-06-27 17:50   ` kbuild test robot
2016-06-28  9:47   ` Chris Wilson
2016-06-28 10:01     ` Goel, Akash [this message]
2016-06-27 12:16 ` [PATCH 07/11] drm/i915: Forcefully flush GuC log buffer on reset akash.goel
2016-06-27 12:16 ` [PATCH 08/11] drm/i915: Debugfs support for GuC logging control akash.goel
2016-06-27 12:16 ` [PATCH 09/11] drm/i915: New module param to control the size of buffer used for storing GuC firmware logs akash.goel
2016-06-27 13:31   ` Jani Nikula
2016-06-27 14:55     ` Goel, Akash
2016-06-27 12:16 ` [PATCH 10/11] drm/i915: Support to create write combined type vmaps akash.goel
2016-06-28  9:52   ` Chris Wilson
2016-06-28 10:25     ` Goel, Akash
2016-06-28 10:42       ` Chris Wilson
2016-06-27 12:16 ` [PATCH 11/11] drm/i915: Use uncached(WC) mapping for acessing the GuC log buffer akash.goel
2016-06-27 13:46 ` ✗ Ro.CI.BAT: failure for Support for sustained capturing of GuC firmware logs (rev3) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2016-06-10 13:36 [PATCH 00/11] Support for sustained capturing of GuC firmware logs akash.goel
2016-06-10 13:36 ` [PATCH 06/11] drm/i915: Add a relay backed debugfs interface for capturing GuC logs akash.goel

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=40333fbf-83b1-5c89-468f-3df652c4a4ad@intel.com \
    --to=akash.goel@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sourab.gupta@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.