aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_irq.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 75647e7f012b..10574a0c3a55 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -185,8 +185,15 @@ static void vblank_disable_and_save(struct drm_device *dev, int crtc)
185 return; 185 return;
186 } 186 }
187 187
188 dev->driver->disable_vblank(dev, crtc); 188 /*
189 vblank->enabled = false; 189 * Only disable vblank interrupts if they're enabled. This avoids
190 * calling the ->disable_vblank() operation in atomic context with the
191 * hardware potentially runtime suspended.
192 */
193 if (vblank->enabled) {
194 dev->driver->disable_vblank(dev, crtc);
195 vblank->enabled = false;
196 }
190 197
191 /* No further vblank irq's will be processed after 198 /* No further vblank irq's will be processed after
192 * this point. Get current hardware vblank count and 199 * this point. Get current hardware vblank count and