All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@intel.com>
To: Jani Nikula <jani.nikula@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: maarten.lankhorst@linux.intel.com, ville.syrjala@linux.intel.com
Subject: Re: [PATCH v2 6/7] drm/i915: only timeout on fence waits for display reset
Date: Sat, 29 Aug 2026 10:51:12 +0200	[thread overview]
Message-ID: <3ad607d2-98b4-4f8d-8cf4-ac4e5fb738b8@intel.com> (raw)
In-Reply-To: <bae61991e23be3bd8b16b7cab7d623f53c10a984.1787833879.git.jani.nikula@intel.com>

For whole series:

Acked-by: Maarten Lankhorst <maarten.lankhorst@intel.com>

On 8/27/26 14:34, 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. 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) {


  parent reply	other threads:[~2026-08-29  8:49 UTC|newest]

Thread overview: 17+ 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 [this message]
2026-09-02 11:42   ` Ville Syrjälä
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 14:12 ` ✓ i915.CI.BAT: " Patchwork
2026-08-27 15:02 ` ✓ Xe.CI.FULL: " Patchwork
2026-08-27 16:34 ` ✗ i915.CI.Full: failure " 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=3ad607d2-98b4-4f8d-8cf4-ac4e5fb738b8@intel.com \
    --to=maarten.lankhorst@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=ville.syrjala@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.