From: Chris Wilson Date: Mon, 9 Oct 2017 11:03:00 +0000 (+0100) Subject: drm/i915/selftests: Hold the rpm wakeref for the reset tests X-Git-Tag: v5.15~6763^2~28^2~2603 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff97d3ae6951101a85e5153cb128292d7119d15c;p=platform%2Fkernel%2Flinux-starfive.git drm/i915/selftests: Hold the rpm wakeref for the reset tests The lowlevel reset functions expect the caller to be holding the rpm wakeref for the device access across the reset. We were not explicitly doing this in the sefltest, so for simplicity acquire the wakeref for the duration of all subtests. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20171009110301.21705-4-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala --- diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c index 7e1bdd8..71ce066 100644 --- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c +++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c @@ -878,9 +878,16 @@ int intel_hangcheck_live_selftests(struct drm_i915_private *i915) SUBTEST(igt_reset_queue), SUBTEST(igt_handle_error), }; + int err; if (!intel_has_gpu_reset(i915)) return 0; - return i915_subtests(tests, i915); + intel_runtime_pm_get(i915); + + err = i915_subtests(tests, i915); + + intel_runtime_pm_put(i915); + + return err; }