[Bug 193269] panic: kdb_switch: did not reenter debugger (from sysctl debug.kdb.enter=1 w/ i915kms)

2014-09-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193269

--- Comment #4 from commit-h...@freebsd.org ---
A commit references this bug:

Author: dumbbell
Date: Thu Sep 18 14:38:21 UTC 2014
New revision: 271769
URL: http://svnweb.freebsd.org/changeset/base/271769

Log:
  vt(4): Merge several bug fixes and improvements

  SVN revisions in this MFC:
269779 270705 270706 271180 271250 271253 271682 271684

  Detailed commit list:

  r269779:
fbd: Fix a bug where vt_fb_attach() success would be considered a failure

vt_fb_attach() currently always returns 0, but it could return a code
defined in errno.h. However, it doesn't return a CN_* code. So checking
its return value against CN_DEAD (which is 0) is incorrect, and in this
case, a success becomes a failure.

The consequence was unimportant, because the caller (drm_fb_helper.c)
would only log an error message in this case. The console would still
work.

Approved by:nwhitehorn

  r270705:
vt(4): Add cngrab() and cnungrab() callbacks

They are used when a panic occurs or when entering a DDB session for
instance.

cngrab() forces a vt-switch to the console window, no matter if the
original window is another terminal or an X session. However, cnungrab()
doesn't vt-switch back to the original window currently.

  r270706:
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@

  r271180:
vt_vga: vd_setpixel_t and vd_drawrect_t are noop in text mode

  r271250:
vt(4): Change the terminal and buffer sizes, even without a font

This fixes a bug where scroll lock would not work for tty #0 when using
vt_vga's textmode. The reason was that this window is created with a
static 256x100 buffer, larger than the real size of 80x25.

Now, in vt_change_font() and vt_compute_drawable_area(), we still
perform operations even of the window has no font loaded (this is the
case in textmode here vw->vw_font == NULL). One of these operation
resizes the buffer accordingly.

In vt_compute_drawable_area(), we take the terminal size as is (ie.
80x25) for the drawable area.

The font argument to vt_set_border() is removed (it was never used) and
the code now uses the computed drawable area instead of re-doing its own
calculation.

Reported by:Harald Schmalzbauer 
Tested by:Harald Schmalzbauer 

  r271253:
pause_sbt(): Take the cold path (ie. use DELAY()) if KDB is active

This fixes a panic in the i915 driver when one uses debug.kdb.enter=1
under vt(4).

PR:193269
Reported by:emaste@
Submitted by:avg@

  r271682:
vt(4): Fix a LOR which occurs during a call to vt_upgrade()

Reported by:kib@
Review:https://reviews.freebsd.org/D785
Reviewed by:ray@
Approved by:ray@

  r271684:
vt(4): Use vt_fb_drawrect() and vt_fb_setpixel() in all vt_fb-derivative

Review:https://reviews.freebsd.org/D789
Reviewed by:nwhitehorn
Approved by:nwhitehorn

  Approved by:re (gjb)

Changes:
_U  stable/10/
  stable/10/sys/dev/drm2/drm_fb_helper.c
  stable/10/sys/dev/fb/fbd.c
  stable/10/sys/dev/vt/hw/efifb/efifb.c
  stable/10/sys/dev/vt/hw/fb/vt_early_fb.c
  stable/10/sys/dev/vt/hw/fb/vt_fb.c
  stable/10/sys/dev/vt/hw/fb/vt_fb.h
  stable/10/sys/dev/vt/hw/vga/vt_vga.c
  stable/10/sys/dev/vt/vt.h
  stable/10/sys/dev/vt/vt_core.c
  stable/10/sys/kern/kern_synch.c
  stable/10/sys/kern/subr_terminal.c
  stable/10/sys/powerpc/ps3/ps3_syscons.c
  stable/10/sys/sys/terminal.h

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 193269] panic: kdb_switch: did not reenter debugger (from sysctl debug.kdb.enter=1 w/ i915kms)

2014-09-09 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193269

Jean-Sébastien Pédron  changed:

   What|Removed |Added

 Status|Needs Triage|Issue Resolved
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

[Bug 193269] panic: kdb_switch: did not reenter debugger (from sysctl debug.kdb.enter=1 w/ i915kms)

2014-09-08 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193269

--- Comment #3 from commit-h...@freebsd.org ---
A commit references this bug:

Author: dumbbell
Date: Mon Sep  8 08:44:50 UTC 2014
New revision: 271253
URL: http://svnweb.freebsd.org/changeset/base/271253

Log:
  pause_sbt(): Take the cold path (ie. use DELAY()) if KDB is active

  This fixes a panic in the i915 driver when one uses debug.kdb.enter=1
  under vt(4).

  PR:193269
  Reported by:emaste@
  Submitted by:avg@
  MFC after:3 days

Changes:
  head/sys/kern/kern_synch.c

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


[Bug 193269] panic: kdb_switch: did not reenter debugger (from sysctl debug.kdb.enter=1 w/ i915kms)

2014-09-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193269

Jean-Sébastien Pédron  changed:

   What|Removed |Added

 CC||dumbb...@freebsd.org

--- Comment #2 from Jean-Sébastien Pédron  ---
Created attachment 146807
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=146807&action=edit
USe DELAY() when DDB is active

Andriy, you were right. Using DELAY() instead of pause() when kdb_active is
true fixes the panic for me. I attached the patch I used.

Could you please elaborate on the kdb_trap requirements? What should we do in
DRM to fix this?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

[Bug 193269] panic: kdb_switch: did not reenter debugger (from sysctl debug.kdb.enter=1 w/ i915kms)

2014-09-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193269

Andriy Gapon  changed:

   What|Removed |Added

 CC||a...@freebsd.org

--- Comment #1 from Andriy Gapon  ---
kdb_trap context places certain requirements on code that can be executed.
Apparently drm code (used via vt) is not aware of those requirements.
The easiest solution is probably to amend pause_sbt() to take the 'cold' code
path for kdb_active case as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"