From a828e0888aca5769bcd2cc91d3a6f9b8585b3862 Mon Sep 17 00:00:00 2001 From: claudio Date: Fri, 28 Jul 2023 09:41:43 +0000 Subject: [PATCH] Remove local hack in intel_atomic_commit_fence_wait(). This functions registers the proc on two wait_queues so either one can wakeup the proc. Until lately this was not possible because a mutex was held when setting up the wait state. Since the rework of the sleep API and the cleanup of the linux wait.h implementation this is no longer the case. Tested by various people with different inteldrm versions. OK kettenis@ jsg@ --- sys/dev/pci/drm/i915/display/intel_display.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/sys/dev/pci/drm/i915/display/intel_display.c b/sys/dev/pci/drm/i915/display/intel_display.c index 1acfc87e692..887a9a5df97 100644 --- a/sys/dev/pci/drm/i915/display/intel_display.c +++ b/sys/dev/pci/drm/i915/display/intel_display.c @@ -7396,7 +7396,6 @@ static void intel_atomic_commit_fence_wait(struct intel_atomic_state *intel_stat struct wait_queue_entry wait_fence, wait_reset; struct drm_i915_private *dev_priv = to_i915(intel_state->base.dev); -#ifdef notyet init_wait_entry(&wait_fence, 0); init_wait_entry(&wait_reset, 0); for (;;) { @@ -7417,22 +7416,6 @@ static void intel_atomic_commit_fence_wait(struct intel_atomic_state *intel_stat finish_wait(bit_waitqueue(&to_gt(dev_priv)->reset.flags, I915_RESET_MODESET), &wait_reset); -#else - /* XXX above recurses sch_mtx */ - init_wait_entry(&wait_fence, 0); - for (;;) { - prepare_to_wait(&intel_state->commit_ready.wait, - &wait_fence, TASK_UNINTERRUPTIBLE); - - - if (i915_sw_fence_done(&intel_state->commit_ready) || - test_bit(I915_RESET_MODESET, &to_gt(dev_priv)->reset.flags)) - break; - - schedule(); - } - finish_wait(&intel_state->commit_ready.wait, &wait_fence); -#endif } static void intel_cleanup_dsbs(struct intel_atomic_state *state) -- 2.20.1