diff mbox series

[09/16] drm/i915: Do not reset display when display is disabled

Message ID 20181012215218.5119-9-jose.souza@intel.com (mailing list archive)
State New, archived
Headers show
Series [01/16] drm/i915: Properly set PCH as NOP when display is disabled | expand

Commit Message

Souza, Jose Oct. 12, 2018, 9:52 p.m. UTC
Display is always disabled and enabled when reseting any engine,
but if display is disabled it should not do anything with display
and only reset the needed engines.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/i915_irq.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Jani Nikula Oct. 22, 2018, 8:34 a.m. UTC | #1
On Fri, 12 Oct 2018, José Roberto de Souza <jose.souza@intel.com> wrote:
> Display is always disabled and enabled when reseting any engine,
> but if display is disabled it should not do anything with display
> and only reset the needed engines.

Again, push the display checks to the functions themselves.

BR,
Jani.

>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_irq.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 2e242270e270..e7f551909bfe 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -3173,7 +3173,8 @@ static void i915_reset_device(struct drm_i915_private *dev_priv,
>  
>  	/* Use a watchdog to ensure that our reset completes */
>  	i915_wedge_on_timeout(&w, dev_priv, 5*HZ) {
> -		intel_prepare_reset(dev_priv);
> +		if (INTEL_INFO(dev_priv)->num_pipes)
> +			intel_prepare_reset(dev_priv);
>  
>  		error->reason = reason;
>  		error->stalled_mask = engine_mask;
> @@ -3199,7 +3200,8 @@ static void i915_reset_device(struct drm_i915_private *dev_priv,
>  		error->stalled_mask = 0;
>  		error->reason = NULL;
>  
> -		intel_finish_reset(dev_priv);
> +		if (INTEL_INFO(dev_priv)->num_pipes)
> +			intel_finish_reset(dev_priv);
>  	}
>  
>  	if (!test_bit(I915_WEDGED, &error->flags))
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 2e242270e270..e7f551909bfe 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -3173,7 +3173,8 @@  static void i915_reset_device(struct drm_i915_private *dev_priv,
 
 	/* Use a watchdog to ensure that our reset completes */
 	i915_wedge_on_timeout(&w, dev_priv, 5*HZ) {
-		intel_prepare_reset(dev_priv);
+		if (INTEL_INFO(dev_priv)->num_pipes)
+			intel_prepare_reset(dev_priv);
 
 		error->reason = reason;
 		error->stalled_mask = engine_mask;
@@ -3199,7 +3200,8 @@  static void i915_reset_device(struct drm_i915_private *dev_priv,
 		error->stalled_mask = 0;
 		error->reason = NULL;
 
-		intel_finish_reset(dev_priv);
+		if (INTEL_INFO(dev_priv)->num_pipes)
+			intel_finish_reset(dev_priv);
 	}
 
 	if (!test_bit(I915_WEDGED, &error->flags))