diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2016-11-04 17:20:35 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-11-07 14:04:45 +1000 |
commit | 3b4c0abb1bb72304c78d5919d20c4814424fff79 (patch) | |
tree | fd6da3addf8b0f1e99a66e10fea57562cb985e41 /drivers/gpu/drm/nouveau/nouveau_display.c | |
parent | d000edd36012e2bb921aa005e65ef990d81754da (diff) | |
download | linux-next-3b4c0abb1bb72304c78d5919d20c4814424fff79.tar.gz |
drm/nouveau/kms: move drm_crtc_force_disable_all() earlier
nouveau_display_fini() is responsible for quiescing the hardware, so
this is where such actions belong.
More than that, nouveau_display_fini() switches off the receiving of
sink irqs, which MST will require while shutting down an active head.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_display.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_display.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 2b9e48679662..081af3a4a5ca 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -382,13 +382,16 @@ nouveau_display_init(struct drm_device *dev) } void -nouveau_display_fini(struct drm_device *dev) +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; + 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); @@ -553,7 +556,6 @@ nouveau_display_destroy(struct drm_device *dev) nouveau_display_vblank_fini(dev); drm_kms_helper_poll_fini(dev); - drm_crtc_force_disable_all(dev); drm_mode_config_cleanup(dev); if (disp->dtor) @@ -570,7 +572,7 @@ nouveau_display_suspend(struct drm_device *dev, bool runtime) { struct drm_crtc *crtc; - nouveau_display_fini(dev); + nouveau_display_fini(dev, true); list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { struct nouveau_framebuffer *nouveau_fb; |