Re: [PATCH v8 1/8] drm/i915: Create GEM runtime resume helper and handle GEM suspend/resume errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Sagar Arun Kamble (2017-09-26 14:24:38)
>  drivers/gpu/drm/i915/i915_drv.c | 34 ++++++++++++++++++++--------------
>  drivers/gpu/drm/i915/i915_drv.h |  5 +++--
>  drivers/gpu/drm/i915/i915_gem.c | 20 ++++++++++++++++++--
>  3 files changed, 41 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 7056bb2..a3bbf18 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1655,6 +1655,7 @@ static int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state)
>  static int i915_drm_resume(struct drm_device *dev)
>  {
>         struct drm_i915_private *dev_priv = to_i915(dev);
> +       struct pci_dev *pdev = dev_priv->drm.pdev;
>         int ret;
>  
>         disable_rpm_wakeref_asserts(dev_priv);
> @@ -1666,7 +1667,9 @@ static int i915_drm_resume(struct drm_device *dev)
>  
>         intel_csr_ucode_resume(dev_priv);
>  
> -       i915_gem_resume(dev_priv);
> +       ret = i915_gem_resume(dev_priv);
> +       if (ret)
> +               dev_err(&pdev->dev, "GEM resume failed\n");
>  
>         i915_restore_state(dev_priv);
>         intel_pps_unlock_regs_wa(dev_priv);
> @@ -2615,14 +2617,18 @@ static int intel_runtime_resume(struct device *kdev)
>  
>         intel_enable_ipc(dev_priv);
>  
> +       ret = i915_gem_runtime_resume(dev_priv);
> +       if (!err)
> +               err = ret;
> +
>         enable_rpm_wakeref_asserts(dev_priv);
>  
> -       if (ret)
> -               DRM_ERROR("Runtime resume failed, disabling it (%d)\n", ret);
> +       if (err)
> +               DRM_ERROR("Runtime resume failed, disabling it (%d)\n", err);
>         else
>                 DRM_DEBUG_KMS("Device resumed\n");
>  
> -       return ret;
> +       return err;

What we've tried to do is to limit the damage that can happen if we
fail to re-enable GEM. We have tried to let the device resume, but
mark the device as wedged to prevent future execution, and so let the
device live long enough to be able to show error messages and whatnot
(system critical clients should also survive and fallover to alternative
paths).
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux