hc
2023-11-06 e3e12f52b214121840b44c91de5b3e5af5d3eb84
kernel/drivers/gpu/drm/i915/intel_sprite.c
....@@ -36,6 +36,7 @@
3636 #include <drm/drm_rect.h>
3737 #include <drm/drm_atomic.h>
3838 #include <drm/drm_plane_helper.h>
39
+#include <linux/locallock.h>
3940 #include "intel_drv.h"
4041 #include "intel_frontbuffer.h"
4142 #include <drm/i915_drm.h>
....@@ -59,6 +60,8 @@
5960 #else
6061 #define VBLANK_EVASION_TIME_US 100
6162 #endif
63
+
64
+static DEFINE_LOCAL_IRQ_LOCK(pipe_update_lock);
6265
6366 /**
6467 * intel_pipe_update_start() - start update of a set of display registers
....@@ -107,7 +110,7 @@
107110 if (intel_psr_wait_for_idle(new_crtc_state))
108111 DRM_ERROR("PSR idle timed out, atomic update may fail\n");
109112
110
- local_irq_disable();
113
+ local_lock_irq(pipe_update_lock);
111114
112115 crtc->debug.min_vbl = min;
113116 crtc->debug.max_vbl = max;
....@@ -131,11 +134,11 @@
131134 break;
132135 }
133136
134
- local_irq_enable();
137
+ local_unlock_irq(pipe_update_lock);
135138
136139 timeout = schedule_timeout(timeout);
137140
138
- local_irq_disable();
141
+ local_lock_irq(pipe_update_lock);
139142 }
140143
141144 finish_wait(wq, &wait);
....@@ -168,7 +171,7 @@
168171 return;
169172
170173 irq_disable:
171
- local_irq_disable();
174
+ local_lock_irq(pipe_update_lock);
172175 }
173176
174177 /**
....@@ -204,7 +207,7 @@
204207 new_crtc_state->base.event = NULL;
205208 }
206209
207
- local_irq_enable();
210
+ local_unlock_irq(pipe_update_lock);
208211
209212 if (intel_vgpu_active(dev_priv))
210213 return;