Message ID | 20190411084436.24384-13-michal.wajdeczko@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | GuC 32.0.3 | expand |
On 4/11/19 1:44 AM, Michal Wajdeczko wrote: > There is no fallback to execlists, but instead of aborting whole > driver load, just mark it as wedged. > I don't see any inject_load_failure() in the guc paths (WOPCM aside). Can you sprinkle a few of them around to make sure this is solid? Thanks, Daniele > Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > Cc: Chris Wilson <chris@chris-wilson.co.uk> > --- > drivers/gpu/drm/i915/i915_gem.c | 3 ++- > drivers/gpu/drm/i915/intel_uc.c | 6 ++---- > 2 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index 0a818a60ad31..ac64a6fd9b91 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -4963,7 +4963,8 @@ int i915_gem_init(struct drm_i915_private *dev_priv) > mutex_lock(&dev_priv->drm.struct_mutex); > intel_uc_fini_hw(dev_priv); > err_uc_init: > - intel_uc_fini(dev_priv); > + if (ret != -EIO) > + intel_uc_fini(dev_priv); > err_pm: > if (ret != -EIO) { > intel_cleanup_gt_powersave(dev_priv); > diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c > index 8e5e4226df53..03bc2a0ee34b 100644 > --- a/drivers/gpu/drm/i915/intel_uc.c > +++ b/drivers/gpu/drm/i915/intel_uc.c > @@ -435,12 +435,10 @@ int intel_uc_init_hw(struct drm_i915_private *i915) > /* > * Note that there is no fallback as either user explicitly asked for > * the GuC or driver default option was to run with the GuC enabled. > + * Return -EIO to just disable GPU submission but keep KMS alive. > */ > - if (GEM_WARN_ON(ret == -EIO)) > - ret = -EINVAL; > - > dev_err(i915->drm.dev, "GuC initialization failed %d\n", ret); > - return ret; > + return -EIO; > } > > void intel_uc_fini_hw(struct drm_i915_private *i915) >
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 0a818a60ad31..ac64a6fd9b91 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4963,7 +4963,8 @@ int i915_gem_init(struct drm_i915_private *dev_priv) mutex_lock(&dev_priv->drm.struct_mutex); intel_uc_fini_hw(dev_priv); err_uc_init: - intel_uc_fini(dev_priv); + if (ret != -EIO) + intel_uc_fini(dev_priv); err_pm: if (ret != -EIO) { intel_cleanup_gt_powersave(dev_priv); diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c index 8e5e4226df53..03bc2a0ee34b 100644 --- a/drivers/gpu/drm/i915/intel_uc.c +++ b/drivers/gpu/drm/i915/intel_uc.c @@ -435,12 +435,10 @@ int intel_uc_init_hw(struct drm_i915_private *i915) /* * Note that there is no fallback as either user explicitly asked for * the GuC or driver default option was to run with the GuC enabled. + * Return -EIO to just disable GPU submission but keep KMS alive. */ - if (GEM_WARN_ON(ret == -EIO)) - ret = -EINVAL; - dev_err(i915->drm.dev, "GuC initialization failed %d\n", ret); - return ret; + return -EIO; } void intel_uc_fini_hw(struct drm_i915_private *i915)
There is no fallback to execlists, but instead of aborting whole driver load, just mark it as wedged. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/i915_gem.c | 3 ++- drivers/gpu/drm/i915/intel_uc.c | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-)