mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 19:50:12 +01:00
pan/kmod: fix priority query logic
The PANFROST_JM_CTX_PRIORITY values aren't bitmasks, but enum values. But the kernel interface uses the BIT()-macro on them, so we need to do the same. We don't have the macro, but it's trivial to do this with a bitshift instead. Fixes:f04dbf0bc0("pan/kmod: query and cache available context priorities from KMD") CID: 1666511 Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903> (cherry picked from commit37a7a157e8)
This commit is contained in:
parent
1e6aec2fa3
commit
8404366d2f
2 changed files with 5 additions and 5 deletions
|
|
@ -164,7 +164,7 @@
|
|||
"description": "pan/kmod: fix priority query logic",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "f04dbf0bc0bf34818c7cdb1852154b396c81de99",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -215,14 +215,14 @@ panfrost_dev_query_props(const struct pan_kmod_dev *dev,
|
|||
* priority as medium if the param doesn't exist. */
|
||||
uint64_t prios =
|
||||
panfrost_query_raw(fd, DRM_PANFROST_PARAM_ALLOWED_JM_CTX_PRIORITIES,
|
||||
false, PANFROST_JM_CTX_PRIORITY_MEDIUM);
|
||||
false, BITFIELD_BIT(PANFROST_JM_CTX_PRIORITY_MEDIUM));
|
||||
|
||||
if (prios & PANFROST_JM_CTX_PRIORITY_LOW)
|
||||
if (prios & BITFIELD_BIT(PANFROST_JM_CTX_PRIORITY_LOW))
|
||||
props->allowed_group_priorities_mask |= PAN_KMOD_GROUP_ALLOW_PRIORITY_LOW;
|
||||
if (prios & PANFROST_JM_CTX_PRIORITY_MEDIUM)
|
||||
if (prios & BITFIELD_BIT(PANFROST_JM_CTX_PRIORITY_MEDIUM))
|
||||
props->allowed_group_priorities_mask |=
|
||||
PAN_KMOD_GROUP_ALLOW_PRIORITY_MEDIUM;
|
||||
if (prios & PANFROST_JM_CTX_PRIORITY_HIGH)
|
||||
if (prios & BITFIELD_BIT(PANFROST_JM_CTX_PRIORITY_HIGH))
|
||||
props->allowed_group_priorities_mask |=
|
||||
PAN_KMOD_GROUP_ALLOW_PRIORITY_HIGH;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue