panfrost: Stub out G31/G52 quirks
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 24 Mar 2020 17:53:18 +0000 (13:53 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 31 Mar 2020 01:12:26 +0000 (01:12 +0000)
There are none so far, but we'll need quirks accessible for Bifrost
specific details in the future, and in the mean time we need to handle
the cases somehow to avoid the unreachable(..)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>

src/panfrost/include/panfrost-quirks.h

index 83c7c84b02063e470d40f343598dbc4bc7bac7ae..8b8aa0812cd620d695cf0ad004686e0a93c6d020 100644 (file)
 
 #define MIDGARD_SFBD (1 << 1)
 
 
 #define MIDGARD_SFBD (1 << 1)
 
+/* Quirk collections common to particular uarchs */
+
+#define MIDGARD_QUIRKS (0)
+
+#define BIFROST_QUIRKS (0)
+
 static inline unsigned
 panfrost_get_quirks(unsigned gpu_id)
 {
         switch (gpu_id) {
         case 0x600:
         case 0x620:
 static inline unsigned
 panfrost_get_quirks(unsigned gpu_id)
 {
         switch (gpu_id) {
         case 0x600:
         case 0x620:
-                return MIDGARD_SFBD;
+                return MIDGARD_QUIRKS | MIDGARD_SFBD;
 
         case 0x720:
 
         case 0x720:
-                return MIDGARD_SFBD | MIDGARD_NO_HIER_TILING;
+                return MIDGARD_QUIRKS | MIDGARD_SFBD | MIDGARD_NO_HIER_TILING;
 
         case 0x820:
         case 0x830:
 
         case 0x820:
         case 0x830:
-                return MIDGARD_NO_HIER_TILING;
+                return MIDGARD_QUIRKS | MIDGARD_NO_HIER_TILING;
 
         case 0x750:
         case 0x860:
         case 0x880:
 
         case 0x750:
         case 0x860:
         case 0x880:
-                return 0;
+                return MIDGARD_QUIRKS;
+
+        case 0x7093: /* G31 */
+        case 0x7212: /* G52 */
+                return BIFROST_QUIRKS;
 
         default:
 
         default:
-                unreachable("Invalid Midgard GPU ID");
+                unreachable("Unknown Panfrost GPU ID");
         }
 }
 
         }
 }