Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88a83f3c authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Only reset seqno if actually idle

Before we can reset the seqno, we have to be sure the engines are idle.
In debugfs/i915_drop_caches_set, we do wait_for_idle but allow ourselves
to be interrupted. We should only proceed to reset the seqno then if we
were not interrupted, and so also avoid overwriting the error status.

References: https://bugs.freedesktop.org/show_bug.cgi?id=108133


Fixes: 6b048706 ("drm/i915: Forcibly flush unwanted requests in drop-caches")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181004082119.24970-1-chris@chris-wilson.co.uk
parent 7a4a2a46
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4205,7 +4205,7 @@ i915_drop_caches_set(void *data, u64 val)
						     I915_WAIT_LOCKED,
						     MAX_SCHEDULE_TIMEOUT);

		if (val & DROP_RESET_SEQNO) {
		if (ret == 0 && val & DROP_RESET_SEQNO) {
			intel_runtime_pm_get(i915);
			ret = i915_gem_set_global_seqno(&i915->drm, 1);
			intel_runtime_pm_put(i915);