From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Dave Airlie <airlied@gmail.com>,
James Simmons <jsimmons@infradead.org>
Subject: [PATCH] vt: try harder to print output when panicing
Date: Fri, 9 Apr 2010 15:12:27 -0700 [thread overview]
Message-ID: <20100409151227.43fa7d43@virtuousgeek.org> (raw)
In-Reply-To: <20100409151050.74ef6dcd@virtuousgeek.org>
At panic time (i.e. when oops_in_progress is set) we should try a bit
harder to update the screen and make sure output gets to the VT, since
some drivers are capable of flipping back to it.
So make sure we try to unblank and update the display if called from a
panic context.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
drivers/char/vt.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index bd1d116..29ec1c9 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -698,7 +698,10 @@ void redraw_screen(struct vc_data *vc, int is_switch)
update_attr(vc);
clear_buffer_attributes(vc);
}
- if (update && vc->vc_mode != KD_GRAPHICS)
+
+ /* Forcibly update if we're panicing */
+ if ((update && vc->vc_mode != KD_GRAPHICS) ||
+ oops_in_progress)
do_update_region(vc, vc->vc_origin, vc->vc_screenbuf_size / 2);
}
set_cursor(vc);
@@ -2498,7 +2501,7 @@ static void vt_console_print(struct console *co, const char *b, unsigned count)
goto quit;
}
- if (vc->vc_mode != KD_TEXT)
+ if (vc->vc_mode != KD_TEXT && !oops_in_progress)
goto quit;
/* undraw cursor first */
@@ -3703,7 +3706,8 @@ void do_unblank_screen(int leaving_gfx)
return;
}
vc = vc_cons[fg_console].d;
- if (vc->vc_mode != KD_TEXT)
+ /* Try to unblank in oops case too */
+ if (vc->vc_mode != KD_TEXT && !oops_in_progress)
return; /* but leave console_blanked != 0 */
if (blankinterval) {
@@ -3712,7 +3716,7 @@ void do_unblank_screen(int leaving_gfx)
}
console_blanked = 0;
- if (vc->vc_sw->con_blank(vc, 0, leaving_gfx))
+ if (vc->vc_sw->con_blank(vc, 0, leaving_gfx) || oops_in_progress)
/* Low-level driver cannot restore -> do it ourselves */
update_screen(vc);
if (console_blank_hook)
--
1.6.6.1
next prev parent reply other threads:[~2010-04-09 22:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-09 22:10 [RFC] Try a bit harder to get output on the screen at panic time Jesse Barnes
2010-04-09 22:11 ` [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode Jesse Barnes
2010-04-12 0:05 ` Dave Airlie
2010-04-12 15:46 ` Jesse Barnes
2010-04-12 16:05 ` Jesse Barnes
2010-04-09 22:12 ` Jesse Barnes [this message]
2010-04-09 22:12 ` [PATCH] fbcon: assume console is active if panicing Jesse Barnes
2010-04-19 22:05 ` [RFC] Try a bit harder to get output on the screen at panic time Jesse Barnes
2010-05-20 0:34 ` Jesse Barnes
2010-05-20 1:13 ` Maxim Levitsky
2010-05-20 1:27 ` Maxim Levitsky
2010-05-20 16:28 ` Jesse Barnes
2010-05-20 21:14 ` Maxim Levitsky
2010-05-21 21:57 ` Maxim Levitsky
2010-05-21 22:02 ` Jesse Barnes
2010-05-21 22:26 ` Maxim Levitsky
2010-05-30 14:48 ` Maxim Levitsky
2010-06-06 16:36 ` James Simmons
2010-06-08 23:20 ` Jesse Barnes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100409151227.43fa7d43@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsimmons@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox