From patchwork Tue Sep 13 12:04:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 12974708 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 04FD9C54EE9 for ; Tue, 13 Sep 2022 12:05:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B429210E6BA; Tue, 13 Sep 2022 12:05:12 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id A3CE910E6B3; Tue, 13 Sep 2022 12:05:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663070705; x=1694606705; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ymvleY5q3q1XTZaqZqIZiIrdxjL9UQWIqjt8ooOodpI=; b=Q2ZPpaB4QhpYjWruuWIzcTvDiBknbHEWbrFHnWRalJrESGdX7otir/5R +cibB9FLJ3AParut3vQtFvbARYz+XsfUixG3MV4Ck0xk9ad7WYF4slRwz Xi0lQ6IsNhXVRyuSm9Imf4zEoNjIuoWC7cG8I/+0xWGJcgRSYECYJwTqv G9nrhSatX8g4O4yvjBNuyWk8+UkflblNMg44OWFjEAcj+JnWZUT8zdwbe 5u8wBhsgSjwvafzBJTO+7d6ZcD2l4g77KKZaQ7S0HGx57NjMoKtx0OjH/ aORVi1QzWnghJRWPLn9V9nRd3L0SHw6IFYW0AZisOtdPdKmzYEq81xwct w==; X-IronPort-AV: E=McAfee;i="6500,9779,10468"; a="281136804" X-IronPort-AV: E=Sophos;i="5.93,312,1654585200"; d="scan'208";a="281136804" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2022 05:05:05 -0700 X-IronPort-AV: E=Sophos;i="5.93,312,1654585200"; d="scan'208";a="678538730" Received: from jkrzyszt-mobl1.ger.corp.intel.com (HELO jkrzyszt-mobl1.lan) ([10.213.10.213]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2022 05:05:03 -0700 From: Janusz Krzysztofik To: igt-dev@lists.freedesktop.org Date: Tue, 13 Sep 2022 14:04:38 +0200 Message-Id: <20220913120441.146757-2-janusz.krzysztofik@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220913120441.146757-1-janusz.krzysztofik@linux.intel.com> References: <20220913120441.146757-1-janusz.krzysztofik@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t 1/4] tests/core_hotunplug: Free mem allocated by igt_audio_driver_unload X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, Mauro Carvalho Chehab Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Since we pass NULL to igt_audio_driver_unload(), realloc() it calls allocates new memory for us. Free it each time we no longer need it, before dropping a pointer to it, to avoid memory leaking. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- tests/core_hotunplug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index a0d29b799a..733ea8efb0 100644 --- a/tests/core_hotunplug.c +++ b/tests/core_hotunplug.c @@ -187,6 +187,7 @@ static void driver_bind(struct hotunplug *priv, int timeout) if (priv->snd_driver) { igt_info("Realoading %s\n", priv->snd_driver); igt_kmod_load(priv->snd_driver, NULL); + free(priv->snd_driver); priv->snd_driver = NULL; } } From patchwork Tue Sep 13 12:04:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 12974707 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 D33CDC6FA82 for ; Tue, 13 Sep 2022 12:05:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8163E10E6C3; Tue, 13 Sep 2022 12:05:13 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7E43010E6B3; Tue, 13 Sep 2022 12:05:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663070707; x=1694606707; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0NGhHAvgbuEMTp9BhqihFAEj/QoX5SkT2NMb9MJ5nnc=; b=OFNVP7jFoNIWBE6NorHd7zylBGOxLo+2Qu1SmTDYoX/kPR71iyN9UsfY CXTnkrzWkslGpbOMzSrV0HEunBvMVMuVoIXCXyI51EqwHg8BU4lE1mHav O4HSPMOYzRhNQqLSmmh7bE5RmCSCtddaMVdQpA0pedjPjo23CXqzVGgat GMGHwjrCXHMf1w/BPY+urpHrc354QwMPlcg5c5NQ0K/OgOkRdgoHByzfj JKoEd2u07jtZVBMUS82JIU5bNB8KrjZQny3yAfxx25xvvsDTDC0zfB1FN PQOnjgUdw9DA+vTyEHJhZim4ZhFAvX/fVd8cAGPIkWDx/yv/HPgztGhs0 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10468"; a="281136815" X-IronPort-AV: E=Sophos;i="5.93,312,1654585200"; d="scan'208";a="281136815" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2022 05:05:07 -0700 X-IronPort-AV: E=Sophos;i="5.93,312,1654585200"; d="scan'208";a="678538739" Received: from jkrzyszt-mobl1.ger.corp.intel.com (HELO jkrzyszt-mobl1.lan) ([10.213.10.213]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2022 05:05:05 -0700 From: Janusz Krzysztofik To: igt-dev@lists.freedesktop.org Date: Tue, 13 Sep 2022 14:04:39 +0200 Message-Id: <20220913120441.146757-3-janusz.krzysztofik@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220913120441.146757-1-janusz.krzysztofik@linux.intel.com> References: <20220913120441.146757-1-janusz.krzysztofik@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t 2/4] tests/core_hotunplug: Also unload audio before device unplug X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, Mauro Carvalho Chehab Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Starting from commit e9c69e02b2f7 ("tests/core_hotunplug: Unload snd driver before i915 unbind") that replaced a former conservative workaround with a more liberal one but also moved it out of initial igt_fixture section to driver_unbind(), *plug* subtests (still blockisted in CI) can suffer from issues related to an audio driver using i915 hardware. Fix it by adding a copy of the workaround in its current shape also to device_unplug() / bus_rescan() pair of functions. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- tests/core_hotunplug.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index 733ea8efb0..c3756889c2 100644 --- a/tests/core_hotunplug.c +++ b/tests/core_hotunplug.c @@ -198,6 +198,21 @@ static void device_unplug(struct hotunplug *priv, const char *prefix, { igt_require(priv->fd.sysfs_dev == -1); + /* + * FIXME: on some devices, the audio driver (snd_hda_intel) + * binds into the i915 driver. On such hardware, kernel warnings + * and errors may happen if i915 is unbind/removed before removing + * first the audio driver. + * So, add a logic that unloads the audio driver before trying to + * unbind i915 driver, reloading it when binding again. + */ + if (igt_audio_driver_unload(&priv->snd_driver)) { + igt_skip("Audio driver %s in use, skipping test\n", + priv->snd_driver); + } else if (priv->snd_driver) { + igt_info("Unloaded audio driver %s\n", priv->snd_driver); + } + priv->fd.sysfs_dev = openat(priv->fd.sysfs_bus, priv->dev_bus_addr, O_DIRECTORY); igt_assert_fd(priv->fd.sysfs_dev); @@ -231,6 +246,13 @@ static void bus_rescan(struct hotunplug *priv, int timeout) igt_fail_on_f(faccessat(priv->fd.sysfs_bus, priv->dev_bus_addr, F_OK, 0), "Fakely unplugged device not rediscovered (%s)!\n", priv->dev_bus_addr); + + if (priv->snd_driver) { + igt_info("Realoading %s\n", priv->snd_driver); + igt_kmod_load(priv->snd_driver, NULL); + free(priv->snd_driver); + priv->snd_driver = NULL; + } } static void cleanup(struct hotunplug *priv) From patchwork Tue Sep 13 12:04:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 12974706 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 2DE5FC54EE9 for ; Tue, 13 Sep 2022 12:05:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5FDCC10E6C1; Tue, 13 Sep 2022 12:05:11 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 477A010E6BA; Tue, 13 Sep 2022 12:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663070709; x=1694606709; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mtzqKNO+DKRZHrLs3WiylhLA4GeJO70Ji3fTgXELIRc=; b=DjboXe3S6DH49EYNcOXi6lcbmHrUFoSGKhDWa2+wzaPt908uobTvvRXJ vl8Sjlr+w2puo/S1pgowGSCdazZpOXmdH0Af1K82o+mxoPmQkt3pNEbQv Jop+NyZnfx25grWQrSrhcY0j+ySFb10GKcXq/beywAk2nwFHDvCyz4Zz8 9Lvqt5ZUCDa6PCedati7tyDsWSzcSQUt28CV4RS1j1xaWu2RuH3V7a7bW TKsvLKWqkjBNOZIGWfucXXbBZZcaWDd0PCX/RbKbncUmQopSG50CJMM2k MAYh32YHuKuYkfC3SWOajkTxBbfr0sgl6Jgv3vp0P1iuD/msn4iwItaAt g==; X-IronPort-AV: E=McAfee;i="6500,9779,10468"; a="281136827" X-IronPort-AV: E=Sophos;i="5.93,312,1654585200"; d="scan'208";a="281136827" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2022 05:05:08 -0700 X-IronPort-AV: E=Sophos;i="5.93,312,1654585200"; d="scan'208";a="678538748" Received: from jkrzyszt-mobl1.ger.corp.intel.com (HELO jkrzyszt-mobl1.lan) ([10.213.10.213]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2022 05:05:07 -0700 From: Janusz Krzysztofik To: igt-dev@lists.freedesktop.org Date: Tue, 13 Sep 2022 14:04:40 +0200 Message-Id: <20220913120441.146757-4-janusz.krzysztofik@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220913120441.146757-1-janusz.krzysztofik@linux.intel.com> References: <20220913120441.146757-1-janusz.krzysztofik@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t 3/4] tests/core_hotunplug: Don't apply i915 workarounds on other platforms X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, Mauro Carvalho Chehab Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Starting from commit 0edabd8a4a08 ("core_hotunplug: fix audio unbind logic") audio modules are unloaded unconditionally before graphics driver unbind. This is required for i915 to be unbound cleanly from a graphics device. However, we have no indications that non-Intel platforms require the same. Since we care for other platforms using this test and contributing to it, not developing their own, keep i915 workarounds limited to i915 devices. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 58 +++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index c3756889c2..29cb26ab12 100644 --- a/tests/core_hotunplug.c +++ b/tests/core_hotunplug.c @@ -55,6 +55,7 @@ struct hotunplug { bool need_healthcheck; bool has_intel_perf; char *snd_driver; + int chipset; }; /* Helpers */ @@ -140,19 +141,20 @@ static void prepare(struct hotunplug *priv) static void driver_unbind(struct hotunplug *priv, const char *prefix, int timeout) { - /* - * FIXME: on some devices, the audio driver (snd_hda_intel) - * binds into the i915 driver. On such hardware, kernel warnings - * and errors may happen if i915 is unbind/removed before removing - * first the audio driver. - * So, add a logic that unloads the audio driver before trying to - * unbind i915 driver, reloading it when binding again. - */ - if (igt_audio_driver_unload(&priv->snd_driver)) { - igt_skip("Audio driver %s in use, skipping test\n", - priv->snd_driver); - } else if (priv->snd_driver) { - igt_info("Unloaded audio driver %s\n", priv->snd_driver); + if (priv->chipset == DRIVER_INTEL) { + /* + * FIXME: on some devices, the audio driver (snd_hda_intel) + * binds into the i915 driver. On such hardware, kernel warnings + * and errors may happen if i915 is unbind/removed before removing + * first the audio driver. + * So, add a logic that unloads the audio driver before trying to + * unbind i915 driver, reloading it when binding again. + */ + if (igt_audio_driver_unload(&priv->snd_driver)) + igt_skip("Audio driver %s in use, skipping test\n", + priv->snd_driver); + else if (priv->snd_driver) + igt_info("Unloaded audio driver %s\n", priv->snd_driver); } local_debug("%sunbinding the driver from the device\n", prefix); @@ -198,19 +200,20 @@ static void device_unplug(struct hotunplug *priv, const char *prefix, { igt_require(priv->fd.sysfs_dev == -1); - /* - * FIXME: on some devices, the audio driver (snd_hda_intel) - * binds into the i915 driver. On such hardware, kernel warnings - * and errors may happen if i915 is unbind/removed before removing - * first the audio driver. - * So, add a logic that unloads the audio driver before trying to - * unbind i915 driver, reloading it when binding again. - */ - if (igt_audio_driver_unload(&priv->snd_driver)) { - igt_skip("Audio driver %s in use, skipping test\n", - priv->snd_driver); - } else if (priv->snd_driver) { - igt_info("Unloaded audio driver %s\n", priv->snd_driver); + if (priv->chipset == DRIVER_INTEL) { + /* + * FIXME: on some devices, the audio driver (snd_hda_intel) + * binds into the i915 driver. On such hardware, kernel warnings + * and errors may happen if i915 is unbind/removed before removing + * first the audio driver. + * So, add a logic that unloads the audio driver before trying to + * unbind i915 driver, reloading it when binding again. + */ + if (igt_audio_driver_unload(&priv->snd_driver)) + igt_skip("Audio driver %s in use, skipping test\n", + priv->snd_driver); + else if (priv->snd_driver) + igt_info("Unloaded audio driver %s\n", priv->snd_driver); } priv->fd.sysfs_dev = openat(priv->fd.sysfs_bus, priv->dev_bus_addr, @@ -625,6 +628,7 @@ igt_main .need_healthcheck = true, .has_intel_perf = false, .snd_driver = NULL, + .chipset = DRIVER_ANY, }; igt_fixture { @@ -634,6 +638,8 @@ igt_main igt_skip_on_f(fd_drm < 0, "No known DRM device found\n"); if (is_i915_device(fd_drm)) { + priv.chipset = DRIVER_INTEL; + gem_quiescent_gpu(fd_drm); igt_require_gem(fd_drm); From patchwork Tue Sep 13 12:04:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 12974709 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 50965C6FA82 for ; Tue, 13 Sep 2022 12:05:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 12CDA10E6C5; Tue, 13 Sep 2022 12:05:16 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id EA42610E6BA; Tue, 13 Sep 2022 12:05:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663070710; x=1694606710; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+G3cKIXSKaajf1yOVXeKsE75470mn+BRZnCsXYPqABk=; b=H1oZ0K1IaIIN0aoHYajM0L885puWsCkH2oiyznvNI4L0e/eFeBbsLoHV WEm+4ISynXQKWb7OT+h4Dz5OXubU0Jn3yYeEwU4c5/za1/BPgMQPxgnda ftI5Ta2xxe6ySxufGo1Vm//tcmB3n6QFHW50aRhlu91QFSTqDQw994Uw4 61uOFxnXcWe9L7SpbxreLAlsKPQ0ndkYC+0DSYRadweSIw7PnWbuaPtzK RBSpm5b5gLKb8TPMmRC1a0rQ0727XtXmTG5UMgeiD/4Gz6cUxrMy1xDf3 M9ww+LP1VbYzlZ3VTmTfmC7W8UgTCjpdvw5I8mBuFvUBJiUubJJnIU3Mf g==; X-IronPort-AV: E=McAfee;i="6500,9779,10468"; a="281136836" X-IronPort-AV: E=Sophos;i="5.93,312,1654585200"; d="scan'208";a="281136836" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2022 05:05:10 -0700 X-IronPort-AV: E=Sophos;i="5.93,312,1654585200"; d="scan'208";a="678538763" Received: from jkrzyszt-mobl1.ger.corp.intel.com (HELO jkrzyszt-mobl1.lan) ([10.213.10.213]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2022 05:05:09 -0700 From: Janusz Krzysztofik To: igt-dev@lists.freedesktop.org Date: Tue, 13 Sep 2022 14:04:41 +0200 Message-Id: <20220913120441.146757-5-janusz.krzysztofik@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220913120441.146757-1-janusz.krzysztofik@linux.intel.com> References: <20220913120441.146757-1-janusz.krzysztofik@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t 4/4] tests/core_hotunplug: Select health checks for initially detected chipset X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, Mauro Carvalho Chehab Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" As soon as we first time open a drm device to be exercised, we identify its chipset, store that information, and perform some basic device specific checks. We also store a filter that matches the device bus address to make sure we will exercise still one and the same device after each driver unbind-rebind / device unplug-rediscover operation. However, each time before we select device specific health checks, whether before or after a driver unbind-rebind / device unplug-rediscover operation, we identify the device chipset again. Besides being more expensive, that approach could also result in using different set of health checks should device filters not work as expected. Always use the stored chipset type instead of identifying it now and again. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- tests/core_hotunplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index 29cb26ab12..7c7ed09e63 100644 --- a/tests/core_hotunplug.c +++ b/tests/core_hotunplug.c @@ -400,7 +400,7 @@ static void node_healthcheck(struct hotunplug *priv, unsigned flags) if (closed) /* store fd for cleanup if not dirty */ priv->fd.drm_hc = fd_drm; - if (is_i915_device(fd_drm)) { + if (priv->chipset == DRIVER_INTEL) { /* don't report library failed asserts as healthcheck failure */ priv->failure = "Unrecoverable test failure"; if (local_i915_healthcheck(fd_drm, "") &&