From: Jordan Justen <jordan.l.justen@intel.com>
To: John Harrison <john.c.harrison@intel.com>,
Michal Wajdeczko <michal.wajdeczko@intel.com>,
intel-gfx <intel-gfx@lists.freedesktop.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH v5 1/4] drm/i915/guc: Add fetch of hwconfig table
Date: Thu, 24 Feb 2022 21:03:50 -0800 [thread overview]
Message-ID: <87y21zh70p.fsf@jljusten-skl> (raw)
In-Reply-To: <621be0f6-63e3-a8fb-93e3-e581bf4b2d4b@intel.com>
John Harrison <john.c.harrison@intel.com> writes:
> On 2/22/2022 02:36, Jordan Justen wrote:
>> From: John Harrison <John.C.Harrison@Intel.com>
>>
>> Implement support for fetching the hardware description table from the
>> GuC. The call is made twice - once without a destination buffer to
>> query the size and then a second time to fill in the buffer.
>>
>> Note that the table is only available on ADL-P and later platforms.
>>
>> v5 (of Jordan's posting):
>> * Various changes made by Jordan and recommended by Michal
>> - Makefile ordering
>> - Adjust "struct intel_guc_hwconfig hwconfig" comment
>> - Set Copyright year to 2022 in intel_guc_hwconfig.c/.h
>> - Drop inline from hwconfig_to_guc()
>> - Replace hwconfig param with guc in __guc_action_get_hwconfig()
>> - Move zero size check into guc_hwconfig_discover_size()
>> - Change comment to say zero size offset/size is needed to get size
>> - Add has_guc_hwconfig to devinfo and drop has_table()
>> - Change drm_err to notice in __uc_init_hw() and use %pe
>>
>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
>> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
>> Acked-by: Jon Bloomfield <jon.bloomfield@intel.com>
>> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
>> ---
>>
>> + ret = intel_guc_hwconfig_init(&guc->hwconfig);
>> + if (ret)
>> + drm_notice(&i915->drm, "Failed to retrieve hwconfig table: %pe\n",
> Why only drm_notice? As you are keen to point out, the UMDs won't work
> if the table is not available. All the failure paths in your own
> verification function are 'drm_err'. So why is it only a 'notice' if
> there is no table at all?
This was requested by Michal in my v3 posting:
https://patchwork.freedesktop.org/patch/472936/?series=99787&rev=3
I don't think that it should be a failure for i915 if it is unable to
read the table, or if the table read is invalid. I think it should be up
to the UMD to react to the missing hwconfig however they think is
appropriate, but I would like the i915 to guarantee & document the
format returned to userspace to whatever extent is feasible.
As you point out there is a discrepancy, and I think I should be
consistent with whatever is used here in my "drm/i915/guc: Verify
hwconfig blob matches supported format" patch.
I guess I'd tend to agree with Michal that "maybe drm_notice since we
continue probe", but I would go along with either if you two want to
discuss further.
> Note that this function is called as part of the reset path. The reset
> path is not allowed to allocate memory. The table is stored in a
> dynamically allocated object. Hence the IGT test failure. The table
> query has to be done elsewhere at driver init time only.
Thanks for clearing this up. I did notice on dg2 that gpu resets were
causing a re-read of the hwconfig from GuC, but it definitely was not
clear to me that there would be a connection to the IGT failure that you
pointed out.
>
>> + ERR_PTR(ret));
>> +
>> ret = guc_enable_communication(guc);
>> if (ret)
>> goto err_log_capture;
>> @@ -562,6 +567,8 @@ static void __uc_fini_hw(struct intel_uc *uc)
>> if (intel_uc_uses_guc_submission(uc))
>> intel_guc_submission_disable(guc);
>>
>> + intel_guc_hwconfig_fini(&guc->hwconfig);
>> +
>> __uc_sanitize(uc);
>> }
>>
>> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
>> index 76e590fcb903..1d31e35a5154 100644
>> --- a/drivers/gpu/drm/i915/i915_pci.c
>> +++ b/drivers/gpu/drm/i915/i915_pci.c
>> @@ -990,6 +990,7 @@ static const struct intel_device_info adl_p_info = {
>> BIT(RCS0) | BIT(BCS0) | BIT(VECS0) | BIT(VCS0) | BIT(VCS2),
>> .ppgtt_size = 48,
>> .dma_mask_size = 39,
>> + .has_guc_hwconfig = 1,
> Who requested this change? It was previously done this way but the
> instruction was that i915_pci.c is for hardware features only but that
> this, as you seem extremely keen about pointing out at every
> opportunity, is a software feature.
This was requested by Michal as well. I definitely agree it is a
software feature, but I was not aware that "i915_pci.c is for hardware
features only".
Michal, do you agree with this and returning to the previous method for
enabling the feature?
-Jordan
next prev parent reply other threads:[~2022-02-25 5:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 10:36 [Intel-gfx] [PATCH v5 0/4] GuC HWCONFIG with documentation Jordan Justen
2022-02-22 10:36 ` [Intel-gfx] [PATCH v5 1/4] drm/i915/guc: Add fetch of hwconfig table Jordan Justen
2022-02-24 13:58 ` Michal Wajdeczko
2022-02-25 2:17 ` John Harrison
2022-02-25 2:24 ` [Intel-gfx] [PATCH] " John.C.Harrison
2022-02-25 5:03 ` Jordan Justen [this message]
2022-02-25 9:44 ` [Intel-gfx] [PATCH v5 1/4] " Michal Wajdeczko
2022-02-25 13:26 ` Tvrtko Ursulin
2022-02-25 16:46 ` John Harrison
2022-02-25 17:18 ` Tvrtko Ursulin
2022-02-25 18:05 ` Michal Wajdeczko
2022-02-25 18:35 ` Tvrtko Ursulin
2022-02-22 10:36 ` [Intel-gfx] [PATCH v5 2/4] drm/i915/uapi: Add query for hwconfig blob Jordan Justen
2022-02-22 10:36 ` [Intel-gfx] [PATCH v5 3/4] drm/i915/uapi: Add struct drm_i915_query_hwconfig_blob_item Jordan Justen
2022-02-22 10:36 ` [Intel-gfx] [PATCH v5 4/4] drm/i915/guc: Verify hwconfig blob matches supported format Jordan Justen
2022-02-22 11:24 ` Tvrtko Ursulin
2022-02-22 11:28 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for GuC HWCONFIG with documentation (rev5) Patchwork
2022-02-22 11:29 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-22 12:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-25 2:07 ` John Harrison
2022-02-22 13:30 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-02-25 7:20 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for GuC HWCONFIG with documentation (rev6) 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=87y21zh70p.fsf@jljusten-skl \
--to=jordan.l.justen@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=john.c.harrison@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=rodrigo.vivi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox