svn commit: r270706 - head/sys/dev/drm2

Jean-Sebastien Pedron dumbbell at FreeBSD.org
Wed Aug 27 10:07:08 UTC 2014


Author: dumbbell
Date: Wed Aug 27 10:07:08 2014
New Revision: 270706
URL: http://svnweb.freebsd.org/changeset/base/270706

Log:
  drm: Don't "taskqueue" vt-switch if under DDB/panic situation
  
  If DDB is active, we can't use a taskqueue thread to switch away from
  the X window, because this thread can't run.
  
  Reviewed by:	ray@
  Approved by:	ray@
  MFC after:	1 week

Modified:
  head/sys/dev/drm2/drm_fb_helper.c

Modified: head/sys/dev/drm2/drm_fb_helper.c
==============================================================================
--- head/sys/dev/drm2/drm_fb_helper.c	Wed Aug 27 10:04:10 2014	(r270705)
+++ head/sys/dev/drm2/drm_fb_helper.c	Wed Aug 27 10:07:08 2014	(r270706)
@@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$");
 #include <dev/drm2/drm_fb_helper.h>
 #include <dev/drm2/drm_crtc_helper.h>
 
+#include <sys/kdb.h>
+
 struct vt_kms_softc {
 	struct drm_fb_helper *fb_helper;
 	struct task	fb_mode_task;
@@ -64,7 +66,11 @@ vt_kms_postswitch(void *arg)
 	struct vt_kms_softc *sc;
 
 	sc = (struct vt_kms_softc *)arg;
-	taskqueue_enqueue_fast(taskqueue_thread, &sc->fb_mode_task);
+
+	if (!kdb_active && panicstr == NULL)
+		taskqueue_enqueue_fast(taskqueue_thread, &sc->fb_mode_task);
+	else
+		drm_fb_helper_restore_fbdev_mode(sc->fb_helper);
 
 	return (0);
 }


More information about the svn-src-head mailing list