[PATCH 11/13] drm: remove redundant minor->device field

Daniel Vetter daniel at ffwll.ch
Wed Feb 12 05:36:24 PST 2014


On Wed, Jan 29, 2014 at 03:01:58PM +0100, David Herrmann wrote:
> Whenever we access minor->device, we are in a minor->kdev->...->fops
> callback so the minor->kdev pointer *must* be valid. Thus, simply use
> minor->kdev->devt instead of minor->device and remove the redundant field.
> 
> Signed-off-by: David Herrmann <dh.herrmann at gmail.com>

I think this is simply compat cruft from the days when the drm core was
still shared with the *bsds. With the one patch I've commented on all
patches up to this one are

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

As discussed on irc I think we don't want to have stable minor ids really,
userspace simply needs to inquire udev to get at the right
render/control/legacy node it wants. There's also ongoing discussions
about how that probing should look like on e.g. ARM. So at least for now
Nack on those two from my side.

Wrt longer-term plans I think the minors (and also all the sysfs stuff
really) also need to grab references on the drm_device, so that unplugging
doesn't race with userspace. But I guess that this might lead to reference
loops for driver unloading, so maybe we need to postpone that a bit more.
But this is definitely a big step into the right direction.

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list