Bug 76861 - radeon: flickering horizontal stripes/lines
Summary: radeon: flickering horizontal stripes/lines
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: i386 Linux
: P1 normal
Assignee: drivers_video-dri
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-24 23:19 UTC by Sven Dziadek
Modified: 2014-06-03 22:39 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.15-rc6
Tree: Mainline
Regression: No


Attachments
Video of my monitor (1.68 MB, video/mp4)
2014-05-24 23:19 UTC, Sven Dziadek
Details
Possible fix (1.27 KB, patch)
2014-05-26 07:46 UTC, Christian König
Details | Diff
dmesg output with patch applied (65.06 KB, text/x-log)
2014-05-26 10:15 UTC, Sven Dziadek
Details
patched with value 107 (64.23 KB, application/octet-stream)
2014-05-26 13:46 UTC, Sven Dziadek
Details
dmesg output for (still working) Kernel 3.15-rc1 (64.94 KB, application/octet-stream)
2014-05-26 13:47 UTC, Sven Dziadek
Details

Description Sven Dziadek 2014-05-24 23:19:07 UTC
Created attachment 137301 [details]
Video of my monitor

Maybe duplicate of https://bugzilla.kernel.org/show_bug.cgi?id=75921

Recent DRI updates trigger a strange bug with my Radeon graphics card.
Horizontal lines flicker. These stripes/ lines start from the right edge of the screen and have different lengths. All colors are visible. The amount of lines depends on the speed of diplay changes. In games/ console scrolling, there is a lot of them. If the pc is idle, I don't see any. Occurs also in tty1 on the text console.
I appended a bad-quality video showing this issue. Sorry for the quality, but screencast programs don't record the problem, only the picture as it should be.

With 3.15-rc1 it still works fine. In later Kernels, it is black without output.
From somewhere between 3.15-rc3 and 3.15-rc4 (when the black-screen-issue is fixed), theses stripes are visible. They are still there in latest commit: 1ee1ceafb572f1a925809168267a7962a4289de8

Graphics card is onboard:
01:05.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RS880 [Radeon HD 4200] (prog-if 00 [VGA controller])
Monitor is attached over DVI.

I haven't found any errors in syslog. Tell me if you need some more info.
Comment 1 Christian König 2014-05-26 07:46:51 UTC
Created attachment 137371 [details]
Possible fix

Might be caused by the recent PLL changes. Does the attached patch helps?

Also please provide dmesg output generated with drm.debug=0xE on the kernel commandline.
Comment 2 Sven Dziadek 2014-05-26 10:15:33 UTC
Created attachment 137401 [details]
dmesg output with patch applied
Comment 3 Sven Dziadek 2014-05-26 10:16:32 UTC
The patch did not change anything for me. The flickering lines are still there..

Maybe the dmesg output will help?
Thanks
Comment 4 Christian König 2014-05-26 12:04:58 UTC
(In reply to Sven Dziadek from comment #3)
> Maybe the dmesg output will help?

The logs show that your system indeed seems to be affected by the patch. Can you try even lower values than 114 and see if it changes anything?

Also please provide the dmesg output with rc1 where it still worked fine.
Comment 5 Sven Dziadek 2014-05-26 13:46:14 UTC
Created attachment 137421 [details]
patched with value 107

Value 107 works for me. I am currently testing which is the highest value working for me. I think, this is what you need?
Comment 6 Sven Dziadek 2014-05-26 13:47:15 UTC
Created attachment 137431 [details]
dmesg output for (still working) Kernel 3.15-rc1
Comment 7 Christian König 2014-05-26 14:18:26 UTC
(In reply to Sven Dziadek from comment #5)
> Created attachment 137421 [details]
> patched with value 107
> 
> Value 107 works for me. I am currently testing which is the highest value
> working for me. I think, this is what you need?

The highest working value would be nice indeed, but the problem is that the numbers get reduced once more after applying the limit.

For example with the value 105 the ratio of 11292/105 gets reduced to 3764/35 (both sides divided by 3) before it is send to the hardware.

Take a look at the following lines in the log and try different values between 100 and 114:
[drm:radeon_compute_pll_avivo] 154000 - 154000, pll dividers - fb: 376.4 ref: 5, post 7

A value below 100 is known to not work correctly for some users, values above 128 doesn't work for some other users. We essentially need to figure out the sweet spot in between.
Comment 8 Sven Dziadek 2014-05-26 21:48:46 UTC
So, I tried different values. First, I was not paying enough attention. Because with value 112 and 113, there are very few lines appearing.

Value 111 is the one where I did not see any lines until now.
[drm:radeon_compute_pll_avivo] 154000 - 154000, pll dividers - fb: 376.4 ref: 5, post 7
Is the corresponding line in the dmesg.

Is that all you need? And thanks for your work!
Comment 9 Christian König 2014-05-27 11:01:02 UTC
(In reply to Sven Dziadek from comment #8)
> Is that all you need? And thanks for your work!

What happens when you use 108, 109 or 110?
Comment 10 Sven Dziadek 2014-05-27 15:39:57 UTC
Ok, for value 111 and smaller, I don't see any lines or stripes. I have not tried all possible values, but I assume, this is not necessary.

For the values I tried, I can give you the corresponding dmesg entries:
dmesg.log_rc1: 154000 - 15752, pll dividers - fb: 154.0 ref: 2, post 7
dmesg.log_pll_105: 154000 - 154000, pll dividers - fb: 376.4 ref: 5, post 7
dmesg.log_pll_107: 154000 - 154000, pll dividers - fb: 376.4 ref: 5, post 7
dmesg.log_pll_108: 154000 - 154000, pll dividers - fb: 376.4 ref: 5, post 7
dmesg.log_pll_109: 154000 - 154000, pll dividers - fb: 376.4 ref: 5, post 7
dmesg.log_pll_110: 154000 - 154000, pll dividers - fb: 376.4 ref: 5, post 7
dmesg.log_pll_111: 154000 - 154000, pll dividers - fb: 376.4 ref: 5, post 7
dmesg.log_pll_112: 154000 - 154000, pll dividers - fb: 1204.5 ref: 16, post 7
dmesg.log_pll_113: 154000 - 154000, pll dividers - fb: 1204.5 ref: 16, post 7
dmesg.log_pll_114: 154000 - 154000, pll dividers - fb: 1226.0 ref: 19, post 6

Tell me when you need more values or more parts of the dmesg logs.
Comment 11 Christian König 2014-05-27 17:41:27 UTC
What happens if you comment out "avivo_reduce_ratio(&fb_div, &ref_div, fb_div_min, ref_div_min);" ?

The problem is that values smaller than 112 doesn't give us a ref divider of 15 instead we get a divider of 5 because the feedback divider is dividable by 3 as well.
Comment 12 Sven Dziadek 2014-05-28 15:49:43 UTC
Ok, new report ;-)
With this line commented out, the lines reappear.

I tried with these values:
dmesg.log_pll_105: 154000 - 154000, pll dividers - fb: 1129.2 ref: 15, post 7
dmesg.log_pll_110: 154000 - 154000, pll dividers - fb: 1129.2 ref: 15, post 7
dmesg.log_pll_111: 154000 - 154000, pll dividers - fb: 1129.2 ref: 15, post 7
dmesg.log_pll_112: 154000 - 154000, pll dividers - fb: 1204.5 ref: 16, post 7
All of them  contain stripes/ lines.
Comment 13 Christian König 2014-05-28 16:15:09 UTC
Crap, I freared that this could happen.

Please try values of 50,60,70,80,90 as well and see where the limit is that the lines disapear.
Comment 14 Sven Dziadek 2014-05-29 14:10:16 UTC
I tried some more values.
With the line commented out, the lines appear with value 80 and higher. They do not appear with value 70 and lower. I did not try 60 or any values between 70 and 80. Do you need it more detailed?

dmesg.log_pll_50: 154000 - 153990, pll dividers - fb: 516.2 ref: 8, post 6
dmesg.log_pll_70: 154000 - 154000, pll dividers - fb: 752.8 ref: 10, post 7
dmesg.log_pll_80: 154000 - 153990, pll dividers - fb: 838.8 ref: 13, post 6
dmesg.log_pll_90: 154000 - 154000, pll dividers - fb: 967.9 ref: 15, post 6
Comment 15 Sven Dziadek 2014-06-03 22:39:40 UTC
The new 3.15-rc8 works fine for me.

Note You need to log in before you can comment on or make changes to this bug.