Bug 93236

Summary: Tonga garbled desktop since amdgpu/gfxv8: Cleanup of gfx_v8_0_tiling_mode_table_init()
Product: DRI Reporter: Andy Furniss <adf.lists>
Component: DRM/AMDgpuAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: DRI git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
An xwd showing corrupted desktop.
none
dmesg
none
xorg log
none
debugging diff
none
dmesg with debugging output
none
removes stray break none

Description Andy Furniss 2015-12-04 00:22:10 UTC
Created attachment 120318 [details]
An xwd showing corrupted desktop.

Tried the latest powerplay today and I get a shredded desktop (fluxbox) as soon as I startx.

Apart from the X corruption everything else seems OK, fbcon is OK.

Seems to be -

commit 3e199b1535a70d6169fd11ee309f8bc4c8ba5bb9
Author: Tom St Denis <tom.stdenis@amd.com>
Date:   Tue Dec 1 11:47:21 2015 -0500

    amdgpu/gfxv8: Cleanup of gfx_v8_0_tiling_mode_table_init()
    
    Simplification and LOC reduction of function gfx_v8_0_tiling_mode_table_init()
Comment 1 Andy Furniss 2015-12-04 00:24:11 UTC
Created attachment 120319 [details]
dmesg
Comment 2 Andy Furniss 2015-12-04 00:24:51 UTC
Created attachment 120320 [details]
xorg log
Comment 3 Andy Furniss 2015-12-04 11:33:55 UTC
Seems this is because there is no longer a default as there was in the case statement.

If I add a couple of printk sitting on the commit before "bad" I hit the default case during bootup (before I startx).

[    5.030315] ADF: Hit first default, reg_offset = 31
[    5.030406] ADF: Hit second default, reg_offset = 15

diff and full dmesg attached to show timing/position of output.
Comment 4 Andy Furniss 2015-12-04 11:34:31 UTC
Created attachment 120337 [details]
debugging diff
Comment 5 Andy Furniss 2015-12-04 11:35:18 UTC
Created attachment 120338 [details]
dmesg with debugging output
Comment 6 Andy Furniss 2015-12-04 12:14:41 UTC
Of course had I looked at the code rather than just the diff on fdo cgit I wouldn't have needed to bother with printks -

const u32 num_tile_mode_states = 32;
const u32 num_secondary_tile_mode_states = 16;
Comment 7 Andy Furniss 2015-12-04 12:26:20 UTC
Ugh never mind, I see that the last slot should already be set to 0 :-(

Where's the delete post button :-)
Comment 8 Andy Furniss 2015-12-04 13:53:21 UTC
Created attachment 120343 [details]
removes stray break

OK I think I've found it now.

There's a stray break in the TONGA bit of the new code.

After a quick search I can't find any others.
Comment 9 Alex Deucher 2015-12-04 16:50:37 UTC
Updated patch pushed.

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.