All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: "Belgaumkar, Vinay" <vinay.belgaumkar@intel.com>,
	intel-xe@lists.freedesktop.org,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [PATCH] drm/xe/guc: Request max GT freq during resume
Date: Mon, 3 Jun 2024 21:17:08 +0200	[thread overview]
Message-ID: <248127cd-0ada-458c-bd07-2f2fa9d2e58a@intel.com> (raw)
In-Reply-To: <bd32e680-e4ed-4269-a634-d97b2dafd968@intel.com>



On 03.06.2024 21:06, Belgaumkar, Vinay wrote:
> 
> On 6/3/2024 8:28 AM, Michal Wajdeczko wrote:
>>
>> On 31.05.2024 23:42, Vinay Belgaumkar wrote:
>>> We already request max freq in the load path, moving it
>>> to __xe_guc_upload will ensure this speeds up GuC load in
>>> the resume path as well.
>>>
>>> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
>>> ---
>>>   drivers/gpu/drm/xe/xe_guc.c | 6 +++---
>>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
>>> index f7886c00af01..63e1b685bd4f 100644
>>> --- a/drivers/gpu/drm/xe/xe_guc.c
>>> +++ b/drivers/gpu/drm/xe/xe_guc.c
>>> @@ -694,6 +694,9 @@ static int __xe_guc_upload(struct xe_guc *guc)
>>>   {
>>>       int ret;
>>>   +    /* Raise GT freq to speed up HuC/GuC load */
>>> +    xe_guc_pc_init_early(&guc->pc);
>> maybe it's just me, but usually we were using _init_early() name suffix
>> for functions with some early, one-time, likely software-only
>> initialization, while here this xe_guc_pc_init_early() seems to be doing
>> something else and now it could even be called many times
> 
> It is initializing the internal variables to the fused frequency values
> as well. It is still being called only once so far. This patch just
> changes where it is called from.

this is now called from xe_uc_init_hw(), so not once per driver load:

/*
 * Should be called during driver load, after every GT reset, and after
every
 * suspend to reload / auth the firmwares.
 */
int xe_uc_init_hw(struct xe_uc *uc)
{
...	ret = xe_guc_upload(&uc->guc);


int xe_guc_upload(struct xe_guc *guc)
{
...	return __xe_guc_upload(guc);

> 
> Also, as of now, I don't see any other location where we could call this
> from. If that happens, we can rename the function.
> 
> Thanks,
> 
> Vinay.
> 
>>
>> maybe it should be split/renamed to xe_guc_pc_boost() or something?
>>
>>> +
>>>       guc_write_params(guc);
>>>       guc_prepare_xfer(guc);
>>>   @@ -779,9 +782,6 @@ int xe_guc_min_load_for_hwconfig(struct xe_guc
>>> *guc)
>>>         xe_guc_ads_populate_minimal(&guc->ads);
>>>   -    /* Raise GT freq to speed up HuC/GuC load */
>>> -    xe_guc_pc_init_early(&guc->pc);
>>> -
>>>       ret = __xe_guc_upload(guc);
>>>       if (ret)
>>>           return ret;

  reply	other threads:[~2024-06-03 19:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31 21:42 [PATCH] drm/xe/guc: Request max GT freq during resume Vinay Belgaumkar
2024-05-31 21:49 ` ✓ CI.Patch_applied: success for " Patchwork
2024-05-31 21:49 ` ✓ CI.checkpatch: " Patchwork
2024-05-31 21:50 ` ✓ CI.KUnit: " Patchwork
2024-05-31 22:02 ` ✓ CI.Build: " Patchwork
2024-05-31 22:02 ` ✗ CI.Hooks: failure " Patchwork
2024-05-31 22:04 ` ✓ CI.checksparse: success " Patchwork
2024-05-31 22:27 ` ✓ CI.BAT: " Patchwork
2024-05-31 23:50 ` ✗ CI.FULL: failure " Patchwork
2024-06-03 15:28 ` [PATCH] " Michal Wajdeczko
2024-06-03 19:06   ` Belgaumkar, Vinay
2024-06-03 19:17     ` Michal Wajdeczko [this message]
2024-06-03 19:26       ` Belgaumkar, Vinay

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=248127cd-0ada-458c-bd07-2f2fa9d2e58a@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=vinay.belgaumkar@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.