aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Wajdeczko <[email protected]>2024-06-22 11:42:53 +0200
committerRodrigo Vivi <[email protected]>2024-06-26 18:24:51 -0400
commit20baedb8033d0ba6ae382fc9974b481fdb32e7ef (patch)
tree34212323cc3752540de303f2c86dc82514d970f5
parent7e5161da9d267957b726a29f3efe6cb50fdfed04 (diff)
drm/xe/vf: Skip attempt to start GuC PC if VF
We have already marked the GuC PC feature as not applicable for VF devices, but we missed the fact that there may be still some privileged activities performed by this component, who does much more than its name suggests. Explicitly skip xe_guc_pc_start() if running as a VF driver and use a GT oriented message to report any error. v2: also skip xe_guc_pc_stop (Vinay) Signed-off-by: Michal Wajdeczko <[email protected]> Cc: Vinay Belgaumkar <[email protected]> Cc: Matthew Brost <[email protected]> Reviewed-by: Vinay Belgaumkar <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]>
-rw-r--r--drivers/gpu/drm/xe/xe_guc.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index 172b65a50e31..eb655cee19f7 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -1113,7 +1113,13 @@ void xe_guc_reset_wait(struct xe_guc *guc)
void xe_guc_stop_prepare(struct xe_guc *guc)
{
- XE_WARN_ON(xe_guc_pc_stop(&guc->pc));
+ if (!IS_SRIOV_VF(guc_to_xe(guc))) {
+ int err;
+
+ err = xe_guc_pc_stop(&guc->pc);
+ xe_gt_WARN(guc_to_gt(guc), err, "Failed to stop GuC PC: %pe\n",
+ ERR_PTR(err));
+ }
}
void xe_guc_stop(struct xe_guc *guc)
@@ -1125,10 +1131,13 @@ void xe_guc_stop(struct xe_guc *guc)
int xe_guc_start(struct xe_guc *guc)
{
- int ret;
+ if (!IS_SRIOV_VF(guc_to_xe(guc))) {
+ int err;
- ret = xe_guc_pc_start(&guc->pc);
- XE_WARN_ON(ret);
+ err = xe_guc_pc_start(&guc->pc);
+ xe_gt_WARN(guc_to_gt(guc), err, "Failed to start GuC PC: %pe\n",
+ ERR_PTR(err));
+ }
return xe_guc_submit_start(guc);
}