diff --git a/src/freedreno/common/freedreno_dev_info.c b/src/freedreno/common/freedreno_dev_info.c index 8b217b3186a..ca27bc433e8 100644 --- a/src/freedreno/common/freedreno_dev_info.c +++ b/src/freedreno/common/freedreno_dev_info.c @@ -36,22 +36,25 @@ struct fd_dev_rec { #include "freedreno_devices.h" +/** + * Compare device 'id' against reference id ('ref') from gpu table. + */ static bool -dev_id_compare(const struct fd_dev_id *a, const struct fd_dev_id *b) +dev_id_compare(const struct fd_dev_id *ref, const struct fd_dev_id *id) { - if (a->gpu_id && b->gpu_id) { - return a->gpu_id == b->gpu_id; + if (ref->gpu_id && id->gpu_id) { + return ref->gpu_id == id->gpu_id; } else { - assert(a->chip_id && b->chip_id); + assert(ref->chip_id && id->chip_id); /* Match on either: * (a) exact match * (b) device table entry has 0xff wildcard patch_id and core/ * major/minor match */ - return (a->chip_id == b->chip_id) || - (((a->chip_id & 0xff) == 0xff) && - ((a->chip_id & UINT64_C(0xffffff00)) == - (b->chip_id & UINT64_C(0xffffff00)))); + return (ref->chip_id == id->chip_id) || + (((ref->chip_id & 0xff) == 0xff) && + ((ref->chip_id & UINT64_C(0xffffff00)) == + (id->chip_id & UINT64_C(0xffffff00)))); } }