lkml.org 
[lkml]   [2019]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Is it possible to reset graphics controller on reboot in a framebuffer driver?
On Fri, Mar 08, 2019 at 06:35:36PM +0800, Tom Li wrote:
> On Fri, Mar 08, 2019 at 10:13:58AM +0100, Geert Uytterhoeven wrote:
> > On Thu, Mar 7, 2019 at 10:38 PM Tom Li <tomli@tomli.me> wrote:
> > > Nevertheless, does it mean there's no way to prevent it from happening if the
> > > user issues a emergency reboot? Like an automatic reboot after a kernel panic,
> > > or a SysRq-B reboot.
> >
> > If Linux performs a reboot, it calls the shutdown handlers.
> > I think that includes reboot on panic, or SysRq-B, but I'd have to check to
> > be 100% sure.
>
> Okay, glad to hear that. If it works for SysRq-B or panic reboot, I think
> it would be enough. After all, hard kernel crashes are rare nowadays, and
> most crashes are hard lockups. In case it happens, the user just presses
> the power button to halt.

As I suspected, emergency reboot via SysRq-B is a hard reboot and none of the
reboot handler will be called. I've put a for (;;) {} loop in .shutdown(), the
kernel would hang during a normal reboot, but a SysRq-B reboot will reset the
machine immediately.

Fortunately, I've found a way to stop trigger the bug in the driver, so no
shutdown handler is needed anymore.

Cheers,
Tom Li

\
 
 \ /
  Last update: 2019-03-12 10:20    [W:0.087 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site