From db2d5a010335bd28ccae254c91220b27c720bb9e Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Fri, 19 Apr 2024 13:02:56 +0200
Subject: [PATCH] etnaviv: hwdb: Add VIP_V7 and NN_XYDP0 feature bits
These can be used to detect the NN core architecture version [1].
[1] https://github.com/nxp-imx/linux-imx/blob/lf-6.1.36-2.1.0/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware_func.c#L5464-L5465
Signed-off-by: Philipp Zabel
Reviewed-by: Christian Gmeiner
Part-of:
---
src/etnaviv/common/etna_core_info.h | 2 ++
src/etnaviv/hwdb/etna_hwdb.c | 3 +++
2 files changed, 5 insertions(+)
diff --git a/src/etnaviv/common/etna_core_info.h b/src/etnaviv/common/etna_core_info.h
index 17d0d1c3cf1..8c5cb594724 100644
--- a/src/etnaviv/common/etna_core_info.h
+++ b/src/etnaviv/common/etna_core_info.h
@@ -62,6 +62,8 @@ enum etna_feature {
ETNA_FEATURE_PE_NO_ALPHA_TEST,
ETNA_FEATURE_SH_NO_ONECONST_LIMIT,
ETNA_FEATURE_DEC400,
+ ETNA_FEATURE_VIP_V7,
+ ETNA_FEATURE_NN_XYDP0,
ETNA_FEATURE_NUM,
};
diff --git a/src/etnaviv/hwdb/etna_hwdb.c b/src/etnaviv/hwdb/etna_hwdb.c
index 523763ba4fc..8b525946e7f 100644
--- a/src/etnaviv/hwdb/etna_hwdb.c
+++ b/src/etnaviv/hwdb/etna_hwdb.c
@@ -91,6 +91,9 @@ etna_query_feature_db(struct etna_core_info *info)
ETNA_FEATURE(DEC400, DEC400);
+ ETNA_FEATURE(VIP_V7, VIP_V7);
+ ETNA_FEATURE(NN_XYDP0, NN_XYDP0);
+
/* Limits: */
if (info->type == ETNA_CORE_GPU) {
info->gpu.max_instructions = db->InstructionCount;