panfrost: Remove NO_TILE_ENABLE_MAP quirk
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 25 Jan 2022 22:51:48 +0000 (17:51 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 26 Jan 2022 01:45:09 +0000 (01:45 +0000)
Function of architecture. Add a comment to the sole consumer of the quirk bit
about why it's used.

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

src/gallium/drivers/panfrost/pan_resource.c
src/panfrost/include/panfrost-quirks.h

index 8802ff7..8e1e70c 100644 (file)
@@ -573,8 +573,12 @@ panfrost_resource_set_damage_region(struct pipe_screen *screen,
         struct pipe_scissor_state *damage_extent = &pres->damage.extent;
         unsigned int i;
 
-        if (!pan_is_bifrost(dev) && !(dev->quirks & NO_TILE_ENABLE_MAP) &&
-            nrects > 1) {
+        /* Partial updates are implemented with a tile enable map only on v5.
+         * Later architectures have a more efficient method of implementing
+         * partial updates (frame shaders), while earlier architectures lack
+         * tile enable maps altogether.
+         */
+        if (dev->arch == 5 && nrects > 1) {
                 if (!pres->damage.tile_map.data) {
                         pres->damage.tile_map.stride =
                                 ALIGN_POT(DIV_ROUND_UP(res->width0, 32 * 8), 64);
index 37104c6..d1dc3ce 100644 (file)
@@ -54,8 +54,6 @@
 /* Does this GPU support anisotropic filtering? */
 #define HAS_ANISOTROPIC (1 << 11)
 
-#define NO_TILE_ENABLE_MAP (1 << 12)
-
 /* Quirk collections common to particular uarchs */
 
 #define MIDGARD_QUIRKS (MIDGARD_NO_TYPED_BLEND_STORES | MIDGARD_MISSING_LOADS)
@@ -70,11 +68,10 @@ panfrost_get_quirks(unsigned gpu_id, unsigned gpu_revision)
         case 0x620:
                 return MIDGARD_QUIRKS
                         | MIDGARD_NO_TYPED_BLEND_LOADS
-                        | NO_BLEND_PACKS | NO_TILE_ENABLE_MAP;
+                        | NO_BLEND_PACKS;
 
         case 0x720:
-                return MIDGARD_QUIRKS | MIDGARD_NO_HIER_TILING
-                        | NO_TILE_ENABLE_MAP;
+                return MIDGARD_QUIRKS | MIDGARD_NO_HIER_TILING;
 
         case 0x820:
         case 0x830: