From: Ilya Trukhanov Date: Sat, 23 May 2020 14:13:15 +0000 (+0300) Subject: media-libs/mesa: check for CONFIG_CHECKPOINT_RESTORE=y X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ee5e5804a9a10db5fd95022efe5e9217b56dd6d1;p=gentoo.git media-libs/mesa: check for CONFIG_CHECKPOINT_RESTORE=y This lets AMDGPU users know they should enable the kernel config option. It should be enabled by CONFIG_GENTOO_LINUX_INIT_SYSTEMD, but if e.g. OpenRC is used, it's possible for the option to be unset, as was in my case. Not doing so can cause the following spooky warning: "amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description. If they do, bad things may happen!" I haven't experienced any issues with the config option disabled, but the warning is likely there for a reason. Closes: https://github.com/gentoo/gentoo/pull/15926 Signed-off-by: Ilya Trukhanov Signed-off-by: Matt Turner --- diff --git a/media-libs/mesa/mesa-19.3.5.ebuild b/media-libs/mesa/mesa-19.3.5.ebuild index 7773329bcc6e..734d4a391c51 100644 --- a/media-libs/mesa/mesa-19.3.5.ebuild +++ b/media-libs/mesa/mesa-19.3.5.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{6,7,8} ) -inherit llvm meson multilib-minimal pax-utils python-any-r1 +inherit llvm meson multilib-minimal pax-utils python-any-r1 linux-info OPENGL_DIR="xorg-x11" @@ -325,6 +325,15 @@ pkg_setup() { ewarn "detected! This can cause problems. For details, see bug 459306." fi + # os_same_file_description requires the kcmp syscall, + # which is only available with CONFIG_CHECKPOINT_RESTORE=y. + # Currently only AMDGPU utilizes this function, so only AMDGPU users would + # get a spooky warning message if the syscall fails. + if use gallium && use video_cards_radeonsi; then + CONFIG_CHECK="~CHECKPOINT_RESTORE" + linux-info_pkg_setup + fi + if use gallium && use llvm; then llvm_pkg_setup fi diff --git a/media-libs/mesa/mesa-20.0.4-r1.ebuild b/media-libs/mesa/mesa-20.0.4-r1.ebuild index 7beeaef918f6..097105ff4c5b 100644 --- a/media-libs/mesa/mesa-20.0.4-r1.ebuild +++ b/media-libs/mesa/mesa-20.0.4-r1.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{6,7,8} ) -inherit llvm meson multilib-minimal python-any-r1 +inherit llvm meson multilib-minimal python-any-r1 linux-info OPENGL_DIR="xorg-x11" @@ -330,6 +330,15 @@ pkg_setup() { ewarn "detected! This can cause problems. For details, see bug 459306." fi + # os_same_file_description requires the kcmp syscall, + # which is only available with CONFIG_CHECKPOINT_RESTORE=y. + # Currently only AMDGPU utilizes this function, so only AMDGPU users would + # get a spooky warning message if the syscall fails. + if use gallium && use video_cards_radeonsi; then + CONFIG_CHECK="~CHECKPOINT_RESTORE" + linux-info_pkg_setup + fi + if use gallium && use llvm; then llvm_pkg_setup fi diff --git a/media-libs/mesa/mesa-20.0.7.ebuild b/media-libs/mesa/mesa-20.0.7.ebuild index 03083871b14d..ff719014070b 100644 --- a/media-libs/mesa/mesa-20.0.7.ebuild +++ b/media-libs/mesa/mesa-20.0.7.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{6,7,8} ) -inherit llvm meson multilib-minimal python-any-r1 +inherit llvm meson multilib-minimal python-any-r1 linux-info OPENGL_DIR="xorg-x11" @@ -334,6 +334,15 @@ pkg_setup() { ewarn "detected! This can cause problems. For details, see bug 459306." fi + # os_same_file_description requires the kcmp syscall, + # which is only available with CONFIG_CHECKPOINT_RESTORE=y. + # Currently only AMDGPU utilizes this function, so only AMDGPU users would + # get a spooky warning message if the syscall fails. + if use gallium && use video_cards_radeonsi; then + CONFIG_CHECK="~CHECKPOINT_RESTORE" + linux-info_pkg_setup + fi + if use gallium && use llvm; then llvm_pkg_setup fi diff --git a/media-libs/mesa/mesa-20.1.0_rc4.ebuild b/media-libs/mesa/mesa-20.1.0_rc4.ebuild index 03083871b14d..ff719014070b 100644 --- a/media-libs/mesa/mesa-20.1.0_rc4.ebuild +++ b/media-libs/mesa/mesa-20.1.0_rc4.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{6,7,8} ) -inherit llvm meson multilib-minimal python-any-r1 +inherit llvm meson multilib-minimal python-any-r1 linux-info OPENGL_DIR="xorg-x11" @@ -334,6 +334,15 @@ pkg_setup() { ewarn "detected! This can cause problems. For details, see bug 459306." fi + # os_same_file_description requires the kcmp syscall, + # which is only available with CONFIG_CHECKPOINT_RESTORE=y. + # Currently only AMDGPU utilizes this function, so only AMDGPU users would + # get a spooky warning message if the syscall fails. + if use gallium && use video_cards_radeonsi; then + CONFIG_CHECK="~CHECKPOINT_RESTORE" + linux-info_pkg_setup + fi + if use gallium && use llvm; then llvm_pkg_setup fi diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild index 03083871b14d..ff719014070b 100644 --- a/media-libs/mesa/mesa-9999.ebuild +++ b/media-libs/mesa/mesa-9999.ebuild @@ -5,7 +5,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{6,7,8} ) -inherit llvm meson multilib-minimal python-any-r1 +inherit llvm meson multilib-minimal python-any-r1 linux-info OPENGL_DIR="xorg-x11" @@ -334,6 +334,15 @@ pkg_setup() { ewarn "detected! This can cause problems. For details, see bug 459306." fi + # os_same_file_description requires the kcmp syscall, + # which is only available with CONFIG_CHECKPOINT_RESTORE=y. + # Currently only AMDGPU utilizes this function, so only AMDGPU users would + # get a spooky warning message if the syscall fails. + if use gallium && use video_cards_radeonsi; then + CONFIG_CHECK="~CHECKPOINT_RESTORE" + linux-info_pkg_setup + fi + if use gallium && use llvm; then llvm_pkg_setup fi