Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Cline <jcline@redhat.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/device_reset: check for i915 in unbind_reset_rebind()
Date: Tue, 15 Dec 2020 12:46:56 -0500	[thread overview]
Message-ID: <20201215174656.3956-1-jcline@redhat.com> (raw)

Commit 265f1d4a5a14 ("tests/device_reset: Work around for driver unbind
issue with audio") introduced an assertion on is_i915_device() by way of
intel_get_drm_devid(). Since this is a work-around for an i915-specific
issue, guard it with a check on the device type so the test runs on
other devices.

Signed-off-by: Jeremy Cline <jcline@redhat.com>
---
 tests/device_reset.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/device_reset.c b/tests/device_reset.c
index 9cb59ee4..9347a3f4 100644
--- a/tests/device_reset.c
+++ b/tests/device_reset.c
@@ -232,7 +232,7 @@ static void set_device_filter(const char* dev_path)
 
 static void unbind_reset_rebind(struct device_fds *dev)
 {
-	uint32_t devid = intel_get_drm_devid(dev->fds.dev);
+	uint32_t devid;
 	igt_debug("close the device\n");
 	close_if_opened(&dev->fds.dev);
 
@@ -242,9 +242,12 @@ static void unbind_reset_rebind(struct device_fds *dev)
 	 * The below CI friendly user level workaround prevents the warning from
 	 * appearing. Drop this hack as soon as this is fixed in the kernel.
 	 */
-	if (igt_warn_on_f((bool) IS_HASWELL(devid) || IS_BROADWELL(devid),
-	    "Manually enabling audio PM to work around a kernel WARN\n"))
-		igt_pm_enable_audio_runtime_pm();
+	if (is_i915_device(dev->fds.dev)) {
+		devid = intel_get_drm_devid(dev->fds.dev);
+		if (igt_warn_on_f((bool) IS_HASWELL(devid) || IS_BROADWELL(devid),
+		    "Manually enabling audio PM to work around a kernel WARN\n"))
+			igt_pm_enable_audio_runtime_pm();
+	}
 
 	driver_unbind(dev);
 
-- 
2.28.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2020-12-15 17:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 17:46 Jeremy Cline [this message]
2020-12-15 17:55 ` [igt-dev] [PATCH i-g-t] tests/device_reset: check for i915 in unbind_reset_rebind() Chris Wilson
2020-12-15 18:45 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-12-15 19:09 ` [igt-dev] [PATCH i-g-t v2] " Jeremy Cline
2020-12-15 19:22   ` Chris Wilson
2020-12-15 20:20 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/device_reset: check for i915 in unbind_reset_rebind() (rev2) Patchwork
2020-12-15 23:22 ` [igt-dev] ✗ Fi.CI.IGT: failure for tests/device_reset: check for i915 in unbind_reset_rebind() Patchwork
2020-12-16  1:44 ` [igt-dev] ✓ Fi.CI.IGT: success for tests/device_reset: check for i915 in unbind_reset_rebind() (rev2) 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=20201215174656.3956-1-jcline@redhat.com \
    --to=jcline@redhat.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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