Re: [PATCH libdrm] xf86drm: Make drmNodeIsDRM() public.
On 18 December 2018 5:03:22 am AEDT, Emil Velikov wrote: >Hi Christopher, > >On Tue, 20 Nov 2018 at 04:30, Christopher James Halse Rogers > wrote: >> >> I have wanted this code in Mir, so it's plausibly useful elsewhere, >> particularly if the DRM device major number is going to become >> dynamic. >> >Can you elaborate/link to the code that uses the major/minor? >Fiddling with those manually is rather error prone most often than not. We have an internal API that mirrors that of logind - taking a (major,minor) pair and returning a usable fd. For input devices, that just means opened O_NONBLOCK; for DRM devices it means calling SetMaster. Here's the relevant (non-logind) implementation: https://github.com/MirServer/mir/blob/master/src/server/console/linux_virtual_terminal.cpp#L634 Since we by necessity end up pulling out the devnode I guess we could match on a /dev/dri prefix instead. I just noticed this function while doing the drmIsMaster patch and thought it would be convenient for us! ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH libdrm] xf86drm: Make drmNodeIsDRM() public.
Emil Velikov writes: > Hi Christopher, > > On Tue, 20 Nov 2018 at 04:30, Christopher James Halse Rogers > wrote: >> >> I have wanted this code in Mir, so it's plausibly useful elsewhere, >> particularly if the DRM device major number is going to become >> dynamic. >> > Can you elaborate/link to the code that uses the major/minor? > Fiddling with those manually is rather error prone most often than not. Yeah, I think this shouldn't be part of the API. signature.asc Description: PGP signature ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH libdrm] xf86drm: Make drmNodeIsDRM() public.
Hi Christopher, On Tue, 20 Nov 2018 at 04:30, Christopher James Halse Rogers wrote: > > I have wanted this code in Mir, so it's plausibly useful elsewhere, > particularly if the DRM device major number is going to become > dynamic. > Can you elaborate/link to the code that uses the major/minor? Fiddling with those manually is rather error prone most often than not. Thanks Emil ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel