]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/guc: Ignore GuC CT errors when wedged
authorVinay Belgaumkar <vinay.belgaumkar@intel.com>
Thu, 12 Jun 2025 07:09:00 +0000 (00:09 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 13 Jun 2025 06:23:39 +0000 (23:23 -0700)
Messaging to GuC may get canceled when device is wedged. Don't
flag this as an error in xe_guc_pc code.

Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: Stuart Summers <stuart.summers@intel.com>
Link: https://lore.kernel.org/r/20250612-wa-14022085890-v4-1-94ba5dcc1e30@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_guc_pc.c

index 18c623992035520ec78646240512220abee07935..aedf59162709a63448a361abc8e5b07dc5c90134 100644 (file)
@@ -153,7 +153,7 @@ static int pc_action_reset(struct xe_guc_pc *pc)
        int ret;
 
        ret = xe_guc_ct_send(ct, action, ARRAY_SIZE(action), 0, 0);
-       if (ret)
+       if (ret && !(xe_device_wedged(pc_to_xe(pc)) && ret == -ECANCELED))
                xe_gt_err(pc_to_gt(pc), "GuC PC reset failed: %pe\n",
                          ERR_PTR(ret));
 
@@ -177,7 +177,7 @@ static int pc_action_query_task_state(struct xe_guc_pc *pc)
 
        /* Blocking here to ensure the results are ready before reading them */
        ret = xe_guc_ct_send_block(ct, action, ARRAY_SIZE(action));
-       if (ret)
+       if (ret && !(xe_device_wedged(pc_to_xe(pc)) && ret == -ECANCELED))
                xe_gt_err(pc_to_gt(pc), "GuC PC query task state failed: %pe\n",
                          ERR_PTR(ret));
 
@@ -200,7 +200,7 @@ static int pc_action_set_param(struct xe_guc_pc *pc, u8 id, u32 value)
                return -EAGAIN;
 
        ret = xe_guc_ct_send(ct, action, ARRAY_SIZE(action), 0, 0);
-       if (ret)
+       if (ret && !(xe_device_wedged(pc_to_xe(pc)) && ret == -ECANCELED))
                xe_gt_err(pc_to_gt(pc), "GuC PC set param[%u]=%u failed: %pe\n",
                          id, value, ERR_PTR(ret));
 
@@ -222,7 +222,7 @@ static int pc_action_unset_param(struct xe_guc_pc *pc, u8 id)
                return -EAGAIN;
 
        ret = xe_guc_ct_send(ct, action, ARRAY_SIZE(action), 0, 0);
-       if (ret)
+       if (ret && !(xe_device_wedged(pc_to_xe(pc)) && ret == -ECANCELED))
                xe_gt_err(pc_to_gt(pc), "GuC PC unset param failed: %pe",
                          ERR_PTR(ret));
 
@@ -239,7 +239,7 @@ static int pc_action_setup_gucrc(struct xe_guc_pc *pc, u32 mode)
        int ret;
 
        ret = xe_guc_ct_send(ct, action, ARRAY_SIZE(action), 0, 0);
-       if (ret)
+       if (ret && !(xe_device_wedged(pc_to_xe(pc)) && ret == -ECANCELED))
                xe_gt_err(pc_to_gt(pc), "GuC RC enable mode=%u failed: %pe\n",
                          mode, ERR_PTR(ret));
        return ret;