From 4e6f8705e6aa7406a4699915a43679732c85af59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kelemen=20=28vudiq=29?= Date: Wed, 27 Oct 2021 15:45:50 +0200 Subject: [PATCH] crocus: add Mesa gallium driver for older Intel GPUs --- config/graphic | 9 ++++++++- packages/addons/addon-depends/ffmpegx/package.mk | 2 +- packages/graphics/libdrm/package.mk | 2 +- packages/graphics/mesa/package.mk | 4 ++++ packages/virtual/mediacenter/package.mk | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/config/graphic b/config/graphic index e6150d6663..f125588a22 100644 --- a/config/graphic +++ b/config/graphic @@ -23,7 +23,14 @@ get_graphicdrivers() { V4L2_SUPPORT="no" if [ "${GRAPHIC_DRIVERS}" = "all" ]; then - GRAPHIC_DRIVERS="iris i915 i965 r200 r300 r600 radeonsi nvidia nvidia-legacy vmware virtio vc4" + GRAPHIC_DRIVERS="crocus iris i915 i965 r200 r300 r600 radeonsi nvidia nvidia-legacy vmware virtio vc4" + fi + + if listcontains "${GRAPHIC_DRIVERS}" "crocus"; then + GALLIUM_DRIVERS+=" crocus" + XORG_DRIVERS+=" intel" + COMPOSITE_SUPPORT="yes" + VAAPI_SUPPORT="yes" fi if listcontains "${GRAPHIC_DRIVERS}" "etnaviv"; then diff --git a/packages/addons/addon-depends/ffmpegx/package.mk b/packages/addons/addon-depends/ffmpegx/package.mk index 49c0aef487..3d3f93a83e 100644 --- a/packages/addons/addon-depends/ffmpegx/package.mk +++ b/packages/addons/addon-depends/ffmpegx/package.mk @@ -17,7 +17,7 @@ get_graphicdrivers if [ "${TARGET_ARCH}" = "x86_64" ]; then PKG_DEPENDS_TARGET+=" nasm:host x265" - if listcontains "${GRAPHIC_DRIVERS}" "(iris|i915|i965)"; then + if listcontains "${GRAPHIC_DRIVERS}" "(crocus|iris|i915|i965)"; then PKG_DEPENDS_TARGET+=" intel-vaapi-driver" fi fi diff --git a/packages/graphics/libdrm/package.mk b/packages/graphics/libdrm/package.mk index f02e48c8f0..a74313ba81 100644 --- a/packages/graphics/libdrm/package.mk +++ b/packages/graphics/libdrm/package.mk @@ -26,7 +26,7 @@ PKG_MESON_OPTS_TARGET="-Dlibkms=false \ -Dinstall-test-programs=false \ -Dudev=false" -listcontains "${GRAPHIC_DRIVERS}" "(iris|i915|i965)" && +listcontains "${GRAPHIC_DRIVERS}" "(crocus|iris|i915|i965)" && PKG_MESON_OPTS_TARGET+=" -Dintel=true" || PKG_MESON_OPTS_TARGET+=" -Dintel=false" listcontains "${GRAPHIC_DRIVERS}" "(r200|r300|r600|radeonsi)" && diff --git a/packages/graphics/mesa/package.mk b/packages/graphics/mesa/package.mk index 7ddf7c96a2..d7aa132d74 100644 --- a/packages/graphics/mesa/package.mk +++ b/packages/graphics/mesa/package.mk @@ -66,6 +66,10 @@ else PKG_MESON_OPTS_TARGET+=" -Dgallium-va=disabled" fi +if listcontains "${GRAPHIC_DRIVERS}" "crocus"; then + PKG_MESON_OPTS_TARGET+=" -Dprefer-crocus=true" +fi + if listcontains "${GRAPHIC_DRIVERS}" "vmware"; then PKG_MESON_OPTS_TARGET+=" -Dgallium-xa=enabled" else diff --git a/packages/virtual/mediacenter/package.mk b/packages/virtual/mediacenter/package.mk index 32ffbf7038..0d4e3200d4 100644 --- a/packages/virtual/mediacenter/package.mk +++ b/packages/virtual/mediacenter/package.mk @@ -39,7 +39,7 @@ if [ "${MEDIACENTER}" = "kodi" ]; then fi get_graphicdrivers - if listcontains "${GRAPHIC_DRIVERS}" "(iris|i915|i965)"; then + if listcontains "${GRAPHIC_DRIVERS}" "(crocus|iris|i915|i965)"; then PKG_DEPENDS_TARGET+=" intel-vaapi-driver media-driver" fi