dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm: remove no longer used .master_{create, destroy} callbacks
@ 2019-12-02 17:28 Emil Velikov
  2019-12-03  9:35 ` [PATCH] drm: remove no longer used .master_{create,destroy} callbacks Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Emil Velikov @ 2019-12-02 17:28 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, Thomas Hellstrom, emil.l.velikov

From: Emil Velikov <emil.velikov@collabora.com>

Up-to recently the only driver which required these was vmwgfx.

With commit 9c84aeba67cc ("drm/vmwgfx: Kill unneeded legacy security
features") the driver no longer sets them, so we can drop the unused
infra.

Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
 drivers/gpu/drm/drm_auth.c |  8 --------
 include/drm/drm_drv.h      | 14 --------------
 2 files changed, 22 deletions(-)

diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c
index cc9acd986c68..531b876d0ed8 100644
--- a/drivers/gpu/drm/drm_auth.c
+++ b/drivers/gpu/drm/drm_auth.c
@@ -153,11 +153,6 @@ static int drm_new_set_master(struct drm_device *dev, struct drm_file *fpriv)
 		return -ENOMEM;
 	}
 
-	if (dev->driver->master_create) {
-		ret = dev->driver->master_create(dev, fpriv->master);
-		if (ret)
-			goto out_err;
-	}
 	fpriv->is_master = 1;
 	fpriv->authenticated = 1;
 
@@ -332,9 +327,6 @@ static void drm_master_destroy(struct kref *kref)
 	if (drm_core_check_feature(dev, DRIVER_MODESET))
 		drm_lease_destroy(master);
 
-	if (dev->driver->master_destroy)
-		dev->driver->master_destroy(dev, master);
-
 	drm_legacy_master_rmmaps(dev, master);
 
 	idr_destroy(&master->magic_map);
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index cf13470810a5..4300e85db457 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -457,20 +457,6 @@ struct drm_driver {
 	 */
 	void (*irq_uninstall) (struct drm_device *dev);
 
-	/**
-	 * @master_create:
-	 *
-	 * Called whenever a new master is created. Only used by vmwgfx.
-	 */
-	int (*master_create)(struct drm_device *dev, struct drm_master *master);
-
-	/**
-	 * @master_destroy:
-	 *
-	 * Called whenever a master is destroyed. Only used by vmwgfx.
-	 */
-	void (*master_destroy)(struct drm_device *dev, struct drm_master *master);
-
 	/**
 	 * @master_set:
 	 *
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm: remove no longer used .master_{create,destroy} callbacks
  2019-12-02 17:28 [PATCH] drm: remove no longer used .master_{create, destroy} callbacks Emil Velikov
@ 2019-12-03  9:35 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2019-12-03  9:35 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Daniel Vetter, Thomas Hellstrom, dri-devel

On Mon, Dec 02, 2019 at 05:28:53PM +0000, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov@collabora.com>
> 
> Up-to recently the only driver which required these was vmwgfx.
> 
> With commit 9c84aeba67cc ("drm/vmwgfx: Kill unneeded legacy security
> features") the driver no longer sets them, so we can drop the unused
> infra.
> 
> Cc: Thomas Hellstrom <thellstrom@vmware.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

Oh nice, I totally missed this happening, this is some really neat
unification in how stuff works!

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/drm_auth.c |  8 --------
>  include/drm/drm_drv.h      | 14 --------------
>  2 files changed, 22 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c
> index cc9acd986c68..531b876d0ed8 100644
> --- a/drivers/gpu/drm/drm_auth.c
> +++ b/drivers/gpu/drm/drm_auth.c
> @@ -153,11 +153,6 @@ static int drm_new_set_master(struct drm_device *dev, struct drm_file *fpriv)
>  		return -ENOMEM;
>  	}
>  
> -	if (dev->driver->master_create) {
> -		ret = dev->driver->master_create(dev, fpriv->master);
> -		if (ret)
> -			goto out_err;
> -	}
>  	fpriv->is_master = 1;
>  	fpriv->authenticated = 1;
>  
> @@ -332,9 +327,6 @@ static void drm_master_destroy(struct kref *kref)
>  	if (drm_core_check_feature(dev, DRIVER_MODESET))
>  		drm_lease_destroy(master);
>  
> -	if (dev->driver->master_destroy)
> -		dev->driver->master_destroy(dev, master);
> -
>  	drm_legacy_master_rmmaps(dev, master);
>  
>  	idr_destroy(&master->magic_map);
> diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
> index cf13470810a5..4300e85db457 100644
> --- a/include/drm/drm_drv.h
> +++ b/include/drm/drm_drv.h
> @@ -457,20 +457,6 @@ struct drm_driver {
>  	 */
>  	void (*irq_uninstall) (struct drm_device *dev);
>  
> -	/**
> -	 * @master_create:
> -	 *
> -	 * Called whenever a new master is created. Only used by vmwgfx.
> -	 */
> -	int (*master_create)(struct drm_device *dev, struct drm_master *master);
> -
> -	/**
> -	 * @master_destroy:
> -	 *
> -	 * Called whenever a master is destroyed. Only used by vmwgfx.
> -	 */
> -	void (*master_destroy)(struct drm_device *dev, struct drm_master *master);
> -
>  	/**
>  	 * @master_set:
>  	 *
> -- 
> 2.23.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-12-03  9:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02 17:28 [PATCH] drm: remove no longer used .master_{create, destroy} callbacks Emil Velikov
2019-12-03  9:35 ` [PATCH] drm: remove no longer used .master_{create,destroy} callbacks Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).