drm/nouveau/kms: Avoid a hang entering KDB with VT accel on.
authorChris Ball <cjb@laptop.org>
Sun, 26 Sep 2010 11:47:27 +0000 (06:47 -0500)
committerDave Airlie <airlied@redhat.com>
Wed, 6 Oct 2010 01:50:42 +0000 (11:50 +1000)
Francisco Jerez advises that pre-nv20 cards would hang if we entered
kdb with accel on and IRQs disabled, so we now disable accel before
entering kdb and re-enable it on the way back out.

Reported-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/nouveau/nv04_crtc.c

index fb669dd39c3cf356bfbaf554b7f758643c2b3631..427f90e17b9d45a37ccb50f98c8c3b373620178f 100644 (file)
@@ -33,6 +33,7 @@
 #include "nouveau_fb.h"
 #include "nouveau_hw.h"
 #include "nvreg.h"
+#include "nouveau_fbcon.h"
 
 static int
 nv04_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
@@ -860,6 +861,14 @@ nv04_crtc_mode_set_base_atomic(struct drm_crtc *crtc,
                               struct drm_framebuffer *fb,
                               int x, int y, int enter)
 {
+       struct drm_nouveau_private *dev_priv = crtc->dev->dev_private;
+       struct drm_device *dev = dev_priv->dev;
+
+       if (enter)
+               nouveau_fbcon_save_disable_accel(dev);
+       else
+               nouveau_fbcon_restore_accel(dev);
+
        return nv04_crtc_do_mode_set_base(crtc, fb, x, y, true);
 }