Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD865CCD183 for ; Thu, 16 Oct 2025 08:40:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 60D2C10E2E7; Thu, 16 Oct 2025 08:40:38 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.b="lf+rs90J"; dkim-atps=neutral Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1099510E2E7 for ; Thu, 16 Oct 2025 08:40:37 +0000 (UTC) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id AAACF1A140D for ; Thu, 16 Oct 2025 08:40:35 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 7F6D36062C; Thu, 16 Oct 2025 08:40:35 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 2E713102F22F1; Thu, 16 Oct 2025 10:40:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1760604035; h=from:subject:date:message-id:to:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references:autocrypt; bh=FiNq7N6AdzvBWMBBzD6wtA1OR91r+XXwH2mZzD2Sr9U=; b=lf+rs90JEwEu6ZAuhtbwskVThAGWoSH3yqOLnxRfYrUexDj2wmPEVw2I0gOODIFGePTDmr IQ5GNaP8/UrdYPphaeppKf6maD6WZs8fHUwAJtYXcWe7bmEhw6arVNqdVRq9nteVNxXBCT WCise/9iY3zH70MnQGo4cZSk6sYgDYerl0YQibnf0zdYJ6G2Ahf+mcolx1cxmtUtsfUXRz dae1lWFrnOlkYpQ4NhU62qCW1wwnJVWScz6nj/VFdLa7vfKg7Ojrbg5ivcupW+L5Y3ekDx DYR0zWUl8Ya9pRTOWiRmRWxyV4LAqA6w8WsOZ2AM2ewV8GEw4gqkl/pks/PCnQ== Message-ID: Date: Thu, 16 Oct 2025 10:40:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH i-g-t] lib/drmtest: Remove VKMS from Exclusion list To: Kamil Konieczny , Mark Yacoub , igt-dev@lists.freedesktop.org, juhapekka.heikkila@gmail.com, =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= References: <20251008160209.463702-1-markyacoub@google.com> <20251009164600.btzj5kiscl5ftdl7@kamilkon-DESK.igk.intel.com> <20251015181649.ca7psctqj2vj2dt2@kamilkon-DESK.igk.intel.com> Content-Language: en-US, fr From: Louis Chauvet Autocrypt: addr=louis.chauvet@bootlin.com; keydata= xsFNBGCG5KEBEAD1yQ5C7eS4rxD0Wj7JRYZ07UhWTbBpbSjHjYJQWx/qupQdzzxe6sdrxYSY 5K81kIWbtQX91pD/wH5UapRF4kwMXTAqof8+m3XfYcEDVG31Kf8QkJTG/gLBi1UfJgGBahbY hjP40kuUR/mr7M7bKoBP9Uh0uaEM+DuKl6bSXMSrJ6fOtEPOtnfBY0xVPmqIKfLFEkjh800v jD1fdwWKtAIXf+cQtC9QWvcdzAmQIwmyFBmbg+ccqao1OIXTgu+qMAHfgKDjYctESvo+Szmb DFBZudPbyTAlf2mVKpoHKMGy3ndPZ19RboKUP0wjrF+Snif6zRFisHK7D/mqpgUftoV4HjEH bQO9bTJZXIoPJMSb+Lyds0m83/LYfjcWP8w889bNyD4Lzzzu+hWIu/OObJeGEQqY01etOLMh deuSu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wZAMk24TZpsgg28o9MQiUNzad0h2 gIszbeej9ryrtLHxMzyK8yKhHoI2i2ovxy5O+hsWeAoCPE9xwbqnAjLjOn4Jzd/pPovizrq/ kUoX66YgvCuHfQMC/aBPLnVunZSP23J2CrkTrnsUzw== In-Reply-To: <20251015181649.ca7psctqj2vj2dt2@kamilkon-DESK.igk.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" Le 15/10/2025 à 20:16, Kamil Konieczny a écrit : > Hi Mark, > On 2025-10-09 at 12:53:24 -0400, Mark Yacoub wrote: >> Hi Kamil, >> >> Thanks for your feedback. I'd like to elaborate on my use case to provide >> more context about the problem I'm trying to solve. >> >> I am building IGT for Android, and the same build system is deployed on >> both physical hardware and virtual machines. On the hardware, the >> appropriate hardware driver is correctly detected, so there are no issues >> there. However, on the VM, VKMS is running, but it's currently excluded >> from `DRIVER_ANY`, which prevents the tests from running against it. I need >> the tests to execute on VKMS in this scenario. >> >> Using `IGT_FORCE_DRIVER` would require me to fork the build processes for >> hardware and VM, which I would prefer to avoid. My goal is to maintain a > > You do not need to fork it nor recompile, this is env var for > CI run with tests, it uses the same igt binaries only makes them > using a forced driver when opening card. Now it do not work as > no user before needed to force it into vgem or VKMS. > > In theory you could define it like: export IGT_FORCE_DRIVER=vkms > and then all kms tests and core_ ones should honor it. +CC: José Hi, I had the same issue this week, but IGT_FORCE_DRIVER is not enough: all the tests using DRIVER_ANY are skipped. # export IGT_DEVICE=drm:/dev/dri/card0 # export IGT_FORCE_DRIVER=vkms # export IGT_LOG_LEVEL=debug # /usr/libexec/igt-gpu-tools/kms_plane (kms_plane:125) igt_core-DEBUG: Notice: using IGT_DEVICE env: (kms_plane:125) igt_core-DEBUG: [drm:/dev/dri/card0] [IGT] kms_plane: executing IGT-Version: 2.2-g6d82d231ced6 (x86_64) (Linux: 6.17.0-rc6-01217-g1ddd2876eeb9 x86_64) Using IGT_SRANDOM=1760602572 for randomisation (kms_plane:125) drmtest-DEBUG: Looking for devices to open using filter 0: drm:/dev/dri/card0 (kms_plane:125) drmtest-DEBUG: Filter matched /dev/dri/card0 | (kms_plane:125) igt_kmod-DEBUG: Module vkms already inserted Test requirement not met in function drm_open_driver, file ../igt/lib/drmtest.c:735: Test requirement: !(fd<0) No known gpu found for chipset flags 0x4294965755 (any) Last errno: 2, No such file or directory Subtest pixel-format: SKIP (0.000s) Subtest pixel-format-source-clamping: SKIP (0.000s) Subtest plane-position-covered: SKIP (0.000s) Subtest plane-position-hole: SKIP (0.000s) Subtest plane-position-hole-dpms: SKIP (0.000s) Subtest plane-panning-top-left: SKIP (0.000s) Subtest plane-panning-bottom-right: SKIP (0.000s) Subtest plane-panning-bottom-right-suspend: SKIP (0.000s) Subtest planar-pixel-format-settings: SKIP (0.000s) [IGT] kms_plane: exiting, ret=77 (kms_plane:125) igt_core-DEBUG: Exiting with status code 77 José suggested this fix, it seems to properly use vkms if IGT_FORCE_DRIVER is set: diff --git a/lib/drmtest.c b/lib/drmtest.c index a1fb0b5ba..f630bc157 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -350,7 +350,7 @@ int __drm_open_device(const char *name, unsigned int chipset) modulename_to_chipset(dev_name, &chip); - if ((chipset & chip) == chip) { + if ((chipset & chip) == chip || (forced && strcmp(forced, dev_name) == 0)) { log_opened_device_path(name); return fd; } @Mark, is it enough for you? @José, do you want to send the proper patch? Hav a nice day, Louis Chauvet > Regards, > Kamil > >> unified build system and allow IGT to run on whatever driver is present. Is >> there a way to achieve this? >> >> I understand that the current code prioritizes the hardware driver, which >> is a desirable behavior. I'm trying to understand the potential issues that >> might arise if VKMS were not excluded in other contexts. >> >> Thank you! >> Mark >> >> >> On Thu, Oct 9, 2025 at 12:46 PM Kamil Konieczny < >> kamil.konieczny@linux.intel.com> wrote: >> >>> Hi Mark, >>> On 2025-10-08 at 12:02:09 -0400, Mark Yacoub wrote: >>>> [Why] >>>> VKMS (Virtual VKMS) is typically running on a virtual machine where it's >>>> expected to be without a contention with a hardware driver. >>>> When it's there, we would like to run IGT on it. >>>> >>>> [How] >>>> Delete VKMS from DRIVER_ANY's exclusion list to allow IGT to be picked >>>> up. >>>> >>>> Tested: Ran kms_bw on Android's VM with VKMS enabled. >>>> >>>> Change-Id: Ib13ad9261b8c2617370c02d0ffb5aa878bf3d8f8 >>>> Signed-off-by: Mark Yacoub >>>> --- >>>> lib/drmtest.h | 4 +--- >>>> 1 file changed, 1 insertion(+), 3 deletions(-) >>>> >>>> diff --git a/lib/drmtest.h b/lib/drmtest.h >>>> index 8416aa491..ab991da57 100644 >>>> --- a/lib/drmtest.h >>>> +++ b/lib/drmtest.h >>>> @@ -63,10 +63,8 @@ int __get_drm_device_name(int fd, char *name, int >>> name_size); >>>> * on a system with them as well as a supported driver, you can end up >>>> * with a near-100% skip rate if you don't explicitly specify the >>> device, >>>> * depending on device-load ordering. >>>> - * >>>> - * Exclude VKMS to prefer hardware drivers. >>>> */ >>>> -#define DRIVER_ANY ~(DRIVER_VGEM | DRIVER_VKMS | DRIVER_VIRTIO) >>>> +#define DRIVER_ANY ~(DRIVER_VGEM | DRIVER_VIRTIO) >>> >>> Nak, this is bad as there could be vkms module also on host. >>> >>> Let me work on improving IGT_FORCE_DRIVER. >>> >>> Regards, >>> Kamil >>> >>>> >>>> /* >>>> * Compile friendly enum for i915/xe. >>>> -- >>>> 2.51.0.740.g6adb054d12-goog >>>> >>> -- -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com