diff options
author | Gustavo Sousa <gustavo.sousa@intel.com> | 2023-06-01 22:44:19 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-20 02:34:27 +0300 |
commit | 437bcbab1023e06edd8dbca99f5c44e5d2b30133 (patch) | |
tree | 0905c96bf4c70b2562f5857973f6e3783966768f /drivers/gpu/drm/xe/xe_reg_sr.c | |
parent | 08516de501fae647fb29bf3b62718de56cc24014 (diff) | |
download | linux-437bcbab1023e06edd8dbca99f5c44e5d2b30133.tar.xz |
drm/xe: Replace deprecated DRM_ERROR()
DRM_ERROR() has been deprecated in favor of pr_err(). However, we should
prefer to use xe_gt_err() or drm_err() whenever possible so we get gt-
or device-specific output with the error message.
v2:
- Prefer drm_err() over pr_err(). (Matt, Jani)
v3:
- Prefer xe_gt_err() over drm_err() when possible. (Matt)
v4:
- Use the already available dev variable instead of xe->drm as
parameter to drm_err(). (Matt)
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Haridhar Kalvala <haridhar.kalvala@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20230601194419.1179609-1-gustavo.sousa@intel.com
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_reg_sr.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_reg_sr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_reg_sr.c b/drivers/gpu/drm/xe/xe_reg_sr.c index 434133444d74..8580ff38b82c 100644 --- a/drivers/gpu/drm/xe/xe_reg_sr.c +++ b/drivers/gpu/drm/xe/xe_reg_sr.c @@ -19,6 +19,7 @@ #include "xe_force_wake.h" #include "xe_gt.h" #include "xe_gt_mcr.h" +#include "xe_gt_printk.h" #include "xe_macros.h" #include "xe_mmio.h" #include "xe_reg_whitelist.h" @@ -89,7 +90,8 @@ static void reg_sr_inc_error(struct xe_reg_sr *sr) } int xe_reg_sr_add(struct xe_reg_sr *sr, - const struct xe_reg_sr_entry *e) + const struct xe_reg_sr_entry *e, + struct xe_gt *gt) { unsigned long idx = e->reg.addr; struct xe_reg_sr_entry *pentry = xa_load(&sr->xa, idx); @@ -122,7 +124,8 @@ int xe_reg_sr_add(struct xe_reg_sr *sr, return 0; fail: - DRM_ERROR("Discarding save-restore reg %04lx (clear: %08x, set: %08x, masked: %s, mcr: %s): ret=%d\n", + xe_gt_err(gt, + "discarding save-restore reg %04lx (clear: %08x, set: %08x, masked: %s, mcr: %s): ret=%d\n", idx, e->clr_bits, e->set_bits, str_yes_no(e->reg.masked), str_yes_no(e->reg.mcr), |