[PATCH] drm/xe/vf: Enable CCS save/restore only on supported GUC versions
Michal Wajdeczko
michal.wajdeczko at intel.com
Tue Aug 19 15:27:26 UTC 2025
On 8/18/2025 2:00 PM, Satyanarayana K V P wrote:
> CCS save/restore is supported starting with GuC compatibility version
> 1.23.0. Gate the feature on the GuC firmware version and keep it disabled
> on older or unsupported versions.
>
you probably want to add
Fixes: f3009272ff2e ("drm/xe/vf: Create contexts for CCS read write")
> Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p at intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> ---
> drivers/gpu/drm/xe/xe_sriov.c | 1 +
> drivers/gpu/drm/xe/xe_sriov_vf_ccs_types.h | 4 +++-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_sriov.c b/drivers/gpu/drm/xe/xe_sriov.c
> index 87911fb4eea7..27f70b5eb4c0 100644
> --- a/drivers/gpu/drm/xe/xe_sriov.c
> +++ b/drivers/gpu/drm/xe/xe_sriov.c
> @@ -11,6 +11,7 @@
>
> #include "xe_assert.h"
> #include "xe_device.h"
> +#include "xe_guc.h"
> #include "xe_mmio.h"
> #include "xe_sriov.h"
> #include "xe_sriov_pf.h"
> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf_ccs_types.h b/drivers/gpu/drm/xe/xe_sriov_vf_ccs_types.h
> index 93435a6f4cb6..928266580221 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_vf_ccs_types.h
> +++ b/drivers/gpu/drm/xe/xe_sriov_vf_ccs_types.h
> @@ -17,8 +17,10 @@
>
> #define IS_VF_CCS_INIT_NEEDED(xe) ({\
> struct xe_device *___xe = (xe); \
> + struct xe_guc *___guc = &___xe->tiles[0].primary_gt->uc.guc; \
> IS_SRIOV_VF(___xe) && !IS_DGFX(___xe) && \
> - xe_device_has_flat_ccs(___xe) && GRAPHICS_VER(___xe) >= 20; \
> + xe_device_has_flat_ccs(___xe) && GRAPHICS_VER(___xe) >= 20 && \
> + GUC_SUBMIT_VER(___guc) >= MAKE_GUC_VER(1, 23, 0); \
> })
hmm, if we include this check here, then we wont be able to
tell the user that potentially required CCS S/R will not work
due to old firmware and there might be some issues with that
maybe we need two checks:
one if this is NEEDED and other, if it is SUPPORTED
btw, those checks should be rather defined as functions in .c
not macro in types.h but that's subject for other cleanup
>
> enum xe_sriov_vf_ccs_rw_ctxs {
More information about the Intel-xe
mailing list