Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Filipchuk <julia.filipchuk@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	Zhanjun Dong <zhanjun.dong@intel.com>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v1] drm/xe/guc: Disable lite restore for MTL
Date: Tue, 18 Mar 2025 14:35:25 -0700	[thread overview]
Message-ID: <88cd142c-3369-4e05-9de3-e6970d4c1ee9@intel.com> (raw)
In-Reply-To: <4928bef5-a008-4af2-80ca-d7c5bddeb671@intel.com>

On 3/18/2025 7:35 AM, Michal Wajdeczko wrote:
> 
> 
> On 18.03.2025 15:18, Zhanjun Dong wrote:
>> Lite restore for MTL is not POR for Xe, then disable it for MTL.
>>
>> Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
>> ---
>>  drivers/gpu/drm/xe/xe_guc.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
>> index bc5714a5b36b..0c2629e578d9 100644
>> --- a/drivers/gpu/drm/xe/xe_guc.c
>> +++ b/drivers/gpu/drm/xe/xe_guc.c
>> @@ -80,7 +80,9 @@ static u32 guc_ctl_debug_flags(struct xe_guc *guc)
>>  
>>  static u32 guc_ctl_feature_flags(struct xe_guc *guc)
>>  {
>> -	u32 flags = GUC_CTL_ENABLE_LITE_RESTORE;
>> +	u32 flags = (guc_to_xe(guc)->info.platform == XE_METEORLAKE) ?
>> +		    0 : GUC_CTL_ENABLE_LITE_RESTORE;
>> +
> 
> please avoid long conditional initialization code,
> all this could be done in a simpler/unified way:
> 
> 	struct xe_device *xe = guc_to_xe(guc);
> 	u32 flags = 0;
> 
> 	if (xe->info.platform != XE_METEORLAKE)
> 		flags |= GUC_CTL_ENABLE_LITE_RESTORE;
> 
>>  
>>  	if (!guc_to_xe(guc)->info.skip_guc_pc)
>>  		flags |= GUC_CTL_ENABLE_SLPC;
> 

Agreed with this suggestion for clarity. Since GUC_CTL_ENABLE_LITE_RESTORE is
the default suggest just clearing it for MTL instead of an enable-if-not.

	struct xe_device *xe = guc_to_xe(guc);
	u32 flags = GUC_CTL_ENABLE_LITE_RESTORE;

	if (xe->info.platform == XE_METEORLAKE)
		flags &= ~GUC_CTL_ENABLE_LITE_RESTORE;

	if (!xe->info.skip_guc_pc)
		flags |= GUC_CTL_ENABLE_SLPC;

Also, if updated the replace the additional guc_to_xe(guc) in the function.


Reviewed-by: Julia Filipchuk <julia.filipchuk@intel.com>

  reply	other threads:[~2025-03-18 21:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18 14:18 [PATCH v1] drm/xe/guc: Disable lite restore for MTL Zhanjun Dong
2025-03-18 14:32 ` ✓ CI.Patch_applied: success for " Patchwork
2025-03-18 14:32 ` ✓ CI.checkpatch: " Patchwork
2025-03-18 14:33 ` ✓ CI.KUnit: " Patchwork
2025-03-18 14:35 ` [PATCH v1] " Michal Wajdeczko
2025-03-18 21:35   ` Julia Filipchuk [this message]
2025-03-19 15:29     ` Dong, Zhanjun
2025-03-18 14:50 ` ✓ CI.Build: success for " Patchwork
2025-03-18 14:52 ` ✓ CI.Hooks: " Patchwork
2025-03-18 14:53 ` ✓ CI.checksparse: " Patchwork
2025-03-18 15:13 ` ✓ Xe.CI.BAT: " Patchwork
2025-03-18 16:13 ` ✓ Xe.CI.Full: " 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=88cd142c-3369-4e05-9de3-e6970d4c1ee9@intel.com \
    --to=julia.filipchuk@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@intel.com \
    --cc=zhanjun.dong@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