From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 11/13] drm: remove redundant minor->device field Date: Wed, 12 Feb 2014 14:36:24 +0100 Message-ID: <20140212133624.GV17001@phenom.ffwll.local> References: <1391004120-687-1-git-send-email-dh.herrmann@gmail.com> <1391004120-687-12-git-send-email-dh.herrmann@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f181.google.com (mail-ea0-f181.google.com [209.85.215.181]) by gabe.freedesktop.org (Postfix) with ESMTP id A14CDFAD7F for ; Wed, 12 Feb 2014 05:36:35 -0800 (PST) Received: by mail-ea0-f181.google.com with SMTP id k10so2179820eaj.26 for ; Wed, 12 Feb 2014 05:36:29 -0800 (PST) Content-Disposition: inline In-Reply-To: <1391004120-687-12-git-send-email-dh.herrmann@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: David Herrmann Cc: Daniel Vetter , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org 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 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 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