From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: "Piotr Piórkowski" <piotr.piorkowski@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 2/4] drm/xe/vf: Custom uC initialization
Date: Thu, 6 Jun 2024 15:34:40 +0200 [thread overview]
Message-ID: <2c84433e-4f83-4962-99bb-49fee729a8a0@intel.com> (raw)
In-Reply-To: <20240606113723.veuy3a26aeg7an56@intel.com>
On 06.06.2024 13:37, Piotr Piórkowski wrote:
> Michal Wajdeczko <michal.wajdeczko@intel.com> wrote on wto [2024-cze-04 23:22:29 +0200]:
>> VF drivers can't modify WOPCM registers nor upload firmwares to
>> GuC, HuC or GSC. Modify xe_uc initialization functions to skip
>> those steps if running in the VF mode.
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_uc.c | 33 +++++++++++++++++++++++++++++++++
>> 1 file changed, 33 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_uc.c b/drivers/gpu/drm/xe/xe_uc.c
>> index 85808706d1c8..0f240534fb72 100644
>> --- a/drivers/gpu/drm/xe/xe_uc.c
>> +++ b/drivers/gpu/drm/xe/xe_uc.c
>> @@ -11,9 +11,11 @@
>> #include "xe_gsc_proxy.h"
>> #include "xe_gt.h"
>> #include "xe_gt_printk.h"
>> +#include "xe_gt_sriov_vf.h"
>> #include "xe_guc.h"
>> #include "xe_guc_pc.h"
>> #include "xe_huc.h"
>> +#include "xe_sriov.h"
>> #include "xe_uc_fw.h"
>> #include "xe_wopcm.h"
>>
>> @@ -53,6 +55,9 @@ int xe_uc_init(struct xe_uc *uc)
>> if (!xe_device_uc_enabled(uc_to_xe(uc)))
>> return 0;
>>
>> + if (IS_SRIOV_VF(uc_to_xe(uc)))
>> + return 0;
>> +
>> ret = xe_wopcm_init(&uc->wopcm);
>> if (ret)
>> goto err;
>> @@ -141,6 +146,31 @@ int xe_uc_init_hwconfig(struct xe_uc *uc)
>> return 0;
>> }
>>
>> +static int vf_uc_init_hw(struct xe_uc *uc)
>> +{
>> + int err;
>> +
>> + err = xe_uc_sanitize_reset(uc);
>> + if (err)
>> + return err;
>> +
>> + err = xe_guc_enable_communication(&uc->guc);
>> + if (err)
>> + return err;
>> +
>> + err = xe_gt_sriov_vf_connect(uc_to_gt(uc));
>> + if (err)
>> + return err;
>> +
>> + uc->guc.submission_state.enabled = true;
>> +
>> + err = xe_gt_record_default_lrcs(uc_to_gt(uc));
>> + if (err)
>> + return err;
>> +
>> + return 0;
>> +}
>> +
>> /*
>> * Should be called during driver load, after every GT reset, and after every
>> * suspend to reload / auth the firmwares.
>> @@ -153,6 +183,9 @@ int xe_uc_init_hw(struct xe_uc *uc)
>> if (!xe_device_uc_enabled(uc_to_xe(uc)))
>> return 0;
>>
>> + if (IS_SRIOV_VF(uc_to_xe(uc)))
>> + return vf_uc_init_hw(uc);
>> +
>> ret = xe_huc_upload(&uc->huc);
>> if (ret)
>> return ret;
>
> I would expand the commit description a bit, because you mention what we should
> not do on VF, but here we also add a new vf_uc_init_hw function.
will change commit message to:
"
VF drivers can't modify WOPCM registers nor upload firmwares to
GuC, HuC or GSC. Modify xe_uc initialization functions to skip
those steps if running in the VF mode, or defer to new custom
helper function that would not include those steps.
"
>
> If you expand the description then LGTM:
> Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
thanks!
>
>> --
>> 2.43.0
>>
>
next prev parent reply other threads:[~2024-06-06 13:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 21:22 [PATCH 0/4] VF: Custom init and reset steps Michal Wajdeczko
2024-06-04 21:22 ` [PATCH 1/4] drm/xe/vf: Support only GuC/HuC firmwares Michal Wajdeczko
2024-06-06 11:29 ` Piotr Piórkowski
2024-06-04 21:22 ` [PATCH 2/4] drm/xe/vf: Custom uC initialization Michal Wajdeczko
2024-06-06 11:37 ` Piotr Piórkowski
2024-06-06 13:34 ` Michal Wajdeczko [this message]
2024-06-04 21:22 ` [PATCH 3/4] drm/xe/vf: Custom GuC reset Michal Wajdeczko
2024-06-06 11:38 ` Piotr Piórkowski
2024-06-04 21:22 ` [PATCH 4/4] drm/xe/vf: Custom GT restart Michal Wajdeczko
2024-06-06 11:49 ` Piotr Piórkowski
2024-06-05 5:02 ` ✓ CI.Patch_applied: success for VF: Custom init and reset steps Patchwork
2024-06-05 5:02 ` ✓ CI.checkpatch: " Patchwork
2024-06-05 5:03 ` ✓ CI.KUnit: " Patchwork
2024-06-05 5:15 ` ✓ CI.Build: " Patchwork
2024-06-05 5:15 ` ✗ CI.Hooks: failure " Patchwork
2024-06-05 5:17 ` ✓ CI.checksparse: success " Patchwork
2024-06-05 5:44 ` ✓ CI.BAT: " Patchwork
2024-06-05 15:36 ` ✗ CI.FULL: failure " Patchwork
2024-06-06 13:58 ` Michal Wajdeczko
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=2c84433e-4f83-4962-99bb-49fee729a8a0@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=piotr.piorkowski@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