From: sashiko-bot@kernel.org
To: "Jani Nikula" <jani.nikula@intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 6/7] drm/i915: only timeout on fence waits for display reset
Date: Thu, 27 Aug 2026 12:49:20 +0000 [thread overview]
Message-ID: <20260827124921.73CC91F00ADB@smtp.kernel.org> (raw)
In-Reply-To: <bae61991e23be3bd8b16b7cab7d623f53c10a984.1787833879.git.jani.nikula@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Calling a sleeping function (dma_fence_wait_timeout) from an atomic context path (intel_atomic_commit_tail).
--
commit 70671f62d3480e316b53a7ec34d9d047347fa4af
Author: Jani Nikula <jani.nikula@intel.com>
drm/i915: only timeout on fence waits for display reset
This commit restricts the timeout on fence waits to older platforms where
a GPU reset clobbers the display, or when running forced display reset
tests. For other platforms, it switches the timeout to MAX_SCHEDULE_TIMEOUT.
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 64fa582a64102..42222b930943d 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
[ ... ]
> @@ -7228,15 +7229,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);
[Severity: High]
This isn't a bug introduced by this patch, but does this result in calling a
sleeping function from an atomic context?
The DRM subsystem guidelines explicitly define intel_atomic_commit_tail() and
its variants as atomic context paths where sleeping is forbidden. This code
is reached during an atomic display commit via:
intel_atomic_commit_tail()
intel_atomic_commit_fence_wait()
dma_fence_wait_timeout() -> might_sleep()
While this patch only modifies the timeout value (which doesn't introduce the
bug), the underlying call to a sleeping function from a forbidden atomic
context remains. Can this cause kernel warnings or potential deadlocks during
userspace modeset or pageflip requests?
> if (!ret)
> ret = -ETIMEDOUT;
> if (ret < 0) {
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1787833879.git.jani.nikula@intel.com?part=6
next prev parent reply other threads:[~2026-08-27 12:49 UTC|newest]
Thread overview: 14+ 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 [this message]
2026-08-29 8:51 ` Maarten Lankhorst
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=20260827124921.73CC91F00ADB@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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