All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Harrison <John.C.Harrison@Intel.com>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 4/6] drm/i915/debugfs: move uC printers and update debugfs file names
Date: Wed, 25 Mar 2020 10:35:43 -0700	[thread overview]
Message-ID: <c90f5adb-f527-728c-49f8-75ad54a7d48e@Intel.com> (raw)
In-Reply-To: <83af4518-a3cb-5066-7eff-cf1f2dacf3ab@intel.com>

On 3/25/2020 10:14, Daniele Ceraolo Spurio wrote:
> On 3/25/20 10:05 AM, John Harrison wrote:
>> On 3/11/2020 18:16, Daniele Ceraolo Spurio wrote:
>>> Move the printers to the respective files for clarity. The
>>> guc_load_status debugfs has been squashed in the guc_info one, has
>>> having separate ones wasn't very useful. The HuC debugfs has been
>>> renamed huc_info to match.
>>>
>>> v2: keep printing HUC_STATUS2 (Tony), avoid const->non-const
>>>      container_of (Jani)
>>>
>>> Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>>> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>>> Cc: John Harrison <John.C.Harrison@Intel.com>
>>> Cc: Matthew Brost <matthew.brost@intel.com>
>>> Cc: Tony Ye <tony.ye@intel.com>
>>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>>> ---
>>> <snip>
>>>
>>> +static int i915_huc_info(struct seq_file *m, void *data)
>>>   {
>>>       struct drm_i915_private *dev_priv = node_to_i915(m->private);
>>> -    intel_wakeref_t wakeref;
>>> -    struct drm_printer p;
>>> -
>>> -    if (!HAS_GT_UC(dev_priv))
>>> -        return -ENODEV;
>>> -
>>> -    p = drm_seq_file_printer(m);
>>> -    intel_uc_fw_dump(&dev_priv->gt.uc.huc.fw, &p);
>>> -
>>> -    with_intel_runtime_pm(&dev_priv->runtime_pm, wakeref)
>>> -        seq_printf(m, "\nHuC status 0x%08x:\n", 
>>> I915_READ(HUC_STATUS2));
>>> -
>>> -    return 0;
>>> -}
>>> -
>>> -static int i915_guc_load_status_info(struct seq_file *m, void *data)
>>> -{
>>> -    struct drm_i915_private *dev_priv = node_to_i915(m->private);
>>> -    intel_wakeref_t wakeref;
>>> -    struct drm_printer p;
>>> +    struct intel_huc *huc = &dev_priv->gt.uc.huc;
>>> +    struct drm_printer p = drm_seq_file_printer(m);
>>> -    if (!HAS_GT_UC(dev_priv))
>>> +    if (!intel_huc_is_supported(huc))
>>>           return -ENODEV;
>> Isn't this test duplicated inside intel_huc_load_status() with a 
>> print of 'HuC not supported'? So no need to fail the call here?
>>
>
> intel_huc_load_status is now a generic printer which can be called 
> from other places, so it needs to print useful messages in all cases. 
> From the debugfs POV, I didn't want to change the legacy behavior of 
> returning -ENODEV on platforms that don't support the blob, which IMO 
> is a clear eough indication of the lack of support. Note that in the 
> next patch the code is changed so that the debgufs files are not even 
> created if there is no uC support on the platforms (this is in line 
> with what we do for other GT features).
>
> Daniele
>
Okay. That makes sense.

Reviewed-by: John Harrison <John.C.Harrison@Intel.com>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-03-25 17:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12  1:16 [Intel-gfx] [PATCH v2 0/6] Re-org uC debugfs files and move them under GT Daniele Ceraolo Spurio
2020-03-12  1:16 ` [Intel-gfx] [PATCH v2 1/6] drm/i915/gt: allow setting generic data pointer Daniele Ceraolo Spurio
2020-03-12  1:16 ` [Intel-gfx] [PATCH v2 2/6] drm/i915/guc: drop stage_pool debugfs Daniele Ceraolo Spurio
2020-03-13 11:37   ` Andi Shyti
2020-03-12  1:16 ` [Intel-gfx] [PATCH v2 3/6] drm/i915/huc: make "support huc" reflect HW capabilities Daniele Ceraolo Spurio
2020-03-13 14:55   ` Andi Shyti
2020-03-25 16:49   ` John Harrison
2020-03-12  1:16 ` [Intel-gfx] [PATCH v2 4/6] drm/i915/debugfs: move uC printers and update debugfs file names Daniele Ceraolo Spurio
2020-03-25 17:05   ` John Harrison
2020-03-25 17:14     ` Daniele Ceraolo Spurio
2020-03-25 17:35       ` John Harrison [this message]
2020-03-12  1:16 ` [Intel-gfx] [PATCH v2 5/6] drm/i915/uc: Move uC debugfs to its own folder under GT Daniele Ceraolo Spurio
2020-03-12  9:10   ` Jani Nikula
2020-03-13 15:38   ` Andi Shyti
2020-03-25 21:03   ` Daniele Ceraolo Spurio
2020-03-12  1:16 ` [Intel-gfx] [PATCH v2 6/6] drm/i915/uc: do not free err log on uc_fini Daniele Ceraolo Spurio
2020-03-25 17:58   ` John Harrison
2020-03-25 18:03     ` Daniele Ceraolo Spurio
2020-03-25 18:05       ` John Harrison
2020-03-12  4:10 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Re-org uC debugfs files and move them under GT (rev2) Patchwork
2020-03-12  4:14 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-03-12  4:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-03-12 22:43 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-03-25  1:47 ` [Intel-gfx] [PATCH v2 0/6] Re-org uC debugfs files and move them under GT Andi Shyti
2020-03-25 16:25   ` Daniele Ceraolo Spurio

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=c90f5adb-f527-728c-49f8-75ad54a7d48e@Intel.com \
    --to=john.c.harrison@intel.com \
    --cc=daniele.ceraolospurio@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 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.