Bug 100395 - DC, Powerplay, Tonga, top screen flicker with current amd-staging-4.9
Summary: DC, Powerplay, Tonga, top screen flicker with current amd-staging-4.9
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu (show other bugs)
Version: DRI git
Hardware: Other All
: medium normal
Assignee: Jordan L
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-25 18:22 UTC by Andy Furniss
Modified: 2017-04-05 10:01 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (62.50 KB, text/plain)
2017-03-28 12:05 UTC, Andy Furniss
no flags Details
Fix for Tonga screen flicker issue (5.74 KB, patch)
2017-03-31 20:21 UTC, Jordan L
no flags Details | Splinter Review

Description Andy Furniss 2017-03-25 18:22:31 UTC
R9285 Tonga with current agd5f amd-staging-4.9 I am seeing the top few lines of single DVI-D 1920x1080 monitor flicker when scrolling in eg, a maximised xterm, browser also affected but less so.

Forcing clocks high fixes.

Bisect was a failure, I got as far as -

# good: [38eabe8ecaf5fed9e8122091b27b406563daa2ad] drm/amdgpu: add the HDP 4.0 register headers

# bad: [e2f744ea6cba6a2a7d938ec89def196a59dbdd2d] drm/amdgpu/gfx9: correct wptr pointer value

IIRC said 40 something commits to go.

The next 20 or so are all skips because I got either build fails or startx hangs.

Gave up with the intention of doing git reset --hard e2f744ea6cba6a2a7d938ec89def196a59dbdd2d and going backwards, but as the history after doing that was totally different from as seen from head I didn't bother :-)
Comment 1 Michel Dänzer 2017-03-28 02:45:18 UTC
So this doesn't happen with amdgpu.dc=0?
Comment 2 Andy Furniss 2017-03-28 09:53:58 UTC
(In reply to Michel Dänzer from comment #1)
> So this doesn't happen with amdgpu.dc=0?

It's OK with amdgpu.dc=0
Comment 3 Andy Furniss 2017-03-28 12:05:21 UTC
Created attachment 130499 [details]
dmesg

dmesg attached, plus a link to an external video of what it looks like.

As seen it's also visible when playing a vid, mpv is using opengl for output.

https://drive.google.com/file/d/0BxP5-S1t9VEEak90Tk9wM2dUVlU/view?usp=sharing
Comment 4 Michel Dänzer 2017-03-29 00:53:31 UTC
Can you try finishing the bisect once again? Just continue with git bisect skip until it either finds the regression commit or prints the minimal range of candidate commits.
Comment 5 Andy Furniss 2017-03-29 22:04:19 UTC
Seems, I've found it. Many skips to work around vega build issues, but I got past them and got a bad then good.

Further skips then due to startx hangs with dmesg logging ring test fails on 3 to 8.

Fortunately it then worked and only gave two choices one vega and -

possible first bad commit: [91561a39fa74e79b88e0e9d70f3072501c8df2ce] drm/amdgpu: get display info from DC when DC enabled.

This cleanly reverts from head - and the issue is gone with it reverted.


# skip: [4513c8c07e243b77a36192a3c49845f85a656cea] drm/amd/display: Remove DCE12 guards
git bisect skip 4513c8c07e243b77a36192a3c49845f85a656cea
# bad: [76cfd18b173dd61d24de2c28fa92443fcfe165d8] drm/amdgpu: gart fixes for vega10
git bisect bad 76cfd18b173dd61d24de2c28fa92443fcfe165d8
# good: [6c59cf82dac54970284b3126ff9a15b6b0de6108] drm/amdgpu: add vega10 chip name
git bisect good 6c59cf82dac54970284b3126ff9a15b6b0de6108
# skip: [9a493aa52c3a5176acd7b8ec32b66dc58bded8b2] drm/amdgpu: use atomfirmware interfaces for scratch reg save/restore
git bisect skip 9a493aa52c3a5176acd7b8ec32b66dc58bded8b2
# skip: [d0a2e62fca3e502951bd1eb392e5331ad80dc88c] drm/amdgpu: add IV trace point
git bisect skip d0a2e62fca3e502951bd1eb392e5331ad80dc88c
# skip: [40610a13a747afacb17fa2b9decfa8e5455671b4] drm/amdgpu: add 64bit doorbell assignments
git bisect skip 40610a13a747afacb17fa2b9decfa8e5455671b4
# good: [d9693ee35fd55106b70bbd1dae9ce71b578ab3e9] drm/amdgpu: add psp firmware header info
git bisect good d9693ee35fd55106b70bbd1dae9ce71b578ab3e9
# only skipped commits left to test
# possible first bad commit: [76cfd18b173dd61d24de2c28fa92443fcfe165d8] drm/amdgpu: gart fixes for vega10
# possible first bad commit: [91561a39fa74e79b88e0e9d70f3072501c8df2ce] drm/amdgpu: get display info from DC when DC enabled.
Comment 6 Harry Wentland 2017-03-30 14:21:41 UTC
Thanks, Andy, for the report and taking the time to bisect.

Jordan from my team spotted the bug as well and is working on a solution.

If you're curious about the cause of this... The gist of it is that we don't fill in some info for pplib on DCE 8 and 10 because we don't have the full bandwidth formula implemented. So we either have to fill in some reasonable values or make sure DCE 8 and 10 use the old codepath.

Hope to have a fix soon.
Comment 7 Jordan L 2017-03-31 20:21:56 UTC
Created attachment 130628 [details] [review]
Fix for Tonga screen flicker issue

Hi Andy,

This patch should fix the issue. 

Thanks,
Jordan
Comment 8 Andy Furniss 2017-03-31 22:19:09 UTC
Hi.

The patch fixes the issue for me.

Bit cheeky - but I won't know if I don't ask, and I guess the DAL team didn't see a bug I filed a year ago. Maybe it's not a bug but a feature request -

In summary when I use DC I loose CEA interlaced modes for my HDMI TV. I do have a use case for these, but may well be in a very small minority in that :-)

https://bugs.freedesktop.org/show_bug.cgi?id=94679
Comment 9 Harry Wentland 2017-04-01 00:00:33 UTC
Thanks for pointing us to your other issue. Left a comment there.
Comment 10 Andy Furniss 2017-04-05 10:01:47 UTC
Fix is now in agd5f amd-staging-4.9.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.