Skip to content

Commit

Permalink
Be more generic when checking for the DRM device.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlesage committed Nov 17, 2023
1 parent d7c5444 commit 6cb8766
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rootfs/etc/cont-init.d/54-check-qsv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e # Exit immediately if a command exits with a non-zero status.
set -u # Treat unset variables as an error.

DRI_DIR="/dev/dri"
DRI_DEV="$DRI_DIR/renderD128"
DRI_DEV="$(ls "$DRI_DIR"/renderD* 2>/dev/null || true)"
PROCESSOR_NAME="$(list_cpu_features | grep "^brand " | awk -F ':' '{ gsub(/^[ \t]+/,"",$2); print $2 }')"
MICROARCHITECTURE="$(list_cpu_features | grep "^uarch " | awk -F ':' '{ gsub(/^[ \t]+/,"",$2); print $2 }')"

Expand Down Expand Up @@ -69,8 +69,8 @@ if [ ! -d "$DRI_DIR" ]; then
exit 0
fi

if [ ! -e "$DRI_DEV" ]; then
echo "Intel Quick Sync Video not supported: device $DRI_DEV not found."
if [ -z "${DRI_DEV:-}" ]; then
echo "Intel Quick Sync Video not supported: no Direct Rendering Manager (DRM) device found under $DRI_DIR."
exit 0
fi

Expand Down

0 comments on commit 6cb8766

Please sign in to comment.