Skip to content

Commit

Permalink
drm/nouveau: restore cursors after restoring mode
Browse files Browse the repository at this point in the history
PDISP doesn't like it when disabled CRTCs are poked.

Fixes external output not coming to life when it has cursor on.
https://bugs.freedesktop.org/show_bug.cgi?id=41608

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Maxim Levitsky authored and Ben Skeggs committed Dec 21, 2011
1 parent 71d91f6 commit a4eaa0a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions drivers/gpu/drm/nouveau/nouveau_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,15 +362,6 @@ nouveau_pci_resume(struct pci_dev *pdev)

engine->display.init(dev);

list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
u32 offset = nv_crtc->cursor.nvbo->bo.offset;

nv_crtc->cursor.set_offset(nv_crtc, offset);
nv_crtc->cursor.set_pos(nv_crtc, nv_crtc->cursor_saved_x,
nv_crtc->cursor_saved_y);
}

/* Force CLUT to get re-loaded during modeset */
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
Expand All @@ -386,6 +377,15 @@ nouveau_pci_resume(struct pci_dev *pdev)

drm_helper_resume_force_mode(dev);

list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
u32 offset = nv_crtc->cursor.nvbo->bo.offset;

nv_crtc->cursor.set_offset(nv_crtc, offset);
nv_crtc->cursor.set_pos(nv_crtc, nv_crtc->cursor_saved_x,
nv_crtc->cursor_saved_y);
}

nouveau_fbcon_restore_accel(dev);
drm_kms_helper_poll_enable(dev);
return 0;
Expand Down

0 comments on commit a4eaa0a

Please sign in to comment.