From: Nirmoy Das <nirmoy.das@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Nirmoy Das <nirmoy.das@intel.com>,
chris.p.wilson@linux.intel.com, matthew.auld@intel.com,
dri-devel@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error
Date: Fri, 13 Jan 2023 12:49:03 +0100 [thread overview]
Message-ID: <20230113114903.7824-1-nirmoy.das@intel.com> (raw)
From: Chris Wilson <chris.p.wilson@linux.intel.com>
Make sure that upon error after we have acquired the wakeref we do
release it again.
Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
index c281b0ec9e05..295d6f2cc4ff 100644
--- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
+++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
@@ -1855,7 +1855,7 @@ static int igt_shrink_thp(void *arg)
I915_SHRINK_ACTIVE);
i915_vma_unpin(vma);
if (err)
- goto out_put;
+ goto out_wf;
/*
* Now that the pages are *unpinned* shrinking should invoke
@@ -1871,7 +1871,7 @@ static int igt_shrink_thp(void *arg)
pr_err("unexpected pages mismatch, should_swap=%s\n",
str_yes_no(should_swap));
err = -EINVAL;
- goto out_put;
+ goto out_wf;
}
if (should_swap == (obj->mm.page_sizes.sg || obj->mm.page_sizes.phys)) {
@@ -1883,7 +1883,7 @@ static int igt_shrink_thp(void *arg)
err = i915_vma_pin(vma, 0, 0, flags);
if (err)
- goto out_put;
+ goto out_wf;
while (n--) {
err = cpu_check(obj, n, 0xdeadbeaf);
--
2.39.0
next reply other threads:[~2023-01-13 11:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 11:49 Nirmoy Das [this message]
2023-01-13 11:51 ` [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error Matthew Auld
2023-01-13 12:02 ` Das, Nirmoy
2023-01-13 12:05 ` Matthew Auld
2023-01-13 12:07 ` Das, Nirmoy
2023-01-16 11:21 ` Andrzej Hajda
-- strict thread matches above, loose matches on Subject: below --
2023-01-13 12:00 Nirmoy Das
2023-01-16 18:49 ` Andi Shyti
2023-01-17 8:57 ` Das, Nirmoy
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=20230113114903.7824-1-nirmoy.das@intel.com \
--to=nirmoy.das@intel.com \
--cc=chris.p.wilson@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@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