[2/5] drm/vmgfx: kill off unused init_mutex

Submitted by Emil Velikov on May 22, 2019, 4:41 p.m.

Details

Message ID 20190522164119.24139-2-emil.l.velikov@gmail.com
State Accepted
Headers show
Series "Series without cover letter" ( rev: 1 ) in DRI devel

Not browsing as part of any series.

Commit Message

Emil Velikov May 22, 2019, 4:41 p.m.
From: Emil Velikov <emil.velikov@collabora.com>

According to the docs - prevents firstopen/lastclose races. Yet never
used in practise.

Cc: "VMware Graphics" <linux-graphics-maintainer@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 1 -
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 5 -----
 2 files changed, 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index a38f06909fb6..d3f108f7e52d 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -664,7 +664,6 @@  static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
 		INIT_LIST_HEAD(&dev_priv->res_lru[i]);
 	}
 
-	mutex_init(&dev_priv->init_mutex);
 	init_waitqueue_head(&dev_priv->fence_queue);
 	init_waitqueue_head(&dev_priv->fifo_queue);
 	dev_priv->fence_queue_waiters = 0;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index 96983c47fb40..9be2176cc260 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -484,11 +484,6 @@  struct vmw_private {
 
 	spinlock_t resource_lock;
 	struct idr res_idr[vmw_res_max];
-	/*
-	 * Block lastclose from racing with firstopen.
-	 */
-
-	struct mutex init_mutex;
 
 	/*
 	 * A resource manager for kernel-only surfaces and

Comments

On Wed, 2019-05-22 at 17:41 +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov@collabora.com>

> 

> According to the docs - prevents firstopen/lastclose races. Yet never

> used in practise.

> 

> Cc: "VMware Graphics" <linux-graphics-maintainer@vmware.com>

> Cc: Thomas Hellstrom <thellstrom@vmware.com>

> Cc: Daniel Vetter <daniel@ffwll.ch>

> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>


Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>


> ---

>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 1 -

>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 5 -----

>  2 files changed, 6 deletions(-)

> 

> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

> b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

> index a38f06909fb6..d3f108f7e52d 100644

> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

> @@ -664,7 +664,6 @@ static int vmw_driver_load(struct drm_device

> *dev, unsigned long chipset)

>  		INIT_LIST_HEAD(&dev_priv->res_lru[i]);

>  	}

>  

> -	mutex_init(&dev_priv->init_mutex);

>  	init_waitqueue_head(&dev_priv->fence_queue);

>  	init_waitqueue_head(&dev_priv->fifo_queue);

>  	dev_priv->fence_queue_waiters = 0;

> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h

> b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h

> index 96983c47fb40..9be2176cc260 100644

> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h

> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h

> @@ -484,11 +484,6 @@ struct vmw_private {

>  

>  	spinlock_t resource_lock;

>  	struct idr res_idr[vmw_res_max];

> -	/*

> -	 * Block lastclose from racing with firstopen.

> -	 */

> -

> -	struct mutex init_mutex;

>  

>  	/*

>  	 * A resource manager for kernel-only surfaces and