All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Drop mutex around clearing error state
@ 2016-09-01 20:55 Chris Wilson
  2016-09-01 21:19 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2016-09-01 22:14 ` [PATCH] " David Weinehall
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2016-09-01 20:55 UTC (permalink / raw)
  To: intel-gfx

The error state itself is guarded by a spinlock (admittedly even that is
overkill for a single pointer!) and doesn't require us to take the
struct_mutex in the debugfs/sysfs interface. Removing the struct_mutex
removes one more potential blockage when trying to debug a deadlock.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 10 +---------
 drivers/gpu/drm/i915/i915_sysfs.c   | 10 +---------
 2 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 7124e5666629..e238627c68b6 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -978,17 +978,9 @@ i915_error_state_write(struct file *filp,
 		       loff_t *ppos)
 {
 	struct i915_error_state_file_priv *error_priv = filp->private_data;
-	struct drm_device *dev = error_priv->dev;
-	int ret;
 
 	DRM_DEBUG_DRIVER("Resetting error state\n");
-
-	ret = mutex_lock_interruptible(&dev->struct_mutex);
-	if (ret)
-		return ret;
-
-	i915_destroy_error_state(dev);
-	mutex_unlock(&dev->struct_mutex);
+	i915_destroy_error_state(error_priv->dev);
 
 	return cnt;
 }
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
index 2d482f677f56..1012eeea1324 100644
--- a/drivers/gpu/drm/i915/i915_sysfs.c
+++ b/drivers/gpu/drm/i915/i915_sysfs.c
@@ -556,17 +556,9 @@ static ssize_t error_state_write(struct file *file, struct kobject *kobj,
 {
 	struct device *kdev = kobj_to_dev(kobj);
 	struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
-	struct drm_device *dev = &dev_priv->drm;
-	int ret;
 
 	DRM_DEBUG_DRIVER("Resetting error state\n");
-
-	ret = mutex_lock_interruptible(&dev->struct_mutex);
-	if (ret)
-		return ret;
-
-	i915_destroy_error_state(dev);
-	mutex_unlock(&dev->struct_mutex);
+	i915_destroy_error_state(&dev_priv->drm);
 
 	return count;
 }
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* ✗ Fi.CI.BAT: failure for drm/i915: Drop mutex around clearing error state
  2016-09-01 20:55 [PATCH] drm/i915: Drop mutex around clearing error state Chris Wilson
@ 2016-09-01 21:19 ` Patchwork
  2016-09-01 22:14 ` [PATCH] " David Weinehall
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2016-09-01 21:19 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Drop mutex around clearing error state
URL   : https://patchwork.freedesktop.org/series/11911/
State : failure

== Summary ==

Series 11911v1 drm/i915: Drop mutex around clearing error state
http://patchwork.freedesktop.org/api/1.0/series/11911/revisions/1/mbox/

Test drv_module_reload_basic:
                pass       -> SKIP       (fi-skl-6260u)
Test kms_pipe_crc_basic:
        Subgroup hang-read-crc-pipe-b:
                skip       -> PASS       (fi-hsw-4770r)
        Subgroup suspend-read-crc-pipe-c:
                pass       -> INCOMPLETE (fi-hsw-4770k)

fi-bdw-5557u     total:252  pass:233  dwarn:2   dfail:1   fail:1   skip:15 
fi-bsw-n3050     total:252  pass:203  dwarn:1   dfail:1   fail:1   skip:46 
fi-hsw-4770k     total:216  pass:192  dwarn:2   dfail:1   fail:0   skip:20 
fi-hsw-4770r     total:252  pass:222  dwarn:2   dfail:1   fail:1   skip:26 
fi-ivb-3520m     total:252  pass:217  dwarn:2   dfail:1   fail:1   skip:31 
fi-skl-6260u     total:252  pass:233  dwarn:2   dfail:1   fail:1   skip:15 
fi-skl-6700k     total:252  pass:219  dwarn:3   dfail:1   fail:1   skip:28 
fi-snb-2520m     total:252  pass:204  dwarn:2   dfail:1   fail:2   skip:43 
fi-snb-2600      total:252  pass:204  dwarn:2   dfail:1   fail:2   skip:43 

Results at /archive/results/CI_IGT_test/Patchwork_2461/

e86e853d531af69111a41258650ec73650a59810 drm-intel-nightly: 2016y-09m-01d-18h-16m-46s UTC integration manifest
cf2b419 drm/i915: Drop mutex around clearing error state

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Drop mutex around clearing error state
  2016-09-01 20:55 [PATCH] drm/i915: Drop mutex around clearing error state Chris Wilson
  2016-09-01 21:19 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2016-09-01 22:14 ` David Weinehall
  1 sibling, 0 replies; 3+ messages in thread
From: David Weinehall @ 2016-09-01 22:14 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Thu, Sep 01, 2016 at 09:55:10PM +0100, Chris Wilson wrote:
> The error state itself is guarded by a spinlock (admittedly even that is
> overkill for a single pointer!) and doesn't require us to take the
> struct_mutex in the debugfs/sysfs interface. Removing the struct_mutex
> removes one more potential blockage when trying to debug a deadlock.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Lots of lines disappearing. Yay!

Reviewed-by: David Weinehall <david.weinehall@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 10 +---------
>  drivers/gpu/drm/i915/i915_sysfs.c   | 10 +---------
>  2 files changed, 2 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 7124e5666629..e238627c68b6 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -978,17 +978,9 @@ i915_error_state_write(struct file *filp,
>  		       loff_t *ppos)
>  {
>  	struct i915_error_state_file_priv *error_priv = filp->private_data;
> -	struct drm_device *dev = error_priv->dev;
> -	int ret;
>  
>  	DRM_DEBUG_DRIVER("Resetting error state\n");
> -
> -	ret = mutex_lock_interruptible(&dev->struct_mutex);
> -	if (ret)
> -		return ret;
> -
> -	i915_destroy_error_state(dev);
> -	mutex_unlock(&dev->struct_mutex);
> +	i915_destroy_error_state(error_priv->dev);
>  
>  	return cnt;
>  }
> diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
> index 2d482f677f56..1012eeea1324 100644
> --- a/drivers/gpu/drm/i915/i915_sysfs.c
> +++ b/drivers/gpu/drm/i915/i915_sysfs.c
> @@ -556,17 +556,9 @@ static ssize_t error_state_write(struct file *file, struct kobject *kobj,
>  {
>  	struct device *kdev = kobj_to_dev(kobj);
>  	struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
> -	struct drm_device *dev = &dev_priv->drm;
> -	int ret;
>  
>  	DRM_DEBUG_DRIVER("Resetting error state\n");
> -
> -	ret = mutex_lock_interruptible(&dev->struct_mutex);
> -	if (ret)
> -		return ret;
> -
> -	i915_destroy_error_state(dev);
> -	mutex_unlock(&dev->struct_mutex);
> +	i915_destroy_error_state(&dev_priv->drm);
>  
>  	return count;
>  }
> -- 
> 2.9.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-01 22:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01 20:55 [PATCH] drm/i915: Drop mutex around clearing error state Chris Wilson
2016-09-01 21:19 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-09-01 22:14 ` [PATCH] " David Weinehall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.