Skip to content

Commit d70a1c4

Browse files
umgwanakikbutiSebastian Andrzej Siewior
authored and
Sebastian Andrzej Siewior
committed
drm,radeon,i915: Use preempt_disable/enable_rt() where recommended
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]>
1 parent 271bdf8 commit d70a1c4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/gpu/drm/i915/i915_irq.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,7 @@ static bool i915_get_crtc_scanoutpos(struct drm_crtc *_crtc,
847847
spin_lock_irqsave(&dev_priv->uncore.lock, irqflags);
848848

849849
/* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */
850+
preempt_disable_rt();
850851

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

900901
/* preempt_enable_rt() should go right here in PREEMPT_RT patchset. */
902+
preempt_enable_rt();
901903

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

drivers/gpu/drm/radeon/radeon_display.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,6 +1822,7 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
18221822
struct radeon_device *rdev = dev->dev_private;
18231823

18241824
/* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */
1825+
preempt_disable_rt();
18251826

18261827
/* Get optional system timestamp before query. */
18271828
if (stime)
@@ -1914,6 +1915,7 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
19141915
*etime = ktime_get();
19151916

19161917
/* preempt_enable_rt() should go right here in PREEMPT_RT patchset. */
1918+
preempt_enable_rt();
19171919

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

0 commit comments

Comments
 (0)