dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Engestrom <eric.engestrom@intel.com>
To: Francois Tigeot <ftigeot@wolfpond.org>
Cc: Emil Velikov <emil.l.velikov@gmail.com>,
	ML dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH libdrm] libdrm: Fix drmNodeIsDRM() on DragonFly
Date: Wed, 19 Dec 2018 13:32:26 +0000	[thread overview]
Message-ID: <20181219133226.libfntp62kwsaawq@intel.com> (raw)
In-Reply-To: <20181218191127.2uecsztlrhndmgey@cube.wolfpond.org>

On Tuesday, 2018-12-18 20:11:27 +0100, Francois Tigeot wrote:
> On Mon, Dec 17, 2018 at 06:09:47PM +0000, Emil Velikov wrote:
> > On Tue, 11 Dec 2018 at 22:15, François Tigeot <ftigeot@wolfpond.org> wrote:
> > >
> > > * There is no way to check if a device name is really a drm device
> > >   by looking it up in a virtual filesystem like on Linux
> > >
> > > * The major device number is also dynamically allocated from a pool,
> > >   comparing it to a constant makes no sense
> > >
> > > * In the absence of better ideas, just assume the device name really
> > >   points to a drm device and always return true
> > >
> > I guess one could use the sysfs path, although that may require a few
> > extra lines to the linux emulation layer.
> 
> We currently have such a thing living in local patches and it's a source
> of pain; it regularly breaks for one reason or another.
> It's not using sysfs but a hw.dri sysctl mechanism originating from FreeBSD.
> Some of the patches are visible here:
> https://github.com/DragonFlyBSD/DPorts/blob/master/graphics/libdrm/files/patch-xf86drm.c

I'm going through those right now, and I'll send patches for those that
make sense upstream. Apologies in advance for the rebase pains :]

> 
> > What's the reason behind the dynamic allocation of the major? FWIW
> > some userspace requires a fixed DRM_MAJOR - they will need patching to
> > run :-(
> 
> Major/minor numbers were required when device files had to be created on
> regular filesystem like UFS but when a devfs filesystem was implemented
> for DragonFly almost a decade ago, nobody thought it was important anymore.
> 
> There have been no fixed major numbers on DragonFly since 2009 or so.

Fwiw, this `if dragonfly return true` patch is:
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2018-12-19 13:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 22:04 [PATCH libdrm] libdrm: Fix drmNodeIsDRM() on DragonFly François Tigeot
2018-12-17 18:09 ` Emil Velikov
2018-12-18 19:11   ` Francois Tigeot
2018-12-19 13:32     ` Eric Engestrom [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181219133226.libfntp62kwsaawq@intel.com \
    --to=eric.engestrom@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=ftigeot@wolfpond.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox