Created attachment 55189 [details]
check crtc active and not only enable before setting lut
"xset dpms force off" then "xgamma -rgamma 2.0" brings the box down .
graphics: gen2 i865g with or without sna (2.17 and 2.16).
kernel: debian 3.0.0-1 to 3.2-rc7 (at a point before kernel were not affected).
I discoverd the issue as gnome-screensaver 3 set the dpms off while fading off thus ends up setting the gamma after dpms is off. Which hang the box (no keyboard, no network, no disk activity only a blue led and fan noise).
Attached patch fixes this issue by checking the intel_crtc->active in intel_crtc_load_lut instead of only checking for crtc->enable. (printk shows that enable is on while active is off when this dpms off mode 3 was sent to the kernel)
Checking active only is probably the right approach here. I just need to explain why enabled is wrong...
In linus/master, and should hit the stable trees:
Author: Alban Browaeys <firstname.lastname@example.org>
Date: Fri Feb 24 17:12:45 2012 +0000
drm/i915: Prevent a machine hang by checking crtc->active before loading lut
Before loading the lut (gamma), check the active state of intel_crtc,
otherwise at least on gen2 hang ensue.
This is reproducible in Xorg via:
xset dpms force off
xgamma -rgamma 2.0 # freeze.
Signed-off-by: Alban Browaeys <email@example.com>
Signed-off-by: Chris Wilson <firstname.lastname@example.org>
Reviewed-by: Jesse Barnes <email@example.com>
Signed-off-by: Jesse Barnes <firstname.lastname@example.org>