Skip to content

Commit ed8bd92

Browse files
umgwanakikbutijnettlet
authored andcommitted
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 c41cd16 commit ed8bd92

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
@@ -812,6 +812,7 @@ static int i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
812812
spin_lock_irqsave(&dev_priv->uncore.lock, irqflags);
813813

814814
/* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */
815+
preempt_disable_rt();
815816

816817
/* Get optional system timestamp before query. */
817818
if (stime)
@@ -863,6 +864,7 @@ static int i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
863864
*etime = ktime_get();
864865

865866
/* preempt_enable_rt() should go right here in PREEMPT_RT patchset. */
867+
preempt_enable_rt();
866868

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

drivers/gpu/drm/radeon/radeon_display.c

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

18531853
/* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */
1854+
preempt_disable_rt();
18541855

18551856
/* Get optional system timestamp before query. */
18561857
if (stime)
@@ -1943,6 +1944,7 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
19431944
*etime = ktime_get();
19441945

19451946
/* preempt_enable_rt() should go right here in PREEMPT_RT patchset. */
1947+
preempt_enable_rt();
19461948

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

0 commit comments

Comments
 (0)