Ticket #1382 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

"reboot" from Linux just gives black screen on LX

Reported by: cjb Owned by: dilinger
Priority: blocker Milestone: BTest-3
Component: kernel Version:
Keywords: Cc:
Action Needed: Verified: yes
Deployments affected: Blocked By:
Blocking:

Description

We should start by working out what hardware mechanism Linux reboot uses.

Attachments

x (1.0 kB) - added by dilinger 7 years ago.

Change History

Changed 7 years ago by dilinger

02:34 < Mitch_BradleyEGG> I recommend resetting by  writing 1ULL to MSR 
                          0x51400017
02:34 < CP|too> agreed
02:36 < CP|too> There is already a mechanism for doing that
02:36 < CP|too> http://dev.laptop.org/git.do?p=olpc-2.6;a=blob;h=99aab41a05b0f17d12c07110638699a6ec4360da;hb=1c73de730a3979de91c8ebbca3c12ebdb3afbff7;f=arch/i386/kernel/reboot_fixups.c
02:36 < CP|too> And lo and behold - what other processor is already in that 
                file?  Why, its the GX1!
...
02:38 < CP|too> the mechanism exists
02:38 < CP|too> don't copy the code
02:39 < CP|too> add in the 5536 ISA header ID and write to the MSR like Mitch 
                said

Changed 7 years ago by dilinger

Ok, this black screen is the "screen blanking" feature of DCON; that's where it comes from. The backlight is also shut off by the kernel's reboot notifier, so that's why we see the non-backlit screen. The problem is that writing 0x2 (the DCON Sleep Mode bit) to the DCON register *should* disable power to the panel; that doesn't happen. Instead, the 0x2 write is being ignored, and the panel is remaining on.

One can test this from OFW; 'dev screen', ' 2 mode!' (or any other bits from the DCON spec). The panel on b2 will turn off; pre-b3, it remains on.

Changed 7 years ago by dilinger

  • attachment x added

Changed 7 years ago by dilinger

The above patch needs some #ifdefs (and perhaps a !olpc_has_vsa() or machine_is_olpc()?), but it does the reboot dance on pre-b3; should probably be applied once we figure out the DCON thing. Oh, and we should test it on b2.. :)

Changed 7 years ago by JordanCrouse

This is a good general purpose fix - most Geode implementations will reset through ACPI anyway. There might be certain embedded controllers or super IOs that depend on the standard reset sequence through the keyboard controller , but I don't see any harm in keeping this enabled for all Geodes (famous last words).

Changed 7 years ago by jg

  • priority changed from normal to high
  • milestone changed from Untriaged to BTest-3

Changed 7 years ago by dilinger

#1388 describes the panel disable problem; we now return you to your regularly scheduled reboot-doesn't-work problem.

Changed 7 years ago by jg

  • priority changed from high to blocker

Changed 7 years ago by dilinger

Bizarre. After adding the following to the dcon's reboot notifier:

printk(KERN_WARNING "turning off dcon\n");
        /* Turn off the DCON. Entirely. */
        dcon_write(DCON_REG_MODE, 0x39);
        dcon_write(DCON_REG_MODE, 0x32);
printk(KERN_WARNING "dcon is now off, sleeping for a bit\n");
mdelay(5000);
printk(KERN_WARNING "done sleeping!\n");

Produces:

 [   70.717948] turning off dcon                                      
[   70.722055] dcon is now off, sleeping for a bit                              
[   75.739379] done sleeping!                                                   
[   76.650648] Restarting system.          

During the sleep, the dcon turns off (completely). After the sleep is done, the dcon turns back on; something in the kernel (or perhaps something the kernel is frobbing) is causing the dcon to turn back on before the machine shuts down!

Changed 7 years ago by dilinger

Oh, and the 'reboot' command was done from the serial console; no keypress action should've woken up the dcon.

Changed 7 years ago by dilinger

It looks like psmouse's shutdown callback is what turns the dcon back on.

Changed 7 years ago by wmb@…

  • status changed from new to closed
  • resolution set to fixed

The reboot fix is tested and committed - the machine now reboots correctly.

The LCD screen still stays black instead of going off, but we know what is causing that - see #1388.

Note: See TracTickets for help on using tickets.