[PATCH] drm: support gpu aliases defined in DT data
Rob Herring
robh at kernel.org
Thu Jan 17 22:04:34 UTC 2019
On Thu, Jan 17, 2019 at 7:26 AM Daniel Vetter <daniel at ffwll.ch> wrote:
>
> On Thu, Jan 17, 2019 at 2:04 PM Tomi Valkeinen <tomi.valkeinen at ti.com> wrote:
> >
> > On 17/01/19 14:33, Daniel Vetter wrote:
> > > On Thu, Jan 17, 2019 at 01:19:18PM +0200, Tomi Valkeinen wrote:
> > >> The DRM device minor numbers are allocated according to the registration
> > >> order. This causes confusion in cases where the registration order can
> > >> change, or when, say, a modesetting capable device is preferred to be
> > >> card0, and a rendering device is preferred to be card1.
> > >>
> > >> This patch adds similar functionality that is used in some other
> > >> subsystems, where device minor numbers can be defined in DT bindings'
> > >> aliases node.
> > >
> > > What other subsystem? I thought that minor numbers shouldn't be made uapi,
> > > and that udev or similar is supposed to give you stable names ... Is that
> > > not the case on SoC?
You thought correctly. The problem is lots of people like their stable names.
> > I think at least i2c, spi and uart use DT aliases.
Well, yes. UARTs were largely to not break 'console=ttySx' and/or
getty's on a ttySx when moving to DT. That is largely a solved problem
now (though everyone still puts them in).
SPI and I2C sneaked in I guess. Those are really only for folks
twiddling with SPI and I2C directly from userspace. There's been
discussions in the past how not use aliases, but no one has cared
enough to implement.
> Commits/code implementing would be best.
>
> > I also have my doubts about this, but thought to post this to get some
> > comments, as it does make life quite a bit easier =).
>
> Yeah I think "soc without udev" seems reasonable assumption, I just
> think this is something the overall soc community should agree on as a
> good thing to do. I guess since the of stuff you're using is generic
> that's all happened already, so should amount to gathering a pile of
> acks and then merging it.
Mesa/libdrm already has lots of code to open the correct devices and
not care about minor numbers. What's the problem here?
Rob
More information about the dri-devel
mailing list