Skip to content

Commit 4078a11

Browse files
austriancoderlynxeye-dev
authored andcommitted
drm/etnaviv: update hwdb selection logic
Take product id, customer id and eco id into account. If that delivers no match try a search for model and revision. Signed-off-by: Christian Gmeiner <[email protected]> Signed-off-by: Lucas Stach <[email protected]>
1 parent a51d1f3 commit 4078a11

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/gpu/drm/etnaviv/etnaviv_hwdb.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ bool etnaviv_fill_identity_from_hwdb(struct etnaviv_gpu *gpu)
4646

4747
for (i = 0; i < ARRAY_SIZE(etnaviv_chip_identities); i++) {
4848
if (etnaviv_chip_identities[i].model == ident->model &&
49-
etnaviv_chip_identities[i].revision == ident->revision) {
49+
etnaviv_chip_identities[i].revision == ident->revision &&
50+
(etnaviv_chip_identities[i].product_id == ident->product_id ||
51+
etnaviv_chip_identities[i].product_id == ~0U) &&
52+
(etnaviv_chip_identities[i].customer_id == ident->customer_id ||
53+
etnaviv_chip_identities[i].customer_id == ~0U) &&
54+
(etnaviv_chip_identities[i].eco_id == ident->eco_id ||
55+
etnaviv_chip_identities[i].eco_id == ~0U)) {
5056
memcpy(ident, &etnaviv_chip_identities[i],
5157
sizeof(*ident));
5258
return true;

0 commit comments

Comments
 (0)