drm/i915/selftests: Unwind hugepages to drop wakeref on error
authorChris Wilson <chris.p.wilson@linux.intel.com>
Tue, 17 Jan 2023 12:32:34 +0000 (13:32 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 18 Jan 2023 15:36:21 +0000 (10:36 -0500)
commit93eea624526fc7d070cdae463408665824075f54
tree2e6d4e89eb7a444a2acf6cf23c6bb94e1961a4f4
parent67b0b4ed259e425b7eed09da75b42c80682ca003
drm/i915/selftests: Unwind hugepages to drop wakeref on error

Make sure that upon error after we have acquired the wakeref we do
release it again.

v2: add another missing "goto out_wf"(Andi).

Fixes: 027c38b4121e ("drm/i915/selftests: Grab the runtime pm in shrink_thp")
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230117123234.26487-1-nirmoy.das@intel.com
(cherry picked from commit 14ec40a88210151296fff3e981c1a7196ad9bf55)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/gem/selftests/huge_pages.c