Bug 26942
Summary: | radeon: screen distortion on resume | ||
---|---|---|---|
Product: | Drivers | Reporter: | Brett Witherspoon (spoonb) |
Component: | Video(DRI - non Intel) | Assignee: | drivers_video-dri |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | alexdeucher, florian, kernelbug, maciej.rutecki, rjw |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.37 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 7216, 21782 | ||
Attachments: |
Xorg.log
dmesg vbios rom dmesg after resume with DRM_INFO patch avivotool regs all output for working and non working suspend regs before resume regs after resume Both monitors Single Monitor fix bios scratch reg settings |
Description
Brett Witherspoon
2011-01-17 13:23:12 UTC
Please attach your xorg log, dmesg output, and a copy of your vbios. To get a copy of your vbios: (as root) (use lspci to get the bus id) cd /sys/bus/pci/devices/<pci bus id> echo 1 > rom cat rom > /tmp/vbios.rom echo 0 > rom Created attachment 43902 [details]
Xorg.log
Created attachment 43912 [details]
dmesg
Created attachment 43922 [details]
vbios rom
Can you dump regs 0x458 and 0x45c using avivotool after resume in the working and non-working states? (run as root): avivotool regmatch 0x458 avivotool regmatch 0x45c You can get avivotool here: http://cgit.freedesktop.org/~airlied/radeontool/ Can you also attach your dmesg after resume with this patch: diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index 4a20a62..c19ea3e 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -418,6 +418,8 @@ static void atombios_crtc_program_ss(struct drm_crtc *crtc, memset(&args, 0, sizeof(args)); + DRM_INFO("atombios_crtc_program_ss: %d\n", enable); + if (ASIC_IS_DCE5(rdev)) { args.v3.usSpreadSpectrumAmountFrac = 0; args.v3.ucSpreadSpectrumType = ss->type; Here are the dumps after resume: v2.6.36.3 ( Working ) avivotool regmatch 0x458: 0x458 0x00000000 (0) avivotool regmatch 0x45c: 0x45c 0x00000000 (0) v2.6.37 ( Not Working) avivotool regmatch 0x458: 0x458 0x00000000 (0) avivotool regmatch 0x45c: 0x45c 0x00000000 (0) And dmesg with the patch after resume is attached. Created attachment 44572 [details]
dmesg after resume with DRM_INFO patch
The changes in that patch should only affect those regs I asked you to dump, but they are the same before and after. Can you attach the output of: avivotool regs all before and after? If that gives you any problems, try just dumping the pll regs: avivotool regmatch <reg> where <reg> = 0x400 0x404 0x408 0x40c 0x410 0x414 0x418 0x41c 0x420 0x424 0x430 0x434 0x438 0x43c 0x440 0x444 0x448 0x44c 0x450 0x454 Created attachment 45042 [details]
avivotool regs all output for working and non working suspend
I am having the same problem on resume with kernel 2.6.37. I have attached the output of avivotool regs all for a working resume from 2.6.36 and a non-working resume from 2.6.37. Happy to get you anything else you need.
Created attachment 45232 [details]
regs before resume
Created attachment 45242 [details]
regs after resume
Regs before and after resume ( v2.6.37 ) attached. What does the distortion look like? Flickering display? garbage on screen? Can you get a picture? I've narrowed it down to a set of possible registers. Can you try manually setting the following registers after resume and let me know which, if any, fix the problem? pll controls: avivotool regset 0x468 0x00000002 avivotool regset 0x46c 0x00000002 uniphy0: avivotool regset 0x7688 0x19011400 avivotool regset 0x7698 0x10101040 uniphy3: avivotool regset 0x7aa8 0x19011400 avivotool regset 0x7ab8 0x10101040 uniphy links: avivotool regset 0x7f20 0x08080100 avivotool regset 0x7f24 0x08080100 Also, it appears you are using two monitors, are both distorted after resume or just one? Created attachment 46082 [details]
Both monitors
The distortion looks like horizontal lines with flickering. I attached some pictures for you. It occurs on both monitors.
However, the first pll control restores the image:
avivotool regset 0x468 0x00000002
OLD: 0x468 (0468) 0x00000006 (6)
NEW: 0x468 (0468) 0x00000002 (2)
The others don't appear to have any effect.
Created attachment 46092 [details]
Single Monitor
The first pll control restores the image for me as well. I am using the laptop screen (LVDS) and an external LCD. The distortion occurs only on the laptop screen after resume. I am sure the logs indicate this, but in case it is relevant I am using the DVI-0 and HDMI-0 connectors for the monitors. Thanks. I see what's going on now, but I don't see how that commit could be the one at fault. I suspect in some s/r cases the registers retained the old state so the bug was not exhibited. I should have a patch to test soon. Created attachment 46142 [details]
fix bios scratch reg settings
This patch should fix the problem. Although I don't understand why this was never an issue before...
OK, that patch does fix the problem. Thank you. This is probably unrelated but I do have some sluggish response when switching to overview mode with mutter/gnome-shell (r600g). Restarting mutter fixes it, so this seems to be an in issue with mutter/gnome-shell so I will report it there. I've sent the patch to Dave for 2.6.38 and 2.6.37 stable. The gnome-shell problem sounds like a userspace issue; either a bug in mutter or a bug in the 3D driver; probably not kernel related. Handled-By : Alex Deucher <alexdeucher@gmail.com> Patch : https://bugzilla.kernel.org/attachment.cgi?id=46142 Fixed by commit 87364760de5d631390c478fcbac8db1b926e0adf . |