Skip to content

Commit

Permalink
drm,radeon,i915: Use preempt_disable/enable_rt() where recommended
Browse files Browse the repository at this point in the history
DRM folks identified the spots, so use them.

Signed-off-by: Mike Galbraith <[email protected]>
Cc: Sebastian Andrzej Siewior <[email protected]>
Cc: linux-rt-users <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
umgwanakikbuti authored and jserv committed Nov 27, 2024
1 parent 2b29a63 commit 1c69e46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ static bool i915_get_crtc_scanoutpos(struct drm_crtc *_crtc,
spin_lock_irqsave(&dev_priv->uncore.lock, irqflags);

/* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */
preempt_disable_rt();

/* Get optional system timestamp before query. */
if (stime)
Expand Down Expand Up @@ -898,6 +899,7 @@ static bool i915_get_crtc_scanoutpos(struct drm_crtc *_crtc,
*etime = ktime_get();

/* preempt_enable_rt() should go right here in PREEMPT_RT patchset. */
preempt_enable_rt();

spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags);

Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/radeon/radeon_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,7 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
struct radeon_device *rdev = dev->dev_private;

/* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */
preempt_disable_rt();

/* Get optional system timestamp before query. */
if (stime)
Expand Down Expand Up @@ -1915,6 +1916,7 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
*etime = ktime_get();

/* preempt_enable_rt() should go right here in PREEMPT_RT patchset. */
preempt_enable_rt();

/* Decode into vertical and horizontal scanout position. */
*vpos = position & 0x1fff;
Expand Down

0 comments on commit 1c69e46

Please sign in to comment.