From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
maarten.lankhorst@linux.intel.com,
Maarten Lankhorst <maarten.lankhorst@intel.com>
Subject: Re: [PATCH v2 6/7] drm/i915: only timeout on fence waits for display reset
Date: Wed, 2 Sep 2026 14:42:46 +0300 [thread overview]
Message-ID: <apgLtqwv7g1gNiAd@intel.com> (raw)
In-Reply-To: <bae61991e23be3bd8b16b7cab7d623f53c10a984.1787833879.git.jani.nikula@intel.com>
On Thu, Aug 27, 2026 at 03:34:56PM +0300, Jani Nikula wrote:
> As written by Maarten: Not waiting on fences until they're signaled is
> an existing issue in i915, and was added as a workaround for a deadlock
> when GPU reset has to reset display as well on old platforms.
IIRC the timeout wasn't added for that. It's there just as a backup to
make sure we never get completely stuck. We had more proper handling for
this stuff (== terminate/skip the fence wait on GPU reset) but lost that
in the conversion to dma_fence.
Since we Christian NAKed my dma_fence equivalent of the previous
approach and I don't feel like attempting to resurrect my old display
reset rw_lock branch right now, the best we can probably do is
basically revert commit 9db529aac938 ("drm/i915: More surgically
unbreak the modeset vs reset deadlock"). The upside of that would be
that the display reset will become fast again, but the downside is
that the full wedge will also kill innocent requests.
> This
> requires a modeset to disable everything, which may hang since it could
> wait on a fence that may only be signaled after GPU reset completes.
>
> Limit the timeout on fence waits a) to platforms where GPU reset
> clobbers display, and b) when we're running forced display reset tests.
>
> This change only impacts i915, as xe has MAX_SCHEDULE_TIMEOUT in any
> case.
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Suggested-by: Maarten Lankhorst <maarten.lankhorst@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index aa5d41dac8a9..76ec9161aaa3 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -74,6 +74,7 @@
> #include "intel_display_driver.h"
> #include "intel_display_power.h"
> #include "intel_display_regs.h"
> +#include "intel_display_reset.h"
> #include "intel_display_rpm.h"
> #include "intel_display_types.h"
> #include "intel_display_utils.h"
> @@ -7277,15 +7278,20 @@ static void intel_atomic_commit_fence_wait(struct intel_atomic_state *state)
> struct intel_display *display = to_intel_display(state);
> struct drm_plane *plane;
> struct drm_plane_state *new_plane_state;
> - long ret;
> + long timeout, ret;
> int i;
>
> + if (intel_display_reset_needed_after_gpu_reset(display) ||
> + intel_display_reset_test(display))
> + timeout = i915_fence_timeout();
> + else
> + timeout = MAX_SCHEDULE_TIMEOUT;
> +
> for_each_new_plane_in_state(&state->base, plane, new_plane_state, i) {
> if (!new_plane_state->fence)
> continue;
>
> - ret = dma_fence_wait_timeout(new_plane_state->fence, false,
> - i915_fence_timeout());
> + ret = dma_fence_wait_timeout(new_plane_state->fence, false, timeout);
> if (!ret)
> ret = -ETIMEDOUT;
> if (ret < 0) {
> --
> 2.47.3
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-09-02 11:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 12:34 [PATCH v2 0/7] drm/{i915, xe}/display: another stab at i915_fence_timeout() removal Jani Nikula
2026-08-27 12:34 ` [PATCH v2 1/7] drm/i915/reset: move gpu_reset_clobbers_display platform property to display Jani Nikula
2026-08-27 12:34 ` [PATCH v2 2/7] drm/i915/reset: make intel_display_reset_supported() static Jani Nikula
2026-08-27 12:34 ` [PATCH v2 3/7] drm/i915/display: use struct intel_atomic_state *state variable naming Jani Nikula
2026-08-27 12:34 ` [PATCH v2 4/7] drm/i915/display: reduce indent in intel_atomic_commit_fence_wait() Jani Nikula
2026-08-27 12:34 ` [PATCH v2 5/7] drm/i915/display: debug log about fence wait timeouts and other errors Jani Nikula
2026-08-27 12:34 ` [PATCH v2 6/7] drm/i915: only timeout on fence waits for display reset Jani Nikula
2026-08-27 12:49 ` sashiko-bot
2026-08-29 8:51 ` Maarten Lankhorst
2026-09-02 11:42 ` Ville Syrjälä [this message]
2026-08-27 12:34 ` [PATCH v2 7/7] drm/i915/display: use fixed 10 second timeout for fence wait Jani Nikula
2026-08-27 12:41 ` ✗ CI.checkpatch: warning for drm/{i915, xe}/display: another stab at i915_fence_timeout() removal (rev2) Patchwork
2026-08-27 12:42 ` ✓ CI.KUnit: success " Patchwork
2026-08-27 13:42 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-27 15:02 ` ✓ Xe.CI.FULL: " Patchwork
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=apgLtqwv7g1gNiAd@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=maarten.lankhorst@intel.com \
--cc=maarten.lankhorst@linux.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