dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] drm/intel/display: Changes required to make vblank evasion PREEMPT_RT safe.
@ 2026-07-02  7:21 Maarten Lankhorst
  2026-07-02  7:21 ` [PATCH 01/10] drm/vblank_work: Add methods to schedule vblank_work in 2 stages Maarten Lankhorst
                   ` (10 more replies)
  0 siblings, 11 replies; 23+ messages in thread
From: Maarten Lankhorst @ 2026-07-02  7:21 UTC (permalink / raw)
  To: intel-xe, intel-gfx; +Cc: dri-devel, Maarten Lankhorst

CONFIG_PREEMPT_RT requires code to be as deterministic as possible,
and codes with interrupts disabled cannot use spinlocks.

In order to handle this correctly, we ensure any locking requirements
are handled before disabling interrupts, and only start locking again
after interrupts are re-enabled and timing sensitive path completed.

This also has the benefit of making the vblank evasion code more
deterministic; without locking there's much less jitter.

Previously, we scheduled vblank work on completion.
This is now handled by scheduling the vblank in advance, only arming
it upon completion without locks.

Maarten Lankhorst (9):
  drm/vblank_work: Add methods to schedule vblank_work in 2 stages
  drm/vblank: Add a 2-stage version of drm_crtc_arm_vblank_event
  drm/intel/display: Make intel_crtc_arm_vblank_event static
  drm/intel/display: Convert vblank event handling to 2-stage arming
  drm/i915/display: Move vblank put until after critical section
  drm/i915/display: Remove locking from intel_vblank_evade critical
    section
  drm/i915/display: Handle vlv dsi workaround in scanline_in_safe_range
    too
  drm/i915/display: Make get_vblank_counter use intel_de_read_fw()
  drm/i915/display: Do not take uncore lock in i915_get_vblank_counter

Mike Galbraith (1):
  drm/i915: Use preempt_disable/enable_rt() where recommended

 drivers/gpu/drm/drm_vblank.c                  |  64 +++++++++-
 drivers/gpu/drm/drm_vblank_work.c             | 110 +++++++++++++----
 drivers/gpu/drm/i915/display/intel_crtc.c     |  86 ++++++-------
 drivers/gpu/drm/i915/display/intel_crtc.h     |   1 -
 drivers/gpu/drm/i915/display/intel_cursor.c   |   8 +-
 drivers/gpu/drm/i915/display/intel_de.h       |   8 ++
 drivers/gpu/drm/i915/display/intel_vblank.c   | 115 ++++++++++--------
 drivers/gpu/drm/i915/display/intel_vblank.h   |   1 +
 drivers/gpu/drm/i915/intel_uncore.h           |  26 ++--
 .../drm/xe/compat-i915-headers/intel_uncore.h |   7 ++
 include/drm/drm_vblank.h                      |  14 ++-
 include/drm/drm_vblank_work.h                 |  12 ++
 12 files changed, 324 insertions(+), 128 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2026-07-10 14:44 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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ä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox