From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] tests/core_hotunplug: Select health checks for initially detected chipset
Date: Wed, 2 Nov 2022 17:13:26 +0100 [thread overview]
Message-ID: <20221102171326.65e25788@maurocar-mobl2> (raw)
In-Reply-To: <20221012110203.644576-2-janusz.krzysztofik@linux.intel.com>
On Wed, 12 Oct 2022 13:02:02 +0200
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> wrote:
> As soon as we first time open a drm device to be exercised, we identify
> its chipset and perform some basic device specific checks. We also
> install 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 cycle.
>
> However, each time before we select device specific health checks, whether
> before or after a driver unbind-rebind / device unplug-rediscover
> sequence, 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.
>
> Store detected chipset type at test start and always use that information
> instead of identifying the chipset now and again.
>
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
LGTM
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
> tests/core_hotunplug.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
> index c3756889c2..68fd92238c 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 */
> @@ -397,7 +398,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, "") &&
> @@ -625,6 +626,7 @@ igt_main
> .need_healthcheck = true,
> .has_intel_perf = false,
> .snd_driver = NULL,
> + .chipset = DRIVER_ANY,
> };
>
> igt_fixture {
> @@ -634,6 +636,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);
>
next prev parent reply other threads:[~2022-11-02 16:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 11:02 [igt-dev] [PATCH i-g-t 0/2] tests/core_hotunplug: Health check fixes Janusz Krzysztofik
2022-10-12 11:02 ` [igt-dev] [PATCH i-g-t 1/2] tests/core_hotunplug: Select health checks for initially detected chipset Janusz Krzysztofik
2022-11-02 16:13 ` Mauro Carvalho Chehab [this message]
2022-10-12 11:02 ` [igt-dev] [PATCH i-g-t 2/2] tests/core_hotunplug: Always check device health after late close Janusz Krzysztofik
2022-11-02 16:17 ` Mauro Carvalho Chehab
2022-10-12 11:48 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/core_hotunplug: Health check fixes Patchwork
2022-10-12 15:59 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221102171326.65e25788@maurocar-mobl2 \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=janusz.krzysztofik@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox