Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Matthew Auld <matthew.auld@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	Anshuman Gupta <anshuman.gupta@intel.com>
Subject: Re: [PATCH] drm/xe/pm: hide d3cold sysfs threshold
Date: Wed, 21 Feb 2024 12:52:38 -0500	[thread overview]
Message-ID: <ZdY4ZruHIJVNwRV6@intel.com> (raw)
In-Reply-To: <20240221171008.196673-2-matthew.auld@intel.com>

On Wed, Feb 21, 2024 at 05:10:09PM +0000, Matthew Auld wrote:
> There are known deadlocks and lockdep splats with d3cold and dgpu, which
> is why it is disabled by default. However we still don't want CI or
> actual users trying to override the DEFAULT_VRAM_THRESHOLD and then end
> up enabling d3cold support. For now keep the sysfs hidden if
> DEFAULT_VRAM_THRESHOLD is zero.
> 
> References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1246
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Anshuman Gupta <anshuman.gupta@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_pm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> index ab283e9a8b4e..829f165e30b4 100644
> --- a/drivers/gpu/drm/xe/xe_pm.c
> +++ b/drivers/gpu/drm/xe/xe_pm.c
> @@ -189,7 +189,8 @@ void xe_pm_init(struct xe_device *xe)
>  	xe->d3cold.capable = xe_pm_pci_d3cold_capable(xe);
>  
>  	if (xe->d3cold.capable) {
> -		xe_device_sysfs_init(xe);
> +		if (DEFAULT_VRAM_THRESHOLD)

what about using the module param as a check condition here?
So we woudn't need to build to run some test.

But anyway, we do need some protection here and remove this sysfs
at least while this is not fixed for good.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

I'm even wondering if we shouldn't move this from the debugfs
to sysfs and avoid this at all...

> +			xe_device_sysfs_init(xe);
>  		xe_pm_set_vram_threshold(xe, DEFAULT_VRAM_THRESHOLD);
>  	}
>  
> -- 
> 2.43.0
> 

      parent reply	other threads:[~2024-02-21 17:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21 17:10 [PATCH] drm/xe/pm: hide d3cold sysfs threshold Matthew Auld
2024-02-21 17:16 ` ✓ CI.Patch_applied: success for " Patchwork
2024-02-21 17:16 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-21 17:17 ` ✓ CI.KUnit: success " Patchwork
2024-02-21 17:27 ` ✓ CI.Build: " Patchwork
2024-02-21 17:28 ` ✓ CI.Hooks: " Patchwork
2024-02-21 17:29 ` ✓ CI.checksparse: " Patchwork
2024-02-21 17:50 ` ✓ CI.BAT: " Patchwork
2024-02-21 17:52 ` Rodrigo Vivi [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=ZdY4ZruHIJVNwRV6@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@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