From: Rodrigo Vivi Date: Wed, 22 May 2024 17:01:05 +0000 (-0400) Subject: drm/xe: Enable D3Cold on 'low' VRAM utilization X-Git-Tag: v6.11-rc1~141^2~26^2~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f91806033fb7ed1eb7e110849dd48f41c4fe4d4a;p=thirdparty%2Flinux.git drm/xe: Enable D3Cold on 'low' VRAM utilization Now that we eliminated all the mem_access get/put with its locking issues from the inner calls of migration, we can allow D3Cold. Enable it when VRAM utilization is lower then 300Mb. On higher utilization we only allow D3hot so we don't increase so much the latency on runtime resume due to the memory restoration. Reviewed-by: Matthew Brost Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20240522170105.327472-7-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi --- diff --git a/drivers/gpu/drm/xe/xe_pm.h b/drivers/gpu/drm/xe/xe_pm.h index f694005db2782..104a21ae6dfd0 100644 --- a/drivers/gpu/drm/xe/xe_pm.h +++ b/drivers/gpu/drm/xe/xe_pm.h @@ -8,12 +8,7 @@ #include -/* - * TODO: Threshold = 0 will block D3Cold. - * Before we can move this to a higher value (like 300), we need to: - * 1. rewrite the VRAM save / restore to avoid buffer object locks - */ -#define DEFAULT_VRAM_THRESHOLD 0 /* in MB */ +#define DEFAULT_VRAM_THRESHOLD 300 /* in MB */ struct xe_device;