libva icon indicating copy to clipboard operation
libva copied to clipboard

drm: unbreak VA_DRM_IsRenderNodeFd on FreeBSD

Open jbeich opened this issue 6 years ago • 7 comments

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 avatar Apr 01 '19 15:04 jbeich

LGTM

XinfengZhang avatar Apr 26 '19 07:04 XinfengZhang

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 avatar May 09 '19 06:05 XinfengZhang

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

XinfengZhang avatar May 09 '19 06:05 XinfengZhang

@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')
 

jbeich avatar May 09 '19 07:05 jbeich

Can this be finalized and merged?

rcombs avatar Jul 07 '22 18:07 rcombs

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

rcombs avatar Jul 07 '22 20:07 rcombs

Fwiw I've removed the function all together, in favour of drmGetNodeTypeFromFd() with https://github.com/intel/libva/pull/614

evelikov avatar Jul 07 '22 23:07 evelikov

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

dvrogozh avatar Sep 27 '22 18:09 dvrogozh