winsys/radeon: use type-3 NOPs for CS padding on CIK
authorMarek Olšák <marek.olsak@amd.com>
Tue, 29 Oct 2013 23:22:01 +0000 (00:22 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 4 Nov 2013 18:07:56 +0000 (19:07 +0100)
The type-2 NOPs are said to be unstable. It doesn't make a difference here.

src/gallium/winsys/radeon/drm/radeon_drm_cs.c

index e5723a5874e7a2f370cf94554f9f94b60a86acb8..acb12b249857fd5850df84c1a34eec1a62fe173d 100644 (file)
@@ -491,8 +491,13 @@ static void radeon_drm_cs_flush(struct radeon_winsys_cs *rcs, unsigned flags, ui
                                    OUT_CS(&cs->base, 0xffff1000); /* type3 nop packet */
                    }
            } else {
-                   while (rcs->cdw & 7)
-                           OUT_CS(&cs->base, 0x80000000); /* type2 nop packet */
+                   if (cs->ws->info.chip_class <= SI) {
+                           while (rcs->cdw & 7)
+                                   OUT_CS(&cs->base, 0x80000000); /* type2 nop packet */
+                   } else {
+                           while (rcs->cdw & 7)
+                                   OUT_CS(&cs->base, 0xffff1000); /* type3 nop packet */
+                   }
            }
            break;
     case RING_UVD: