summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaihao Xiang <haihao.xiang@intel.com>2019-02-12 10:53:55 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2019-02-12 12:13:31 +0800
commit5f2f289b7e4c5b96873866dc1459d6e390beeab3 (patch)
tree7363eafd8a6434815da69be1e5329defbfad49fb
parente8fd000af0ba1568cfbbf3ccbdadaa1be21d0fbb (diff)
downloadgstreamer-plugins-bad-5f2f289b7e4c5b96873866dc1459d6e390beeab3.tar.gz
msdk: verify the driver name
We need to make sure the Intel graphics card is used in a dual GPU system. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/895
-rw-r--r--sys/msdk/gstmsdkcontext.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/msdk/gstmsdkcontext.c b/sys/msdk/gstmsdkcontext.c
index cf071105c..860722acd 100644
--- a/sys/msdk/gstmsdkcontext.c
+++ b/sys/msdk/gstmsdkcontext.c
@@ -94,7 +94,8 @@ get_device_id (void)
dev = (GUdevDevice *) l->data;
parent = g_udev_device_get_parent (dev);
- if (strcmp (g_udev_device_get_subsystem (parent), "pci") != 0) {
+ if (strcmp (g_udev_device_get_subsystem (parent), "pci") != 0 ||
+ strcmp (g_udev_device_get_driver (parent), "i915") != 0) {
g_object_unref (parent);
continue;
}