[Mesa-dev] [Bug 103283] drm_get_device_name_for_fd is broken on FreeBSD

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Oct 15 14:05:18 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=103283

            Bug ID: 103283
           Summary: drm_get_device_name_for_fd is broken on FreeBSD
           Product: Mesa
           Version: 17.2
          Hardware: Other
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: medium
         Component: EGL/Wayland
          Assignee: wayland-bugs at lists.freedesktop.org
          Reporter: greg at unrelenting.technology
        QA Contact: mesa-dev at lists.freedesktop.org

Created attachment 134848
  --> https://bugs.freedesktop.org/attachment.cgi?id=134848&action=edit
patch-src_loader_loader.c

The function drm_get_device_name_for_fd in src/loader/loader.c uses
dev_node_from_fd which uses Linux-specific major/minor stuff, which does not
work correctly on FreeBSD.

Because of this, Wayland EGL clients on FreeBSD receive /dev/dri/card408
instead of /dev/dri/card0 as the device path, and fall back to software
rendering :D

The attached patch replaces the code with a call to drmGetDeviceNameFromFd2,
which is patched in our packages to work correctly
(https://github.com/freebsd/freebsd-ports/blob/master/graphics/libdrm/files/patch-xf86drm.c).
(dev_node_from_fd is probably dead code after this patch)

Why wasn't drmGetDeviceNameFromFd2 used in the first place? Why was libdrm's
functionality duplicated?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171015/e15ca17b/attachment.html>


More information about the mesa-dev mailing list