aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2025-09-08 14:30:20 +0200
committerMichal Wajdeczko <michal.wajdeczko@intel.com>2025-09-09 11:27:45 +0200
commitaa8d9d75ea9ba6cb827ff96228b0204783f1d706 (patch)
tree64ac94162594db3ee5ea73293c5c7124ae462b18 /drivers/gpu
parentdrm/xe/guc: Use proper flag definitions when registering context (diff)
downloadlinux-aa8d9d75ea9ba6cb827ff96228b0204783f1d706.tar.gz
linux-aa8d9d75ea9ba6cb827ff96228b0204783f1d706.zip
drm/xe/vf: Drop IS_VF_CCS_INIT_NEEDED macro
We only use this macro once and we can open-code it to explicitly show relevant conditions and avoid duplications. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com> Link: https://lore.kernel.org/r/20250908123025.747-4-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/xe/xe_sriov_vf_ccs.c6
-rw-r--r--drivers/gpu/drm/xe/xe_sriov_vf_ccs_types.h6
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c b/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
index 19786f64a7da..b01bb3660fb1 100644
--- a/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
+++ b/drivers/gpu/drm/xe/xe_sriov_vf_ccs.c
@@ -15,6 +15,7 @@
#include "xe_migrate.h"
#include "xe_sa.h"
#include "xe_sriov_printk.h"
+#include "xe_sriov_vf.h"
#include "xe_sriov_vf_ccs.h"
#include "xe_sriov_vf_ccs_types.h"
@@ -263,7 +264,10 @@ int xe_sriov_vf_ccs_init(struct xe_device *xe)
u32 flags;
int err;
- if (!IS_VF_CCS_INIT_NEEDED(xe))
+ xe_assert(xe, IS_SRIOV_VF(xe));
+ xe_assert(xe, xe_sriov_vf_migration_supported(xe));
+
+ if (IS_DGFX(xe) || !xe_device_has_flat_ccs(xe))
return 0;
for_each_ccs_rw_ctx(ctx_id) {
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..0df6b4130e7c 100644
--- a/drivers/gpu/drm/xe/xe_sriov_vf_ccs_types.h
+++ b/drivers/gpu/drm/xe/xe_sriov_vf_ccs_types.h
@@ -15,12 +15,6 @@
___xe->sriov.vf.ccs.initialized; \
})
-#define IS_VF_CCS_INIT_NEEDED(xe) ({\
- struct xe_device *___xe = (xe); \
- IS_SRIOV_VF(___xe) && !IS_DGFX(___xe) && \
- xe_device_has_flat_ccs(___xe) && GRAPHICS_VER(___xe) >= 20; \
- })
-
enum xe_sriov_vf_ccs_rw_ctxs {
XE_SRIOV_VF_CCS_READ_CTX,
XE_SRIOV_VF_CCS_WRITE_CTX,