[Intel-xe] [PATCH] drm/xe: Enable d3cold support for dgfx

Rodrigo Vivi rodrigo.vivi at kernel.org
Thu Apr 20 20:48:06 UTC 2023


On Thu, Apr 13, 2023 at 12:55:54PM +0530, Riana Tauro wrote:
> allow d3cold for dgfx as xe_bo_restore_kernel
> bug is fixed.
> 
> Signed-off-by: Riana Tauro <riana.tauro at intel.com>

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

and pushed. Thank you so much for fixing it...

I also tested it on my DG2 here and it survived well :)

$ sudo ./build/tests/xe_pm --r d3cold-multiple-execs
IGT-Version: 1.27.1-g1a619e8d (x86_64) (Linux: 6.3.0-rc4+ x86_64)
Starting subtest: d3cold-multiple-execs
Subtest d3cold-multiple-execs: SUCCESS (17.087s)


> ---
>  drivers/gpu/drm/xe/xe_pci.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index b92d8b5a391e..79cc0b8f197a 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -750,13 +750,8 @@ static int xe_pci_runtime_idle(struct device *dev)
>  	struct pci_dev *pdev = to_pci_dev(dev);
>  	struct xe_device *xe = pdev_to_xe_device(pdev);
>  
> -	/*
> -	 * FIXME: d3cold should be allowed (true) if
> -	 * (IS_DGFX(xe) && !xe_device_mem_access_ongoing(xe))
> -	 * however the change to the buddy allocator broke the
> -	 * xe_bo_restore_kernel when the pci device is disabled
> -	 */
> -	 xe->d3cold_allowed = false;
> +	if (IS_DGFX(xe) && !xe_device_mem_access_ongoing(xe))
> +		xe->d3cold_allowed = true;
>  
>  	return 0;
>  }
> -- 
> 2.40.0
> 


More information about the Intel-xe mailing list