From d6ed682eba54915ea56315bc2e5a33fca5922997 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 21 Jun 2016 14:20:38 +0200 Subject: drm: Refactor drop/set master code a bit File open/set_maseter ioctl and file close/drop_master ioctl share the same master handling code. Extract it. Note that vmwgfx's master_set callback needs to know whether the master is a new one or has been used already, so thread this through. On the close/drop side a similar parameter existed, but wasnt used. Drop it to simplify the flow. v2: Try to make it not leak so much (Emil). v3: Send out the right version ... Cc: Emil Velikov Cc: Chris Wilson Cc: Thomas Hellstrom Reviewed-by: Chris Wilson Reviewed-by: Emil Velikov Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1466511638-9885-1-git-send-email-daniel.vetter@ffwll.ch --- include/drm/drmP.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/drm') diff --git a/include/drm/drmP.h b/include/drm/drmP.h index babec2e80760..edbf32e300cb 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -573,8 +573,7 @@ struct drm_driver { int (*master_set)(struct drm_device *dev, struct drm_file *file_priv, bool from_open); - void (*master_drop)(struct drm_device *dev, struct drm_file *file_priv, - bool from_release); + void (*master_drop)(struct drm_device *dev, struct drm_file *file_priv); int (*debugfs_init)(struct drm_minor *minor); void (*debugfs_cleanup)(struct drm_minor *minor); -- cgit v1.2.3