radeonsi: fix Hyper-Z hangs on P2 configs
authorMarek Olšák <marek.olsak@amd.com>
Tue, 15 Mar 2016 20:49:54 +0000 (21:49 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 17 Mar 2016 17:30:45 +0000 (18:30 +0100)
Cc: 11.1 11.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_texture.c

index 1ad70765781412937a601e4b28e64f8e0c3d6683..c573b438b01d6e36b94cd10e028318d54ebfd761 100644 (file)
@@ -638,8 +638,14 @@ static unsigned r600_texture_get_htile_size(struct r600_common_screen *rscreen,
            rscreen->info.drm_major == 2 && rscreen->info.drm_minor < 38)
                return 0;
 
-       /* Overalign HTILE on Stoney to fix piglit/depthstencil-render-miplevels 585. */
-       if (rscreen->family == CHIP_STONEY)
+       /* Overalign HTILE on P2 configs to work around GPU hangs in
+        * piglit/depthstencil-render-miplevels 585.
+        *
+        * This has been confirmed to help Kabini & Stoney, where the hangs
+        * are always reproducible. I think I have seen the test hang
+        * on Carrizo too, though it was very rare there.
+        */
+       if (rscreen->chip_class >= CIK && num_pipes < 4)
                num_pipes = 4;
 
        switch (num_pipes) {