From: David Woodhouse <dwmw2@infradead.org>
To: cbe-oss-dev@ozlabs.org
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH] Sync PS3 framebuffer on panic.
Date: Thu, 29 Mar 2007 23:46:27 +0100 [thread overview]
Message-ID: <1175208387.3122.82.camel@pmac.infradead.org> (raw)
There's not a lot of point in printing a nice message about the panic
unless we then ask the hypervisor to update the screen for us. It's a
hack, but in the absence of sensible devel units with a real console
(thanks, Sony!) it's the best we can do.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index ac5df96..1ae9091 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -46,6 +46,8 @@
static void smp_send_stop(void) {}
#endif
+extern void ps3fb_sync(int);
+
int ps3_get_firmware_version(union ps3_firmware_version *v)
{
int result = lv1_get_version_info(&v->raw);
@@ -88,8 +90,20 @@ static void ps3_power_off(void)
static void ps3_panic(char *str)
{
+ static int panicked = 0;
+
DBG("%s:%d %s\n", __func__, __LINE__, str);
+#ifdef CONFIG_FB_PS3
+ /* It's almost certainly the only available console device outside
+ Sony, and we don't _see_ the events leading up to the panic
+ unless we ask the hypervisor to update it. So do so. Once. */
+ if (!panicked) {
+ panicked = 1;
+ ps3fb_sync(0);
+ }
+#endif
+
smp_send_stop();
printk("\n");
printk(" System does not reboot automatically.\n");
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c
index 81e43cd..f90a43e 100644
--- a/drivers/video/ps3fb.c
+++ b/drivers/video/ps3fb.c
@@ -381,7 +381,7 @@ static const struct fb_videomode *ps3fb_default_mode(void)
return &ps3fb_modedb[mode - 1];
}
-static int ps3fb_sync(u32 frame)
+int ps3fb_sync(u32 frame)
{
int i, status;
u32 xres, yres;
--
dwmw2
next reply other threads:[~2007-03-29 22:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-29 22:46 David Woodhouse [this message]
2007-04-06 21:25 ` [Cbe-oss-dev] [PATCH] Sync PS3 framebuffer on panic Geoff Levand
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=1175208387.3122.82.camel@pmac.infradead.org \
--to=dwmw2@infradead.org \
--cc=cbe-oss-dev@ozlabs.org \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).