Mesa (master): etnaviv: Add chipMinorFeatures4 and 5

Christian Gmeiner austriancoder at kemper.freedesktop.org
Fri Apr 14 22:34:37 UTC 2017


Module: Mesa
Branch: master
Commit: 9e4d049f402af93dafe55865dcfd87c96659b7ba
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e4d049f402af93dafe55865dcfd87c96659b7ba

Author: Wladimir J. van der Laan <laanwj at gmail.com>
Date:   Fri Apr 14 09:39:52 2017 +0200

etnaviv: Add chipMinorFeatures4 and 5

Request chipMinorFeatures bitfields 4 and 5 from the
drm driver.

Signed-off-by: Wladimir J. van der Laan <laanwj at gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>

---

 src/gallium/drivers/etnaviv/etnaviv_screen.c | 12 ++++++++++++
 src/gallium/drivers/etnaviv/etnaviv_screen.h |  4 +++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index 55d22c6aba..d4e4c7f699 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -800,6 +800,18 @@ etna_screen_create(struct etna_device *dev, struct etna_gpu *gpu,
    }
    screen->features[4] = val;
 
+   if (etna_gpu_get_param(screen->gpu, ETNA_GPU_FEATURES_5, &val)) {
+      DBG("could not get ETNA_GPU_FEATURES_5");
+      goto fail;
+   }
+   screen->features[5] = val;
+
+   if (etna_gpu_get_param(screen->gpu, ETNA_GPU_FEATURES_6, &val)) {
+      DBG("could not get ETNA_GPU_FEATURES_6");
+      goto fail;
+   }
+   screen->features[6] = val;
+
    if (!etna_get_specs(screen))
       goto fail;
 
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.h b/src/gallium/drivers/etnaviv/etnaviv_screen.h
index c33a9e32fa..a606e5d708 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.h
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.h
@@ -44,6 +44,8 @@ enum viv_features_word {
    viv_chipMinorFeatures1 = 2,
    viv_chipMinorFeatures2 = 3,
    viv_chipMinorFeatures3 = 4,
+   viv_chipMinorFeatures4 = 5,
+   viv_chipMinorFeatures5 = 6,
    VIV_FEATURES_WORD_COUNT /* Must be last */
 };
 
@@ -69,7 +71,7 @@ struct etna_screen {
 
    uint32_t model;
    uint32_t revision;
-   uint32_t features[5];
+   uint32_t features[VIV_FEATURES_WORD_COUNT];
 
    struct etna_specs specs;
 };




More information about the mesa-commit mailing list