Daniel Vetter d6ed682eba 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 <emil.l.velikov@gmail.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1466511638-9885-1-git-send-email-daniel.vetter@ffwll.ch
2016-06-21 21:56:28 +02:00
..
2010-08-10 08:20:20 +10:00
2016-06-21 21:43:28 +02:00
2016-04-20 13:35:14 +02:00
2012-11-28 18:36:05 +10:00
2016-06-13 10:45:57 +02:00
2015-11-25 16:22:58 +01:00
2013-12-18 11:35:45 +10:00
2016-05-06 16:04:48 +02:00
2015-08-12 12:24:05 -04:00
2014-03-17 20:11:57 +01:00