[PATCH] drm/xe/pm: hide d3cold sysfs threshold

Rodrigo Vivi rodrigo.vivi at intel.com
Wed Feb 21 17:52:38 UTC 2024


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 at intel.com>
> Cc: Anshuman Gupta <anshuman.gupta at intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi at 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 at 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
> 


More information about the Intel-xe mailing list