Bug 49078

Summary: piglit glean/readPixSanity fails when ColorTiling2D is enabled
Product: xorg Reporter: Johannes Hirte <johannes.hirte>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Johannes Hirte 2012-04-23 06:49:47 UTC
When enabling ColorTiling2D, piglit is failing on glean/readPixSanity.

Running glean by hand gives: 

bin/glean -r tmp/ -v -t +readPixSanity

----------------------------------------------------------------------
This test performs a sanity check of glReadPixels, using as
few other portions of the GL as possible.  If this test fails,
it may be pointless to run other tests, since so many of them
depend on reading the contents of the framebuffer to determine
if they pass.

The test works by using glClear to fill the framebuffer with a
randomly-chosen value, reading the contents of the
framebuffer, and comparing the actual contents with the
expected contents.  RGB, RGBA, color index, stencil, and depth
buffers (whichever are applicable to the current rendering
context) are checked.  The test passes if the actual contents
are within 1 LSB of the expected contents.

radeon: The kernel rejected CS, see dmesg for more information.
readPixSanity:  FAIL rgba8, db, z24, s8, win+pmap, id 33
        Stencil expected 38; got 0.
        RGBA largest readback error was 0 bits
        Depth largest readback error was 0 bits
radeon: The kernel rejected CS, see dmesg for more information.
readPixSanity:  FAIL rgba8, db, z24, s8, win+pmap, id 34
        Stencil expected 38; got 0.
        RGBA largest readback error was 0 bits
        Depth largest readback error was 0 bits
radeon: The kernel rejected CS, see dmesg for more information.
readPixSanity:  FAIL rgba8, db, z24, s8, win+pmap, id 97
        Stencil expected 38; got 0.
        RGBA largest readback error was 0 bits                                                                                                  
        Depth largest readback error was 0 bits
readPixSanity:  PASS rgba8, win+pmap, id 242                                                                                                    
        RGBA largest readback error was 0 bits                                                                                                  
readPixSanity:  PASS rgba8, accrgba16, win+pmap, slow, id 243                                                                                   
        RGBA largest readback error was 0 bits                                                                                                  
readPixSanity:  PASS rgba8, db, win+pmap, id 244                                                                                                
        RGBA largest readback error was 0 bits

and dmesg showed a lot of:

radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:570 stencil read bo too small (layer size 4096, offset 14188032, max layer 1, bo size 16384)
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:574 stencil invalid (0x0000000f 0x0000003f 0x00000401 0x00002022)
radeon 0000:01:00.0: evergreen_packet3_check:2055 invalid cmd stream 468
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !

Hardware is a Mobility Radeon HD5470, native resolution is 1366x768.

When disabling ColorTiling2D, glean/readPixSanity passes without error.

I also see a garbled screen short time when starting X. But this happens with and without ColorTiling2D, so I'm not sure this is related.
Comment 1 Johannes Hirte 2012-04-27 09:51:51 UTC
The screen corruption on X-start is 1D tiling related. When forced to off the screen is correct. But now I get garbled pictures sometimes with this dmesg output:

radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:563 stencil read bo base 226082560 not aligned with 512
radeon 0000:01:00.0: evergreen_packet3_check:2055 invalid cmd stream 709
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:563 stencil read bo base 226082560 not aligned with 512
radeon 0000:01:00.0: evergreen_packet3_check:2055 invalid cmd stream 728
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:563 stencil read bo base 226082560 not aligned with 512
radeon 0000:01:00.0: evergreen_packet3_check:2055 invalid cmd stream 728
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:563 stencil read bo base 226082560 not aligned with 512
radeon 0000:01:00.0: evergreen_packet3_check:2055 invalid cmd stream 728
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:563 stencil read bo base 226082560 not aligned with 512
radeon 0000:01:00.0: evergreen_packet3_check:2055 invalid cmd stream 728
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:570 stencil read bo too small (layer size 583680, offset 1098089205760, max layer 1, bo size 2334720)
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:574 stencil invalid (0x0000009f 0x0000239f 0x00000401 0x00002022)
radeon 0000:01:00.0: evergreen_packet3_check:2055 invalid cmd stream 709
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:570 stencil read bo too small (layer size 583680, offset 1098089205760, max layer 1, bo size 2334720)
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:574 stencil invalid (0x0000009f 0x0000239f 0x00000401 0x00002022)
radeon 0000:01:00.0: evergreen_packet3_check:2055 invalid cmd stream 728
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:570 stencil read bo too small (layer size 583680, offset 1098089205760, max layer 1, bo size 2334720)
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:574 stencil invalid (0x0000009f 0x0000239f 0x00000401 0x00002022)
radeon 0000:01:00.0: evergreen_packet3_check:2055 invalid cmd stream 728
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:570 stencil read bo too small (layer size 583680, offset 1098089205760, max layer 1, bo size 2334720)
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:574 stencil invalid (0x0000009f 0x0000239f 0x00000401 0x00002022)
radeon 0000:01:00.0: evergreen_packet3_check:2055 invalid cmd stream 728
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:570 stencil read bo too small (layer size 583680, offset 1098089205760, max layer 1, bo size 2334720)
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:574 stencil invalid (0x0000009f 0x0000239f 0x00000401 0x00002022)
radeon 0000:01:00.0: evergreen_packet3_check:2055 invalid cmd stream 728
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:570 stencil read bo too small (layer size 583680, offset 1098089205760, max layer 1, bo size 2334720)
radeon 0000:01:00.0: evergreen_cs_track_validate_stencil:574 stencil invalid (0x0000009f 0x0000239f 0x00000401 0x00002022)
radeon 0000:01:00.0: evergreen_packet3_check:2055 invalid cmd stream 728
[drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Comment 2 Adam Jackson 2018-06-12 19:08:26 UTC
Mass closure: This bug has been untouched for more than six years, and is not
obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.

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.