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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

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.
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to