drm: unbreak VA_DRM_IsRenderNodeFd on FreeBSD
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.
LGTM
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 ...
@jbeich , please help to check whether it work with older version libdrm. in libva configure, it only require the version > 2.4
@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')
Can this be finalized and merged?
Oh, I see this is replaced by #491. Can this be closed out, then?
Fwiw I've removed the function all together, in favour of drmGetNodeTypeFromFd() with https://github.com/intel/libva/pull/614
This part was reworked with recently merged #614. Please, take a look and reopen/submit new PR if needed.