msdk: Add new driver name "xe"

Intel has released a new graphic driver named "xe" for
newer Gen12/Xe graphics (i.e. from Lunar Lake).
This patch add "xe" name when getting device in gst-msdk plugins.
See xe driver public in
https://github.com/torvalds/linux/tree/master/drivers/gpu/drm/xe

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7178>
This commit is contained in:
Mengkejiergeli Ba 2023-11-14 14:39:29 +08:00 committed by GStreamer Marge Bot
parent 035e0698cf
commit 84cb1ef895

View file

@ -92,7 +92,8 @@ get_device_path (void)
if (fd >= 0) {
drmVersionPtr drm_version = drmGetVersion (fd);
if (!drm_version || strncmp (drm_version->name, "i915", 4)) {
if (!drm_version || (strncmp (drm_version->name, "i915", 4) &&
strncmp (drm_version->name, "xe", 2))) {
GST_ERROR ("The specified device isn't an Intel device");
drmFreeVersion (drm_version);
close (fd);
@ -131,7 +132,8 @@ get_device_path (void)
parent = g_udev_device_get_parent (dev);
if (strcmp (g_udev_device_get_subsystem (parent), "pci") != 0 ||
strcmp (g_udev_device_get_driver (parent), "i915") != 0) {
(strcmp (g_udev_device_get_driver (parent), "i915") != 0 &&
strcmp (g_udev_device_get_driver (parent), "xe") != 0)) {
g_object_unref (parent);
continue;
}