D3 and D0 state in graphics card
a PMCS(Power Management Control/Status is defined in the PCI spec. Offset D4~D5 in PCI configuration space. There is a PCI tool in Solaris which is un-disclosed yet to read and write PCI registers. dump the register in Offset D4~D5: pcitool /pci\@0\,0 -d bdf=0.2.0,config -o d4 -s 1 -b 0x1
0F 0E 0D 0C 0B 0A 09 08 07 06 05 04 03 02 01 00
-----------------------------------------------
0x00000000000000d0: -- -- -- -- -- -- -- -- -- -- -- 00 -- -- -- --
the Xorg crashed:
Set the register to 0x3(D3):
pcitool /pci\@0\,0 -d bdf=0.2.0,config -w 0x3 -o d4 -s 1
Backtrace:
1: 0xc4b3d39f: /lib/libc.so.1:__sighndlr+0xf
2: 0xc4b3288b: /lib/libc.so.1:call_user_handler+0x2b8
** Signal 11 (SEGV)
3: 0xc47ab1f2: /usr/X11/lib/modules/drivers/i810_drv.so:PreInitCleanup+0x162
4: 0xc47ac721: /usr/X11/lib/modules/drivers/i810_drv.so:I830BIOSPreInit+0x13d1
5: 0x80d0f3a: /usr/X11/bin/i386/Xorg:InitOutput+0xd6a
6: 0x80abb0a: /usr/X11/bin/i386/Xorg:main+0x29a
7: 0x8085ab0: /usr/X11/bin/i386/Xorg:_start+0x80
Fatal server error:
Caught signal 11. Server aborting
The screen is freezing. Mouse can not move around and the screen have no change whatever I hit.
Set the register back to 0x(D0):
pcitool /pci\@0\,0 -d bdf=0.2.0,config -w 0 -o d4 -s 1
pkill -HUP dtlogin
the Xserver can start again.
From the test above, Xorg need some extra work to handle the situation when the graphics card is set to D3 state. Otherwise, it will crash immediately. And the graphics card can be re-initialized successfully by only the PMCS.
0F 0E 0D 0C 0B 0A 09 08 07 06 05 04 03 02 01 00
-----------------------------------------------
0x00000000000000d0: -- -- -- -- -- -- -- -- -- -- -- 00 -- -- -- --
the Xorg crashed:
Set the register to 0x3(D3):
pcitool /pci\@0\,0 -d bdf=0.2.0,config -w 0x3 -o d4 -s 1
Backtrace:
1: 0xc4b3d39f: /lib/libc.so.1:__sighndlr+0xf
2: 0xc4b3288b: /lib/libc.so.1:call_user_handler+0x2b8
** Signal 11 (SEGV)
3: 0xc47ab1f2: /usr/X11/lib/modules/drivers/i810_drv.so:PreInitCleanup+0x162
4: 0xc47ac721: /usr/X11/lib/modules/drivers/i810_drv.so:I830BIOSPreInit+0x13d1
5: 0x80d0f3a: /usr/X11/bin/i386/Xorg:InitOutput+0xd6a
6: 0x80abb0a: /usr/X11/bin/i386/Xorg:main+0x29a
7: 0x8085ab0: /usr/X11/bin/i386/Xorg:_start+0x80
Fatal server error:
Caught signal 11. Server aborting
The screen is freezing. Mouse can not move around and the screen have no change whatever I hit.
Set the register back to 0x(D0):
pcitool /pci\@0\,0 -d bdf=0.2.0,config -w 0 -o d4 -s 1
pkill -HUP dtlogin
the Xserver can start again.
From the test above, Xorg need some extra work to handle the situation when the graphics card is set to D3 state. Otherwise, it will crash immediately. And the graphics card can be re-initialized successfully by only the PMCS.
[…]This may seem like an extremely stupid question, but I am really very new to Linux so please bear with me.[…]
Posted by battery on June 28, 2008 at 03:01 PM CST #