Skip to content

Commit 777476d

Browse files
umgwanakikbutiSebastian Andrzej Siewior
authored and
Sebastian Andrzej Siewior
committed
drm/i915: Don't disable interrupts on PREEMPT_RT during atomic updates
Commit 8d7849d ("drm/i915: Make sprite updates atomic") started disabling interrupts across atomic updates. This breaks on PREEMPT_RT because within this section the code attempt to acquire spinlock_t locks which are sleeping locks on PREEMPT_RT. According to the comment the interrupts are disabled to avoid random delays and not required for protection or synchronisation. Don't disable interrupts on PREEMPT_RT during atomic updates. [bigeasy: drop local locks, commit message] Signed-off-by: Mike Galbraith <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
1 parent d70a1c4 commit 777476d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

drivers/gpu/drm/i915/display/intel_sprite.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
118118
"PSR idle timed out 0x%x, atomic update may fail\n",
119119
psr_status);
120120

121-
local_irq_disable();
121+
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
122+
local_irq_disable();
122123

123124
crtc->debug.min_vbl = min;
124125
crtc->debug.max_vbl = max;
@@ -143,11 +144,13 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
143144
break;
144145
}
145146

146-
local_irq_enable();
147+
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
148+
local_irq_enable();
147149

148150
timeout = schedule_timeout(timeout);
149151

150-
local_irq_disable();
152+
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
153+
local_irq_disable();
151154
}
152155

153156
finish_wait(wq, &wait);
@@ -180,7 +183,8 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
180183
return;
181184

182185
irq_disable:
183-
local_irq_disable();
186+
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
187+
local_irq_disable();
184188
}
185189

186190
/**
@@ -218,7 +222,8 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state)
218222
new_crtc_state->uapi.event = NULL;
219223
}
220224

221-
local_irq_enable();
225+
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
226+
local_irq_enable();
222227

223228
if (intel_vgpu_active(dev_priv))
224229
return;

0 commit comments

Comments
 (0)