From: "Belgaumkar, Vinay" <vinay.belgaumkar@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/xe: Check skip_guc_pc before setting SLPC flag
Date: Mon, 8 Jan 2024 10:18:27 -0800 [thread overview]
Message-ID: <8f1ff9d3-c214-40d6-a7a9-cdf0690919a2@intel.com> (raw)
In-Reply-To: <2ypah5a7qa5erqw2ha7mj2zs3mblomtnpu2yahu2bbyojblsm3@qvpuxz6cgo5d>
On 1/8/2024 10:14 AM, Lucas De Marchi wrote:
> On Thu, Jan 04, 2024 at 04:33:41PM -0800, Vinay Belgaumkar wrote:
>> Don't set SLPC GuC feature ctl flag if skip_guc_pc is true.
>>
>> v2: Skip the freq related sysfs creation as well (Badal)
>>
>> Fixes: 975e4a3795d4 ("drm/xe: Manually setup C6 when skip_guc_pc is
>> set")
>> Fixes: bef52b5c7a19 ("drm/xe: Create a xe_gt_freq component for raw
>> management and sysfs")
>> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
>> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_gt_freq.c | 3 +++
>> drivers/gpu/drm/xe/xe_guc.c | 7 ++++++-
>> 2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_gt_freq.c
>> b/drivers/gpu/drm/xe/xe_gt_freq.c
>> index 3adfa6686e7c..e5b0f4ecdbe8 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_freq.c
>> +++ b/drivers/gpu/drm/xe/xe_gt_freq.c
>> @@ -196,6 +196,9 @@ void xe_gt_freq_init(struct xe_gt *gt)
>> struct xe_device *xe = gt_to_xe(gt);
>> int err;
>>
>> + if (xe->info.skip_guc_pc)
>> + return;
>> +
>> gt->freq = kobject_create_and_add("freq0", gt->sysfs);
>> if (!gt->freq) {
>> drm_warn(&xe->drm, "failed to add freq0 directory to %s\n",
>> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
>> index 811e8b201270..0e112b144ec8 100644
>> --- a/drivers/gpu/drm/xe/xe_guc.c
>> +++ b/drivers/gpu/drm/xe/xe_guc.c
>> @@ -62,7 +62,12 @@ static u32 guc_ctl_debug_flags(struct xe_guc *guc)
>>
>> static u32 guc_ctl_feature_flags(struct xe_guc *guc)
>> {
>> - return GUC_CTL_ENABLE_SLPC;
>> + u32 flags = 0;
>> +
>> + if (!(guc_to_xe(guc))->info.skip_guc_pc)
>
> I was about to apply this, but then noticed this weird parenthesis.
> Did you intend to do !(guc_to_xe(guc)->info.skip_guc_pc) to clarify the
> operator precedence? Anyway, the parenthesis is not really needed and
> also not used anywhere else in the code base
> (git grep -e '_to_xe.*->info')... it's actually confusing.
Ok, we can remove the parenthesis in that case. Should I resend with that?
Thanks,
Vinay.
>
> Lucas De Marchi
>
>> + flags |= GUC_CTL_ENABLE_SLPC;
>> +
>> + return flags;
>> }
>>
>> static u32 guc_ctl_log_params_flags(struct xe_guc *guc)
>> --
>> 2.38.1
>>
prev parent reply other threads:[~2024-01-08 18:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 0:33 [PATCH v2] drm/xe: Check skip_guc_pc before setting SLPC flag Vinay Belgaumkar
2024-01-05 0:36 ` ✓ CI.Patch_applied: success for drm/xe: Check skip_guc_pc before setting SLPC flag (rev3) Patchwork
2024-01-05 0:37 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-05 0:37 ` ✓ CI.KUnit: success " Patchwork
2024-01-05 0:45 ` ✓ CI.Build: " Patchwork
2024-01-05 0:46 ` ✓ CI.Hooks: " Patchwork
2024-01-05 0:47 ` ✓ CI.checksparse: " Patchwork
2024-01-05 1:22 ` ✓ CI.BAT: " Patchwork
2024-01-05 6:49 ` [PATCH v2] drm/xe: Check skip_guc_pc before setting SLPC flag Nilawar, Badal
2024-01-08 18:14 ` Lucas De Marchi
2024-01-08 18:18 ` Belgaumkar, Vinay [this message]
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=8f1ff9d3-c214-40d6-a7a9-cdf0690919a2@intel.com \
--to=vinay.belgaumkar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@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