https://bugs.freedesktop.org/show_bug.cgi?id=73067
Priority: medium Bug ID: 73067 Assignee: dri-devel@lists.freedesktop.org Summary: RV770 - screen flicker with radeon.dpm=1 Severity: normal Classification: Unclassified OS: Linux (All) Reporter: vasquinhos13@sapo.pt Hardware: x86-64 (AMD64) Status: NEW Version: unspecified Component: DRM/Radeon Product: DRI
Created attachment 91222 --> https://bugs.freedesktop.org/attachment.cgi?id=91222&action=edit lspci -vv
linux-sabayon-3.12.5 https://github.com/Sabayon/kernel I installed the lastest available kernel version on sabayon-weekly repository. sha1sum /lib/firmware/radeon/RV770_smc.bin 43e2fc7b9faa57e78401e1b1c609f71374cc8109 /lib/firmware/radeon/RV770_smc.bin
Whem booted with radeon.dpm=1 as a kernel parameter on grub, screen flicks: jumps down some pixels and go to normal position every ~4 seconds very fast. Whem /sys/class/drm/card0/device/power_dpm_force_performance_level is changed to "high" or "low" flicker stops. Whem is changed back to "auto" flicker happens again, no mather what value is power_dpm_state.
Whem booted without radeon.dpm=1 parameter there isn't flicker.
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #1 from Vasco Almeida vasquinhos13@sapo.pt --- Created attachment 91223 --> https://bugs.freedesktop.org/attachment.cgi?id=91223&action=edit dmesg output
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #2 from Vasco Almeida vasquinhos13@sapo.pt --- Created attachment 91224 --> https://bugs.freedesktop.org/attachment.cgi?id=91224&action=edit glxinfo
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #3 from Alex Deucher agd5f@yahoo.com --- Please attach your xorg log and the output of xrandr --verbose.
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #4 from Alex Deucher agd5f@yahoo.com --- Created attachment 91227 --> https://bugs.freedesktop.org/attachment.cgi?id=91227&action=edit debugging patch
Please attach your dmesg output with the attached patch applied to your kernel.
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #5 from Vasco Almeida vasquinhos13@sapo.pt --- Created attachment 91232 --> https://bugs.freedesktop.org/attachment.cgi?id=91232&action=edit xrandr --verbose
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #6 from Vasco Almeida vasquinhos13@sapo.pt --- Created attachment 91233 --> https://bugs.freedesktop.org/attachment.cgi?id=91233&action=edit Xorg.log
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #7 from Vasco Almeida vasquinhos13@sapo.pt --- Created attachment 91254 --> https://bugs.freedesktop.org/attachment.cgi?id=91254&action=edit dmesg with patch
This is dmesg outpout with the patch attached above.
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #8 from Alex Deucher agd5f@yahoo.com --- Created attachment 91611 --> https://bugs.freedesktop.org/attachment.cgi?id=91611&action=edit add quirk
Does the attached patch fix the issue?
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #9 from Vasco Almeida vasquinhos13@sapo.pt --- Yes, the attached patch fixed the flicker. Screen does not flick whichever value is power_dpm_state or power_dpm_force_performance_level.
Before the patch, the flicker happened when switching from power level 2 sclk: 66500 mclk: 95000 vddc: 1082 to power level 1 sclk: 50000 mclk: 70000 vddc: 1046
In the way level 1 -> level 2 there is not screen flicker.
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #10 from Alex Deucher agd5f@yahoo.com --- (In reply to comment #9)
Yes, the attached patch fixed the flicker. Screen does not flick whichever value is power_dpm_state or power_dpm_force_performance_level.
Before the patch, the flicker happened when switching from power level 2 sclk: 66500 mclk: 95000 vddc: 1082 to power level 1 sclk: 50000 mclk: 70000 vddc: 1046
In the way level 1 -> level 2 there is not screen flicker.
The flicker is caused by the mclk transition. It some cases it seems to take longer than the vblank period which is why you are seeing the flicker.
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #11 from Vasco Almeida vasquinhos13@sapo.pt --- I found that my screen was flicking once in ~4 seconds because of conky. With conky off, flicks happen but happen a lot less, like 1 in ~20 - this period depends on what I'm doing. But testing with glxspheres, screen flicker happens each ~4 seconds again. Probably this isn't important.
Can you give some hints about the solution? Do you think this can be fixed? Or this driver won't support mclk transition on this board?
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #12 from Alex Deucher agd5f@yahoo.com --- (In reply to comment #11)
I found that my screen was flicking once in ~4 seconds because of conky. With conky off, flicks happen but happen a lot less, like 1 in ~20 - this period depends on what I'm doing. But testing with glxspheres, screen flicker happens each ~4 seconds again. Probably this isn't important.
It happens whenever there is an mclk transition based on GPU load.
Can you give some hints about the solution? Do you think this can be fixed? Or this driver won't support mclk transition on this board?
I'm not sure how reliable mclk switching was on rv770 boards in general. Most rv770 boards I've seen have the same mclk for all performance levels. You might try adjusting the value of CG_DISPLAY_GAP_CNTL in rv770_program_display_gap(). Maybe try R600_PM_DISPLAY_GAP_VBLANK_OR_WM or R600_PM_DISPLAY_GAP_WATERMARK rather than R600_PM_DISPLAY_GAP_VBLANK for DISP1_GAP_MCHG, but I don't think it will make a difference.
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #13 from Benjamin Bellec b.bellec@gmail.com --- Alex, I saw you disabled RV770 mclk switching to kernel 3.13.3 and 3.12.11. Thank you, it's now much more comfortable (tested with Fedora 19 kernel 3.12.11).
Anyway, do you plan to add your patch to kernel 3.10 too? It's a long-term release and will be used by RHEL7.
https://bugs.freedesktop.org/show_bug.cgi?id=73067
--- Comment #14 from Benjamin Bellec b.bellec@gmail.com --- (In reply to comment #13)
Anyway, do you plan to add your patch to kernel 3.10 too? It's a long-term release and will be used by RHEL7.
Shame on me. DPM landed in kernel 3.11.
https://bugs.freedesktop.org/show_bug.cgi?id=73067
Alex Deucher agd5f@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #15 from Alex Deucher agd5f@yahoo.com --- Fixed in: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=80...
dri-devel@lists.freedesktop.org