.. | .. |
---|
36 | 36 | #include <drm/drm_rect.h> |
---|
37 | 37 | #include <drm/drm_atomic.h> |
---|
38 | 38 | #include <drm/drm_plane_helper.h> |
---|
| 39 | +#include <linux/locallock.h> |
---|
39 | 40 | #include "intel_drv.h" |
---|
40 | 41 | #include "intel_frontbuffer.h" |
---|
41 | 42 | #include <drm/i915_drm.h> |
---|
.. | .. |
---|
59 | 60 | #else |
---|
60 | 61 | #define VBLANK_EVASION_TIME_US 100 |
---|
61 | 62 | #endif |
---|
| 63 | + |
---|
| 64 | +static DEFINE_LOCAL_IRQ_LOCK(pipe_update_lock); |
---|
62 | 65 | |
---|
63 | 66 | /** |
---|
64 | 67 | * intel_pipe_update_start() - start update of a set of display registers |
---|
.. | .. |
---|
107 | 110 | if (intel_psr_wait_for_idle(new_crtc_state)) |
---|
108 | 111 | DRM_ERROR("PSR idle timed out, atomic update may fail\n"); |
---|
109 | 112 | |
---|
110 | | - local_irq_disable(); |
---|
| 113 | + local_lock_irq(pipe_update_lock); |
---|
111 | 114 | |
---|
112 | 115 | crtc->debug.min_vbl = min; |
---|
113 | 116 | crtc->debug.max_vbl = max; |
---|
.. | .. |
---|
131 | 134 | break; |
---|
132 | 135 | } |
---|
133 | 136 | |
---|
134 | | - local_irq_enable(); |
---|
| 137 | + local_unlock_irq(pipe_update_lock); |
---|
135 | 138 | |
---|
136 | 139 | timeout = schedule_timeout(timeout); |
---|
137 | 140 | |
---|
138 | | - local_irq_disable(); |
---|
| 141 | + local_lock_irq(pipe_update_lock); |
---|
139 | 142 | } |
---|
140 | 143 | |
---|
141 | 144 | finish_wait(wq, &wait); |
---|
.. | .. |
---|
168 | 171 | return; |
---|
169 | 172 | |
---|
170 | 173 | irq_disable: |
---|
171 | | - local_irq_disable(); |
---|
| 174 | + local_lock_irq(pipe_update_lock); |
---|
172 | 175 | } |
---|
173 | 176 | |
---|
174 | 177 | /** |
---|
.. | .. |
---|
204 | 207 | new_crtc_state->base.event = NULL; |
---|
205 | 208 | } |
---|
206 | 209 | |
---|
207 | | - local_irq_enable(); |
---|
| 210 | + local_unlock_irq(pipe_update_lock); |
---|
208 | 211 | |
---|
209 | 212 | if (intel_vgpu_active(dev_priv)) |
---|
210 | 213 | return; |
---|