drm: allocate minors early
authorDavid Herrmann <dh.herrmann@gmail.com>
Wed, 29 Jan 2014 11:43:56 +0000 (12:43 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Thu, 11 Dec 2014 01:23:15 +0000 (10:23 +0900)
commit6e8119463a9b55a849c27d34a15627408b90d03f
tree901004dba009caf708b088406d8514165c3e2e84
parent075d9770f3cf3bce8542fb272067deaaa3254a1c
drm: allocate minors early

Instead of waiting for device-registration, we now allocate minor-objects
during device allocation. The minors are not registered or assigned an ID.
This is still postponed to device-registration.

While at it, remove the superfluous output-parameter in drm_get_minor().

The reason for this early allocation is to make
dev->primary/control/render available atomically. So once the device is
alive, all of them are already set and we never have the situation where
one of them is set after another (they're either NULL or set, but never
changed). This will eventually allow us to reduce minor-ID allocation to
one base-ID instead of a single ID for each.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 05b701f6f60201c9906167351cce50db2e9db7ae)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
drivers/gpu/drm/drm_stub.c
drivers/gpu/drm/drm_stub.c