[igt-dev] [PATCH i-g-t] lib: Do not apply filtering to DRIVER_VGEM

Chris Wilson chris at chris-wilson.co.uk
Fri Nov 13 14:47:18 UTC 2020


The vgem device is used by several tests in conjunction to their HW
backend in order to supply external fences. Do not prevent these tests
from running by filtering out DRIVER_VGEM.

Suggested-by: Petri Latvala <petri.latvala at intel.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala at intel.com>
---
 lib/drmtest.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 3a8bd8591..8527b56ec 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -412,9 +412,10 @@ static bool __get_card_for_nth_filter(int idx, struct igt_device_card *card)
 int __drm_open_driver_another(int idx, int chipset)
 {
 	int fd = -1;
-	if (igt_device_filter_count() > idx) {
-		bool found;
+
+	if (chipset != DRIVER_VGEM && igt_device_filter_count() > idx) {
 		struct igt_device_card card;
+		bool found;
 
 		found = __get_card_for_nth_filter(idx, &card);
 
@@ -461,9 +462,9 @@ int __drm_open_driver(int chipset)
 
 int __drm_open_driver_render(int chipset)
 {
-	if (igt_device_filter_count() > 0) {
-		bool found;
+	if (chipset != DRIVER_VGEM && igt_device_filter_count() > 0) {
 		struct igt_device_card card;
+		bool found;
 
 		found = __get_card_for_nth_filter(0, &card);
 
-- 
2.29.2



More information about the igt-dev mailing list