Skip to contentSkip to conversation

drm: remove no longer used .master_{create, destroy} callbacks

PATCH In review Emil Velikov 2 participants 2 messages Dec 2, 2019 – Dec 3, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: remove no longer used .master_{create, destroy} callbacks

From: Emil Velikov <[email protected]>

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 <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/drm_auth.c |  8 --------
 include/drm/drm_drv.h      | 14 --------------
 2 files changed, 22 deletions(-)
drivers/gpu/drm/drm_auth.c +0 -8
index cc9acd986c68..531b876d0ed8 100644
@@ -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);
include/drm/drm_drv.h +0 -14
index cf13470810a5..4300e85db457 100644
@@ -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:
 	 *
Signature · 6 lines
2.23.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw

Re: [PATCH] drm: remove no longer used .master_{create,destroy} callbacks

Quoted 11 lines · Emil Velikov

From: Emil Velikov <[email protected]>

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 <[email protected]>
Cc Daniel Vetter <[email protected]>

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

Quoted 59 lines
---
 drivers/gpu/drm/drm_auth.c |  8 --------
 include/drm/drm_drv.h      | 14 --------------
 2 files changed, 22 deletions(-)
drivers/gpu/drm/drm_auth.c +0 -8
index cc9acd986c68..531b876d0ed8 100644
@@ -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);
include/drm/drm_drv.h +0 -14
index cf13470810a5..4300e85db457 100644
@@ -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:
 	 *
Signature · 1 line
2.23.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel