Commit dd6e38df authored by Janusz Krzysztofik's avatar Janusz Krzysztofik Committed by Chris Wilson

drm/i915: Fix i915_inject_load_error() name to read *_probe_*

Commit 50d84418 ("drm/i915: Add i915 to i915_inject_probe_failure")
introduced new functions unfortunately named incompatibly with rules
established by commit f2db53f1 ("drm/i915: Replace "_load" with
"_probe" consequently").  Fix it for consistency.
Suggested-by: default avatarMichał Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: default avatarJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Cc: Michał Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Piotr Piórkowski <piotr.piorkowski@intel.com>
Cc: Tomasz Lis <tomasz.lis@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191029102036.6326-2-janusz.krzysztofik@linux.intel.com
parent 7f9d4c08
...@@ -1126,7 +1126,7 @@ int intel_guc_submission_enable(struct intel_guc *guc) ...@@ -1126,7 +1126,7 @@ int intel_guc_submission_enable(struct intel_guc *guc)
enum intel_engine_id id; enum intel_engine_id id;
int err; int err;
err = i915_inject_load_error(gt->i915, -ENXIO); err = i915_inject_probe_error(gt->i915, -ENXIO);
if (err) if (err)
return err; return err;
......
...@@ -63,7 +63,7 @@ static int intel_huc_rsa_data_create(struct intel_huc *huc) ...@@ -63,7 +63,7 @@ static int intel_huc_rsa_data_create(struct intel_huc *huc)
void *vaddr; void *vaddr;
int err; int err;
err = i915_inject_load_error(gt->i915, -ENXIO); err = i915_inject_probe_error(gt->i915, -ENXIO);
if (err) if (err)
return err; return err;
...@@ -161,7 +161,7 @@ int intel_huc_auth(struct intel_huc *huc) ...@@ -161,7 +161,7 @@ int intel_huc_auth(struct intel_huc *huc)
if (!intel_uc_fw_is_loaded(&huc->fw)) if (!intel_uc_fw_is_loaded(&huc->fw))
return -ENOEXEC; return -ENOEXEC;
ret = i915_inject_load_error(gt->i915, -ENXIO); ret = i915_inject_probe_error(gt->i915, -ENXIO);
if (ret) if (ret)
goto fail; goto fail;
......
...@@ -20,7 +20,7 @@ static int __intel_uc_reset_hw(struct intel_uc *uc) ...@@ -20,7 +20,7 @@ static int __intel_uc_reset_hw(struct intel_uc *uc)
int ret; int ret;
u32 guc_status; u32 guc_status;
ret = i915_inject_load_error(gt->i915, -ENXIO); ret = i915_inject_probe_error(gt->i915, -ENXIO);
if (ret) if (ret)
return ret; return ret;
...@@ -197,7 +197,7 @@ static int guc_enable_communication(struct intel_guc *guc) ...@@ -197,7 +197,7 @@ static int guc_enable_communication(struct intel_guc *guc)
GEM_BUG_ON(guc_communication_enabled(guc)); GEM_BUG_ON(guc_communication_enabled(guc));
ret = i915_inject_load_error(i915, -ENXIO); ret = i915_inject_probe_error(i915, -ENXIO);
if (ret) if (ret)
return ret; return ret;
...@@ -372,7 +372,7 @@ static int uc_init_wopcm(struct intel_uc *uc) ...@@ -372,7 +372,7 @@ static int uc_init_wopcm(struct intel_uc *uc)
GEM_BUG_ON(!(size & GUC_WOPCM_SIZE_MASK)); GEM_BUG_ON(!(size & GUC_WOPCM_SIZE_MASK));
GEM_BUG_ON(size & ~GUC_WOPCM_SIZE_MASK); GEM_BUG_ON(size & ~GUC_WOPCM_SIZE_MASK);
err = i915_inject_load_error(gt->i915, -ENXIO); err = i915_inject_probe_error(gt->i915, -ENXIO);
if (err) if (err)
return err; return err;
......
...@@ -220,29 +220,31 @@ static void __force_fw_fetch_failures(struct intel_uc_fw *uc_fw, ...@@ -220,29 +220,31 @@ static void __force_fw_fetch_failures(struct intel_uc_fw *uc_fw,
{ {
bool user = e == -EINVAL; bool user = e == -EINVAL;
if (i915_inject_load_error(i915, e)) { if (i915_inject_probe_error(i915, e)) {
/* non-existing blob */ /* non-existing blob */
uc_fw->path = "<invalid>"; uc_fw->path = "<invalid>";
uc_fw->user_overridden = user; uc_fw->user_overridden = user;
} else if (i915_inject_load_error(i915, e)) { } else if (i915_inject_probe_error(i915, e)) {
/* require next major version */ /* require next major version */
uc_fw->major_ver_wanted += 1; uc_fw->major_ver_wanted += 1;
uc_fw->minor_ver_wanted = 0; uc_fw->minor_ver_wanted = 0;
uc_fw->user_overridden = user; uc_fw->user_overridden = user;
} else if (i915_inject_load_error(i915, e)) { } else if (i915_inject_probe_error(i915, e)) {
/* require next minor version */ /* require next minor version */
uc_fw->minor_ver_wanted += 1; uc_fw->minor_ver_wanted += 1;
uc_fw->user_overridden = user; uc_fw->user_overridden = user;
} else if (uc_fw->major_ver_wanted && i915_inject_load_error(i915, e)) { } else if (uc_fw->major_ver_wanted &&
i915_inject_probe_error(i915, e)) {
/* require prev major version */ /* require prev major version */
uc_fw->major_ver_wanted -= 1; uc_fw->major_ver_wanted -= 1;
uc_fw->minor_ver_wanted = 0; uc_fw->minor_ver_wanted = 0;
uc_fw->user_overridden = user; uc_fw->user_overridden = user;
} else if (uc_fw->minor_ver_wanted && i915_inject_load_error(i915, e)) { } else if (uc_fw->minor_ver_wanted &&
i915_inject_probe_error(i915, e)) {
/* require prev minor version - hey, this should work! */ /* require prev minor version - hey, this should work! */
uc_fw->minor_ver_wanted -= 1; uc_fw->minor_ver_wanted -= 1;
uc_fw->user_overridden = user; uc_fw->user_overridden = user;
} else if (user && i915_inject_load_error(i915, e)) { } else if (user && i915_inject_probe_error(i915, e)) {
/* officially unsupported platform */ /* officially unsupported platform */
uc_fw->major_ver_wanted = 0; uc_fw->major_ver_wanted = 0;
uc_fw->minor_ver_wanted = 0; uc_fw->minor_ver_wanted = 0;
...@@ -271,7 +273,7 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw, struct drm_i915_private *i915) ...@@ -271,7 +273,7 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw, struct drm_i915_private *i915)
GEM_BUG_ON(!i915->wopcm.size); GEM_BUG_ON(!i915->wopcm.size);
GEM_BUG_ON(!intel_uc_fw_is_enabled(uc_fw)); GEM_BUG_ON(!intel_uc_fw_is_enabled(uc_fw));
err = i915_inject_load_error(i915, -ENXIO); err = i915_inject_probe_error(i915, -ENXIO);
if (err) if (err)
return err; return err;
...@@ -432,7 +434,7 @@ static int uc_fw_xfer(struct intel_uc_fw *uc_fw, struct intel_gt *gt, ...@@ -432,7 +434,7 @@ static int uc_fw_xfer(struct intel_uc_fw *uc_fw, struct intel_gt *gt,
u64 offset; u64 offset;
int ret; int ret;
ret = i915_inject_load_error(gt->i915, -ETIMEDOUT); ret = i915_inject_probe_error(gt->i915, -ETIMEDOUT);
if (ret) if (ret)
return ret; return ret;
...@@ -493,7 +495,7 @@ int intel_uc_fw_upload(struct intel_uc_fw *uc_fw, struct intel_gt *gt, ...@@ -493,7 +495,7 @@ int intel_uc_fw_upload(struct intel_uc_fw *uc_fw, struct intel_gt *gt,
/* make sure the status was cleared the last time we reset the uc */ /* make sure the status was cleared the last time we reset the uc */
GEM_BUG_ON(intel_uc_fw_is_loaded(uc_fw)); GEM_BUG_ON(intel_uc_fw_is_loaded(uc_fw));
err = i915_inject_load_error(gt->i915, -ENOEXEC); err = i915_inject_probe_error(gt->i915, -ENOEXEC);
if (err) if (err)
return err; return err;
......
...@@ -1300,11 +1300,11 @@ int i915_gem_init(struct drm_i915_private *dev_priv) ...@@ -1300,11 +1300,11 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
if (ret) if (ret)
goto err_gt; goto err_gt;
ret = i915_inject_load_error(dev_priv, -ENODEV); ret = i915_inject_probe_error(dev_priv, -ENODEV);
if (ret) if (ret)
goto err_gt; goto err_gt;
ret = i915_inject_load_error(dev_priv, -EIO); ret = i915_inject_probe_error(dev_priv, -EIO);
if (ret) if (ret)
goto err_gt; goto err_gt;
......
...@@ -54,8 +54,8 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level, ...@@ -54,8 +54,8 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level,
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG) #if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
static unsigned int i915_probe_fail_count; static unsigned int i915_probe_fail_count;
int __i915_inject_load_error(struct drm_i915_private *i915, int err, int __i915_inject_probe_error(struct drm_i915_private *i915, int err,
const char *func, int line) const char *func, int line)
{ {
if (i915_probe_fail_count >= i915_modparams.inject_load_failure) if (i915_probe_fail_count >= i915_modparams.inject_load_failure)
return 0; return 0;
......
...@@ -61,20 +61,20 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level, ...@@ -61,20 +61,20 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level,
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG) #if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
int __i915_inject_load_error(struct drm_i915_private *i915, int err, int __i915_inject_probe_error(struct drm_i915_private *i915, int err,
const char *func, int line); const char *func, int line);
#define i915_inject_load_error(_i915, _err) \ #define i915_inject_probe_error(_i915, _err) \
__i915_inject_load_error((_i915), (_err), __func__, __LINE__) __i915_inject_probe_error((_i915), (_err), __func__, __LINE__)
bool i915_error_injected(void); bool i915_error_injected(void);
#else #else
#define i915_inject_load_error(_i915, _err) 0 #define i915_inject_probe_error(_i915, _err) 0
#define i915_error_injected() false #define i915_error_injected() false
#endif #endif
#define i915_inject_probe_failure(i915) i915_inject_load_error((i915), -ENODEV) #define i915_inject_probe_failure(i915) i915_inject_probe_error((i915), -ENODEV)
#define i915_probe_error(i915, fmt, ...) \ #define i915_probe_error(i915, fmt, ...) \
__i915_printk(i915, i915_error_injected() ? KERN_DEBUG : KERN_ERR, \ __i915_printk(i915, i915_error_injected() ? KERN_DEBUG : KERN_ERR, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment