Module: Mesa
Branch: main
Commit: db497c27dcd0889fc5550bf7f91a0fb5b2a4abea
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=db497c27dcd0889fc5550bf7f91a0fb5b2a4abea

Author: Alyssa Rosenzweig <[email protected]>
Date:   Tue Jan 25 17:51:48 2022 -0500

panfrost: Remove NO_TILE_ENABLE_MAP quirk

Function of architecture. Add a comment to the sole consumer of the quirk bit
about why it's used.

Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14724>

---

 src/gallium/drivers/panfrost/pan_resource.c | 8 ++++++--
 src/panfrost/include/panfrost-quirks.h      | 7 ++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_resource.c 
b/src/gallium/drivers/panfrost/pan_resource.c
index 8802ff7b1cb..8e1e70c4fc8 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -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);
diff --git a/src/panfrost/include/panfrost-quirks.h 
b/src/panfrost/include/panfrost-quirks.h
index 37104c637d5..d1dc3ceb56c 100644
--- a/src/panfrost/include/panfrost-quirks.h
+++ b/src/panfrost/include/panfrost-quirks.h
@@ -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:

Reply via email to