Module: Mesa
Branch: staging/22.2
Commit: ee143bcbee54c06eb96d477836ff201e228c714b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee143bcbee54c06eb96d477836ff201e228c714b

Author: Lucas Stach <[email protected]>
Date:   Thu Aug 25 14:16:37 2022 +0200

etnaviv: add debug option to disable linear PE feature

Linear PE has already shown to have some rough corner cases in the hardware
and also has performance implications. Add a debug option to allow to disable
the feature, so users can more easily check if some issue is caused by this
feature.

CC: mesa-stable #22.2
Signed-off-by: Lucas Stach <[email protected]>
Reviewed-by: Guido Günther <[email protected]>
Reviewed-by: Philipp Zabel <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18232>
(cherry picked from commit 43eb5e777e4b64fe1b143822ae8aaf709eaad42f)

---

 .pick_status.json                            | 2 +-
 src/gallium/drivers/etnaviv/etnaviv_debug.h  | 1 +
 src/gallium/drivers/etnaviv/etnaviv_screen.c | 3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 1cfb4bf04d5..45d007e30cf 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -2929,7 +2929,7 @@
         "description": "etnaviv: add debug option to disable linear PE 
feature",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/etnaviv/etnaviv_debug.h 
b/src/gallium/drivers/etnaviv/etnaviv_debug.h
index 925d50d4b6d..92315b15f73 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_debug.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_debug.h
@@ -56,6 +56,7 @@
 #define ETNA_DBG_NO_SINGLEBUF    0x1000000 /* disable single buffer feature */
 #define ETNA_DBG_DEQP            0x2000000 /* Hacks to run dEQP GLES3 tests */
 #define ETNA_DBG_NOCACHE         0x4000000 /* Disable shader cache */
+#define ETNA_DBG_NO_LINEAR_PE    0x8000000 /* Disable linear PE */
 
 extern int etna_mesa_debug; /* set in etnaviv_screen.c from ETNA_MESA_DEBUG */
 
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c 
b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 93a55e48fbf..97426dc1bef 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -74,6 +74,7 @@ static const struct debug_named_value etna_debug_options[] = {
    {"no_singlebuffer",ETNA_DBG_NO_SINGLEBUF, "Disable single buffer feature"},
    {"deqp",           ETNA_DBG_DEQP, "Hacks to run dEQP GLES3 tests"}, /* 
needs MESA_GLES_VERSION_OVERRIDE=3.0 */
    {"nocache",        ETNA_DBG_NOCACHE,    "Disable shader cache"},
+   {"no_linear_pe",   ETNA_DBG_NO_LINEAR_PE, "Disable linear PE"},
    DEBUG_NAMED_VALUE_END
 };
 
@@ -1112,6 +1113,8 @@ etna_screen_create(struct etna_device *dev, struct 
etna_gpu *gpu,
       screen->specs.can_supertile = 0;
    if (DBG_ENABLED(ETNA_DBG_NO_SINGLEBUF))
       screen->specs.single_buffer = 0;
+   if (DBG_ENABLED(ETNA_DBG_NO_LINEAR_PE))
+      screen->features[viv_chipMinorFeatures2] &= 
~chipMinorFeatures2_LINEAR_PE;
 
    pscreen->destroy = etna_screen_destroy;
    pscreen->get_param = etna_screen_get_param;

Reply via email to