freedreno/fdperf: better compatible string matching
authorRob Clark <robdclark@chromium.org>
Sun, 5 Jul 2020 18:35:01 +0000 (11:35 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 6 Jul 2020 15:08:15 +0000 (15:08 +0000)
commit385d036f5836714bc59937369fdc3447fc0da5fb
tree01356157bbf4923ccede0d9b258645be747fa011
parent9c34a3322d859bc6edf18daca14df91001b90562
freedreno/fdperf: better compatible string matching

Previously we would match the start of the compatible string, in
a couple of cases, in order to match compatible strings like
"qcom,adreno-630.2".  But these cases would always list a more
generic compatible (ie. "qcom,adreno") as a later choice.  So if
we parse all the compatible strings, we can do a more precise
exact match.

This avoids us accidentially matching on "qcom,adreno-smmu" and
the hilarity that ensues.

Fixes: 5a13507164a ("freedreno/perfcntrs: add fdperf")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5762>
src/freedreno/perfcntrs/fdperf.c