All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] libdrm: Add master <> render node helpers
@ 2015-02-02  0:14 Emil Velikov
  2015-02-02  0:14 ` [PATCH 1/2] drm: add drmGet{Device, Render}NameFrom{Render, Device}Fd helpers Emil Velikov
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Emil Velikov @ 2015-02-02  0:14 UTC (permalink / raw)
  To: dri-devel
  Cc: Mark Kettenis, François Tigeot, emil.l.velikov,
	Thomas Klausner, Robert Millan, Konstantin Belousov

Hi all,

As mentioned a couple of days ago at #dri-devel some(most) users of 
render nodes tend to rely on strict mapping between the primary and 
render node. I.e. something along the lines of

  fstat(render_fd, &sbuf);
  sprintf(primary_node, "/dev/dri/card%d",
                        ((sbuf.st_rdev & 0x3f) | 0x80));

Currently the following are (ab)using the above code:
 - xf86-video-nouveau
 - xf86-video-intel
 - libva (vaapi)

As reminded by David Herrman, this is not the correct solution - thus 
I've added a couple of helpers which walk through sysfs of the 
respecitive device and return the correct device name.

I'm not 100% happy with the function names, so suggestions are greatly 
appreciated. Any other comments are also welcome :)

Note: BSD guys - you'll likely need your own version of these functions.

Cheers,
Emil

Cc: Thomas Klausner <wiz@NetBSD.org>
Cc: Konstantin Belousov <kib@freebsd.org>
Cc: Robert Millan <rmh@freebsd.org>
Cc: Mark Kettenis <kettenis@openbsd.org>
Cc: Jonathan Gray <jsg@jsg.id.au>
Cc: François Tigeot <ftigeot@wolfpond.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-03-07  1:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-02  0:14 [RFC PATCH 0/2] libdrm: Add master <> render node helpers Emil Velikov
2015-02-02  0:14 ` [PATCH 1/2] drm: add drmGet{Device, Render}NameFrom{Render, Device}Fd helpers Emil Velikov
2015-02-13 11:07   ` Frank Binns
2015-02-23 12:22   ` [PATCH libdrm v2] drm: add drmGet(Master|Render)NameFrom(Render|Master)FD functions Emil Velikov
2015-02-23 14:35     ` Frank Binns
2015-02-23 15:03       ` Emil Velikov
2015-03-07  0:58     ` [PATCH libdrm v3] " Emil Velikov
2015-03-07  1:08       ` Emil Velikov
2015-02-02  0:14 ` [PATCH 2/2] libdrm: add drmGetNodeType() helper Emil Velikov
2015-02-13 10:50   ` Frank Binns
2015-02-10 22:37 ` [RFC PATCH 0/2] libdrm: Add master <> render node helpers Emil Velikov
2015-02-10 23:32   ` Jonathan Gray
2015-02-12 18:21   ` David Herrmann
2015-02-13  9:18     ` Emil Velikov
2015-02-13 11:18       ` Frank Binns
2015-02-13 18:19         ` Emil Velikov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.