From: sashiko-bot@kernel.org
To: "Maarten Lankhorst" <dev@lankhorst.se>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 08/10] drm/i915: Use preempt_disable/enable_rt() where recommended
Date: Thu, 02 Jul 2026 07:36:30 +0000 [thread overview]
Message-ID: <20260702073630.E09DB1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260702072154.171324-9-dev@lankhorst.se>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The patch inadvertently removes `local_irq_save()` protection from the Xe driver's vblank timestamping critical section, allowing hard IRQs to interrupt timing-critical register reads.
- [Low] The sparse context annotations `__acquires(i915->uncore.lock)` and `__releases(i915->uncore.lock)` reference an undeclared identifier `i915`.
--
(Note: The format of this report is altered to provide a free-form summary
without directly quoting the patch code, due to automated recitation
restrictions.)
commit 8fb6242d95640a7bbab92fc65f4627e01aae6b0b
Author: Mike Galbraith <umgwanakikbuti@gmail.com>
drm/i915: Use preempt_disable/enable_rt() where recommended
This patch changes preemption disabling in the intel vblank timestamping
critical section, moving spin_lock_irqsave() into helper functions and
explicitly disabling preemption for preempt-rt configurations.
[Severity: Low]
Will this cause a build failure when running the sparse static analyzer?
The sparse annotations __acquires(i915->uncore.lock) and
__releases(i915->uncore.lock) reference the i915 identifier in
intel_vblank_section_enter_irqf() and intel_vblank_section_exit_irqf().
However, the function parameter is named display, and i915 is not locally
declared. Should this reference the uncore lock through the display parameter
instead?
[Severity: Medium]
Could this inadvertently remove IRQ protection for the Xe driver during timing
critical register reads?
Previously, i915_get_crtc_scanoutpos() explicitly called local_irq_save()
before calling the intel_vblank_section_enter() stub. With this patch, the
IRQ save is moved inside intel_vblank_section_enter_irqf().
However, the #else block implementation of intel_vblank_section_enter_irqf()
merely sets *flags = 0. This means builds where that #else block is active
(like the Xe driver) will no longer disable interrupts during this critical
section.
Might this allow hard IRQs to interrupt the sequence, creating an
artificially large time delta between stime and etime, and causing the DRM
core's max_error check to spuriously fail?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260702072154.171324-1-dev@lankhorst.se?part=8
next prev parent reply other threads:[~2026-07-02 7:36 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 7:21 [PATCH 00/10] drm/intel/display: Changes required to make vblank evasion PREEMPT_RT safe Maarten Lankhorst
2026-07-02 7:21 ` [PATCH 01/10] drm/vblank_work: Add methods to schedule vblank_work in 2 stages Maarten Lankhorst
2026-07-02 7:32 ` sashiko-bot
2026-07-02 7:21 ` [PATCH 02/10] drm/vblank: Add a 2-stage version of drm_crtc_arm_vblank_event Maarten Lankhorst
2026-07-02 7:35 ` sashiko-bot
2026-07-02 7:21 ` [PATCH 03/10] drm/intel/display: Make intel_crtc_arm_vblank_event static Maarten Lankhorst
2026-07-10 14:20 ` Ville Syrjälä
2026-07-02 7:21 ` [PATCH 04/10] drm/intel/display: Convert vblank event handling to 2-stage arming Maarten Lankhorst
2026-07-02 7:37 ` sashiko-bot
2026-07-02 7:21 ` [PATCH 05/10] drm/i915/display: Move vblank put until after critical section Maarten Lankhorst
2026-07-02 7:34 ` sashiko-bot
2026-07-02 7:21 ` [PATCH 06/10] drm/i915/display: Remove locking from intel_vblank_evade " Maarten Lankhorst
2026-07-02 7:36 ` sashiko-bot
2026-07-02 7:21 ` [PATCH 07/10] drm/i915/display: Handle vlv dsi workaround in scanline_in_safe_range too Maarten Lankhorst
2026-07-02 7:30 ` sashiko-bot
2026-07-02 7:21 ` [PATCH 08/10] drm/i915: Use preempt_disable/enable_rt() where recommended Maarten Lankhorst
2026-07-02 7:36 ` sashiko-bot [this message]
2026-07-02 7:21 ` [PATCH 09/10] drm/i915/display: Make get_vblank_counter use intel_de_read_fw() Maarten Lankhorst
2026-07-02 7:43 ` sashiko-bot
2026-07-10 14:34 ` Ville Syrjälä
2026-07-02 7:21 ` [PATCH 10/10] drm/i915/display: Do not take uncore lock in i915_get_vblank_counter Maarten Lankhorst
2026-07-10 14:19 ` Ville Syrjälä
2026-07-10 14:43 ` [PATCH 00/10] drm/intel/display: Changes required to make vblank evasion PREEMPT_RT safe Ville Syrjälä
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=20260702073630.E09DB1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dev@lankhorst.se \
--cc=dri-devel@lists.freedesktop.org \
--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