]> git.baikalelectronics.ru Git - kernel.git/commit
drm: allocate minors early
authorDavid Herrmann <dh.herrmann@gmail.com>
Wed, 29 Jan 2014 11:43:56 +0000 (12:43 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Sun, 16 Mar 2014 11:25:18 +0000 (12:25 +0100)
commit6a86cf68c5fd0820fee0a96bd00c99c92c57e8f5
tree10ad0205a30fe9a13392cddc5e5d6c8f790f97d6
parent90c48bfd6aed5c57e331cc1e1c12e5be08cd739f
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>
drivers/gpu/drm/drm_stub.c