[Intel-gfx] "acid mode" on 965+KMS at resume

Pierre Willenbrock pierre at pirsoft.de
Wed Feb 25 19:13:49 CET 2009

Jesse Barnes schrieb:
> On Wednesday, February 25, 2009 9:00:06 am Pierre Willenbrock wrote:
>> Yves-Alexis Perez schrieb:
>>> Hi,
>>> I'm not sure it's completely KMS-related, but I'm testing KMS on my
>>> thinkpad t61, and it works better and better these days. I still have
>>> problems at resume: it's like if the thinkpad too acid:
>>> http://molly.corsac.net/~corsac/thinkpad-acid.jpg
>>> I'm using:
>>> Linux: linux-2.6/master + drm-2.6/drm-fixes merged
>>> xserver:
>>> xf86-video-intel: master with 2013799b20599a58de48cb21a5a389e898a58af1
>>> reverted (I don't have the headers installed in /usr/include/linux)
>>> I'm suspending from X, with:
>>> echo mem > /sys/power/state
>>> It suspends fine, and at resume the console is first displayed green,
>>> then it switches back to X wich is colored like linked above, and X is
>>> freezed. I can't do anything (but iirc the box is reachable via ssh).
>>> I'm not sure how to debug further.
>> Hi,
>> i am seeing the same, minus X-freezing. Actually, suspend to ram works
>> quite well except for the color-mess.
>> This problem is caused by i915_restore_vga restoring the vga palette
>> after i915_restore_palette restores the per-pipe palettes, with the
>> VGACNTRL-register setup to write to the palettes of both pipes, but
>> reading from the disabled pipe A(thus reading garbage/uninitialized data
>> at suspend time).
>> Restoring the VGA-palette when the same is done using
>> i915_restore_palette (at least according to the i965gm-docs) seems to me
>> to be superfluous.
>> Attached patch removes the restore logic for VGA palettes.
>> Alternatively, one could move the i915_restore_palette calls after the
>> i915_restore_vga call.
> Have you tested this in a non-KMS config?  This code also runs to restore the 
> VGA text mode, so restoring the VGA palette may be necessary there?  As long 
> as that works, this looks like a good change, thanks for tracking it down.

This seems to work, too. Apart from the fact, that suspending a
gl-compositor still crashes the x-server, which fortunately does not
happen anymore when using KMS.

I get from the i965gm-docs that the backing store for the vga-palette
are the palette-tables at addresses 0xa000..0xa3ff and 0xa800..0xabff.
This probably needs verification on the i915 and older, too.


More information about the Intel-gfx mailing list