dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Gray <jsg@jsg.id.au>
To: mesa-dev@lists.freedesktop.org
Cc: ML dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH libdrm v2 5/5] xf86drm: implement an OpenBSD specific drmGetDevice2
Date: Tue, 6 Dec 2016 16:12:53 +1100	[thread overview]
Message-ID: <20161206051253.GA16837@largo.jsg.id.au> (raw)
In-Reply-To: <CACvgo52uLtfBzJ0X=vqb_h78AM+UXFFv3Y7N=cJJc3=rf9aZwQ@mail.gmail.com>

On Mon, Dec 05, 2016 at 05:56:40PM +0000, Emil Velikov wrote:
> On 1 December 2016 at 04:18, Jonathan Gray <jsg@jsg.id.au> wrote:
> > DRI devices on OpenBSD are not in their own directory.  They reside in
> > /dev with a large number of statically generated /dev nodes.
> >
> > Avoid stat'ing all of /dev on OpenBSD by implementing this custom path.
> >
> > v2:
> >    - use drmGetMinorType to get node type
> >    - adapt to drmProcessPciDevice changes
> >    - verify drmParseSubsystemType type is PCI
> >    - add a comment describing why this was added
> >
> Thanks for the update Jonathan.
> 
> I've pulled v2 in master,
> Emil

Thanks, going over what went in I see drmGetMinorNameForFD and
the OpenBSD drmGetDevice2 paths need to be adjusted to have the correct
minor for the control/render nodes.

ie

base = drmGetMinorBase(type);
if (min < base)
	return error;

min -= base;

I'll send another patch for this.

And the common code could be split into a shared function?

drmGetDeviceNameFromFd2 would do the same thing as
drmGetDeviceNameFromFd on OpenBSD as far as I can tell so that could be
another shared function instead of the current "missing implementation"
warning.  Or should drmGetDeviceNameFromFd purposefully not handle
render/control nodes?
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

  reply	other threads:[~2016-12-06  5:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-01  4:18 [PATCH libdrm v2 1/5] xf86drm: implement drmGetMinorNameForFD for non-sysfs Jonathan Gray
2016-12-01  4:18 ` [PATCH libdrm v2 2/5] xf86drm: implement drmParseSubsystemType for OpenBSD Jonathan Gray
2016-12-01  4:18 ` [PATCH libdrm v2 3/5] xf86drm: implement drmParsePciDeviceInfo " Jonathan Gray
2016-12-01  4:18 ` [PATCH libdrm v2 4/5] xf86drm: implement drmParsePciBusInfo " Jonathan Gray
2016-12-01  4:18 ` [PATCH libdrm v2 5/5] xf86drm: implement an OpenBSD specific drmGetDevice2 Jonathan Gray
2016-12-05 17:56   ` Emil Velikov
2016-12-06  5:12     ` Jonathan Gray [this message]
2016-12-07 16:46       ` Emil Velikov
2018-06-21 14:24   ` Emil Velikov
2018-06-21 15:32     ` Jonathan Gray
2018-06-26 10:38       ` Emil Velikov
2018-06-26 10:58         ` Jonathan Gray
2018-06-26 12:03           ` Mark Kettenis
2018-06-26 12:38             ` Emil Velikov

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=20161206051253.GA16837@largo.jsg.id.au \
    --to=jsg@jsg.id.au \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=mesa-dev@lists.freedesktop.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;
as well as URLs for NNTP newsgroup(s).