[igt-dev] [PATCH i-g-t 1/2] tests/kms_rmfb: Add check for xe driver

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Wed Oct 4 17:12:23 UTC 2023


On Tue, Sep 26, 2023 at 06:02:23PM +0530, Nemesa Garg wrote:
> As the xe check is missing the value of open_count
> variable is not incrementing and because of this
> during drm_close_driver operation based on open_count
> value mutex is acquired and there is a callback to
> lastclose function.
> 
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/294
> Signed-off-by: Nemesa Garg <nemesa.garg at intel.com>
> ---
>  lib/drmtest.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/drmtest.c b/lib/drmtest.c
> index e1da66c87..99b655680 100644
> --- a/lib/drmtest.c
> +++ b/lib/drmtest.c
> @@ -649,7 +649,7 @@ int drm_open_driver(int chipset)
>  	 * starting a test and we install an exit handler to wait until
>  	 * idle before quitting.
>  	 */
> -	if (is_i915_device(fd)) {
> +	if (is_i915_device(fd) || is_xe_device(fd)) {

I think this might be changed to is_intel_device(fd) but
below cancel work doesn't work for xe if I'm not wrong
so it should be called for i915 only.

--
Zbigniew


>  		if (__sync_fetch_and_add(&open_count, 1) == 0) {
>  			__cancel_work_at_exit(fd);
>  			at_exit_drm_fd = drm_reopen_driver(fd);
> -- 
> 2.25.1
> 


More information about the igt-dev mailing list