Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/xe/guc: Prefer GT oriented messages in xe_guc_pc

If possible, we should prefer xe_gt_err() over drm_err().
While at it, improve and fix some of the error messages.
Also drop unnecessary "xe_gt_sysfs.h" include.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240609181931.1724-4-michal.wajdeczko@intel.com

+10 -9
+10 -9
drivers/gpu/drm/xe/xe_guc_pc.c
··· 17 17 #include "xe_force_wake.h" 18 18 #include "xe_gt.h" 19 19 #include "xe_gt_idle.h" 20 - #include "xe_gt_sysfs.h" 20 + #include "xe_gt_printk.h" 21 21 #include "xe_gt_types.h" 22 22 #include "xe_guc.h" 23 23 #include "xe_guc_ct.h" ··· 139 139 140 140 ret = xe_guc_ct_send(ct, action, ARRAY_SIZE(action), 0, 0); 141 141 if (ret) 142 - drm_err(&pc_to_xe(pc)->drm, "GuC PC reset: %pe", ERR_PTR(ret)); 142 + xe_gt_err(pc_to_gt(pc), "GuC PC reset failed: %pe\n", 143 + ERR_PTR(ret)); 143 144 144 145 return ret; 145 146 } ··· 162 161 /* Blocking here to ensure the results are ready before reading them */ 163 162 ret = xe_guc_ct_send_block(ct, action, ARRAY_SIZE(action)); 164 163 if (ret) 165 - drm_err(&pc_to_xe(pc)->drm, 166 - "GuC PC query task state failed: %pe", ERR_PTR(ret)); 164 + xe_gt_err(pc_to_gt(pc), "GuC PC query task state failed: %pe\n", 165 + ERR_PTR(ret)); 167 166 168 167 return ret; 169 168 } ··· 184 183 185 184 ret = xe_guc_ct_send(ct, action, ARRAY_SIZE(action), 0, 0); 186 185 if (ret) 187 - drm_err(&pc_to_xe(pc)->drm, "GuC PC set param failed: %pe", 188 - ERR_PTR(ret)); 186 + xe_gt_err(pc_to_gt(pc), "GuC PC set param[%u]=%u failed: %pe\n", 187 + id, value, ERR_PTR(ret)); 189 188 190 189 return ret; 191 190 } ··· 201 200 202 201 ret = xe_guc_ct_send(ct, action, ARRAY_SIZE(action), 0, 0); 203 202 if (ret) 204 - drm_err(&pc_to_xe(pc)->drm, "GuC RC enable failed: %pe", 205 - ERR_PTR(ret)); 203 + xe_gt_err(pc_to_gt(pc), "GuC RC enable mode=%u failed: %pe\n", 204 + mode, ERR_PTR(ret)); 206 205 return ret; 207 206 } 208 207 ··· 845 844 goto out; 846 845 847 846 if (wait_for_pc_state(pc, SLPC_GLOBAL_STATE_RUNNING)) { 848 - drm_err(&pc_to_xe(pc)->drm, "GuC PC Start failed\n"); 847 + xe_gt_err(gt, "GuC PC Start failed\n"); 849 848 ret = -EIO; 850 849 goto out; 851 850 }