etnaviv: hwdb: fix lookup of GC3000 in i.MX6QP

For whatever reason NXP decided to call the GC3000 in the i.MX6QP a
GC2000+. This being a lie is marked in the IP core by the upper half
of the revision register being all ones. The kernel driver already
fixes the model and revision when it encounters this core, but this
breaks matching in the HWDB, which uses the bogus model/rev from the
core.

Revert the fixup done by the kernel for the lookup in the HWDB.

Fixes: 2192e620bb ("etnaviv: hwdb: Add etna_query_feature_db(..)")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33223>
This commit is contained in:
Lucas Stach
2025-01-26 16:02:39 +01:00
committed by Marge Bot
parent f0e3fe195f
commit dea4b46f21
+12 -1
View File
@@ -17,7 +17,18 @@
bool
etna_query_feature_db(struct etna_core_info *info)
{
gcsFEATURE_DATABASE *db = gcQueryFeatureDB(info->model, info->revision, info->product_id,
uint32_t model = info->model;
uint32_t revision = info->revision;
/* More confusion due to NXP calling the GC3000 in the i.MX6QP a GC2000+:
* the kernel already fixes this up to the real model and revision, but
* to match the HWDB entry we must revert this fixup for the lookup. */
if (model == 0x3000 && revision == 0x5450) {
model = 0x2000;
revision = 0xffff5450;
}
gcsFEATURE_DATABASE *db = gcQueryFeatureDB(model, revision, info->product_id,
info->eco_id, info->customer_id);
if (!db)