Skip to content

Conversation

@jbeich
Copy link
Contributor

@jbeich jbeich commented Apr 1, 2019

drmGetDeviceNameFromFd doesn't support render nodes according to libdrm@37d790f. And st_rdev & 0x80 may not work on FreeBSD because major/minor semantics are different.

jbeich added 2 commits April 3, 2019 12:39
drmGetDeviceNameFromFd only returns primary nodes, so the fallback
will always fail.
0x80 bit is specific to Linux. Other systems may not use st_rdev.
@jbeich jbeich changed the title drm: switch to drmGetDeviceNameFromFd2 drm: unbreak VA_DRM_IsRenderNodeFd on FreeBSD Apr 3, 2019
@XinfengZhang
Copy link
Contributor

LGTM

@XinfengZhang
Copy link
Contributor

the only concern is: the commit of the libdrm is after 2.4, maybe will cant compile with 2.4, such as 2.4.53 ...

@XinfengZhang
Copy link
Contributor

@jbeich , please help to check whether it work with older version libdrm. in libva configure, it only require the version > 2.4

@jbeich
Copy link
Contributor Author

jbeich commented May 9, 2019

@XinfengZhang, this PR fails with libdrm < 2.4.74 but even unmodified libva requires drmGetDeviceNameFromFd which was added in libdrm >= 2.4.16. However, downstream with old libdrm package usually also have old libva.

As I've removed my fork (to avoid clutter) a fix would require a separate PR e.g.,

--- a/configure.ac
+++ b/configure.ac
@@ -75,7 +75,7 @@ m4_define([libva_lt_age],
           [m4_eval(libva_binary_age - libva_interface_age)])
 
 # libdrm minimun version requirement
-m4_define([libdrm_version], [2.4])
+m4_define([libdrm_version], [2.4.74])
 
 # Wayland minimum version number
 # 1.11.0 for wl_proxy_create_wrapper
--- a/meson.build
+++ b/meson.build
@@ -73,7 +73,7 @@ configinc = include_directories('.')
 cc = meson.get_compiler('c')
 dl_dep = cc.find_library('dl', required : false)
 
-libdrm_dep = dependency('libdrm', version : '>= 2.4')
+libdrm_dep = dependency('libdrm', version : '>= 2.4.74')
 
 WITH_DRM = not get_option('disable_drm')
 

@rcombs
Copy link
Contributor

rcombs commented Jul 7, 2022

Can this be finalized and merged?

@rcombs
Copy link
Contributor

rcombs commented Jul 7, 2022

Oh, I see this is replaced by #491. Can this be closed out, then?

@evelikov
Copy link
Contributor

evelikov commented Jul 7, 2022

Fwiw I've removed the function all together, in favour of drmGetNodeTypeFromFd() with #614

@dvrogozh
Copy link
Contributor

This part was reworked with recently merged #614. Please, take a look and reopen/submit new PR if needed.

@dvrogozh dvrogozh closed this Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants