38
38
#include <drm/drm_plane_helper.h>
39
39
#include <drm/drm_rect.h>
40
40
#include <drm/i915_drm.h>
41
+ #include <linux/locallock.h>
41
42
42
43
#include "i915_drv.h"
43
44
#include "i915_trace.h"
@@ -80,6 +81,8 @@ int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode,
80
81
#define VBLANK_EVASION_TIME_US 100
81
82
#endif
82
83
84
+ static DEFINE_LOCAL_IRQ_LOCK (pipe_update_lock );
85
+
83
86
/**
84
87
* intel_pipe_update_start() - start update of a set of display registers
85
88
* @new_crtc_state: the new crtc state
@@ -129,7 +132,7 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
129
132
DRM_ERROR ("PSR idle timed out 0x%x, atomic update may fail\n" ,
130
133
psr_status );
131
134
132
- local_irq_disable ( );
135
+ local_lock_irq ( pipe_update_lock );
133
136
134
137
crtc -> debug .min_vbl = min ;
135
138
crtc -> debug .max_vbl = max ;
@@ -153,11 +156,11 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
153
156
break ;
154
157
}
155
158
156
- local_irq_enable ( );
159
+ local_unlock_irq ( pipe_update_lock );
157
160
158
161
timeout = schedule_timeout (timeout );
159
162
160
- local_irq_disable ( );
163
+ local_lock_irq ( pipe_update_lock );
161
164
}
162
165
163
166
finish_wait (wq , & wait );
@@ -190,7 +193,7 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
190
193
return ;
191
194
192
195
irq_disable :
193
- local_irq_disable ( );
196
+ local_lock_irq ( pipe_update_lock );
194
197
}
195
198
196
199
/**
@@ -226,7 +229,7 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state)
226
229
new_crtc_state -> base .event = NULL ;
227
230
}
228
231
229
- local_irq_enable ( );
232
+ local_unlock_irq ( pipe_update_lock );
230
233
231
234
if (intel_vgpu_active (dev_priv ))
232
235
return ;
0 commit comments