summaryrefslogtreecommitdiff
path: root/drm/nouveau/nouveau_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'drm/nouveau/nouveau_display.c')
-rw-r--r--drm/nouveau/nouveau_display.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drm/nouveau/nouveau_display.c b/drm/nouveau/nouveau_display.c
index 37839d6af..bd37ae127 100644
--- a/drm/nouveau/nouveau_display.c
+++ b/drm/nouveau/nouveau_display.c
@@ -430,14 +430,14 @@ nouveau_display_fini(struct drm_device *dev, bool suspend)
struct nouveau_display *disp = nouveau_display(dev);
struct nouveau_drm *drm = nouveau_drm(dev);
struct drm_connector *connector;
- int head;
+ struct drm_crtc *crtc;
if (!suspend)
drm_crtc_force_disable_all(dev);
/* Make sure that drm and hw vblank irqs get properly disabled. */
- for (head = 0; head < dev->mode_config.num_crtc; head++)
- drm_vblank_off(dev, head);
+ drm_for_each_crtc(crtc, dev)
+ drm_crtc_vblank_off(crtc);
/* disable flip completion events */
nvif_notify_put(&drm->flip);
@@ -782,7 +782,7 @@ nouveau_display_resume(struct drm_device *dev, bool runtime)
struct nouveau_display *disp = nouveau_display(dev);
struct nouveau_drm *drm = nouveau_drm(dev);
struct drm_crtc *crtc;
- int ret, head;
+ int ret;
if (dev->mode_config.funcs->atomic_commit) {
nouveau_display_init(dev);
@@ -836,10 +836,6 @@ nouveau_display_resume(struct drm_device *dev, bool runtime)
drm_helper_resume_force_mode(dev);
- /* Make sure that drm and hw vblank irqs get resumed if needed. */
- for (head = 0; head < dev->mode_config.num_crtc; head++)
- drm_vblank_on(dev, head);
-
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);