mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 07:00:12 +01:00
panvk: Don't expose low/high priority queues on Bifrost
The JM backend logic is not ready for that yet.
Fixes: f04dbf0bc0 ("pan/kmod: query and cache available context priorities from KMD")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37480>
This commit is contained in:
parent
971e068762
commit
adcd8411df
2 changed files with 18 additions and 0 deletions
|
|
@ -369,11 +369,21 @@ panvk_fill_global_priority(const struct panvk_physical_device *physical_device,
|
||||||
uint32_t family_idx,
|
uint32_t family_idx,
|
||||||
VkQueueFamilyGlobalPriorityPropertiesKHR *prio)
|
VkQueueFamilyGlobalPriorityPropertiesKHR *prio)
|
||||||
{
|
{
|
||||||
|
const unsigned arch = pan_arch(physical_device->kmod.props.gpu_id);
|
||||||
uint32_t prio_idx = 0;
|
uint32_t prio_idx = 0;
|
||||||
|
|
||||||
switch (family_idx) {
|
switch (family_idx) {
|
||||||
case PANVK_QUEUE_FAMILY_GPU: {
|
case PANVK_QUEUE_FAMILY_GPU: {
|
||||||
enum pan_kmod_group_allow_priority_flags prio_mask =
|
enum pan_kmod_group_allow_priority_flags prio_mask =
|
||||||
physical_device->kmod.props.allowed_group_priorities_mask;
|
physical_device->kmod.props.allowed_group_priorities_mask;
|
||||||
|
|
||||||
|
/* Non-medium priority context is not hooked-up in the JM backend, even
|
||||||
|
* though the panfrost kmod advertize it. Manually filter non-medium
|
||||||
|
* priority for now.
|
||||||
|
*/
|
||||||
|
if (arch < 10)
|
||||||
|
prio_mask &= PAN_KMOD_GROUP_ALLOW_PRIORITY_MEDIUM;
|
||||||
|
|
||||||
if (prio_mask & PAN_KMOD_GROUP_ALLOW_PRIORITY_LOW)
|
if (prio_mask & PAN_KMOD_GROUP_ALLOW_PRIORITY_LOW)
|
||||||
prio->priorities[prio_idx++] = VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR;
|
prio->priorities[prio_idx++] = VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR;
|
||||||
if (prio_mask & PAN_KMOD_GROUP_ALLOW_PRIORITY_MEDIUM)
|
if (prio_mask & PAN_KMOD_GROUP_ALLOW_PRIORITY_MEDIUM)
|
||||||
|
|
|
||||||
|
|
@ -205,6 +205,7 @@ static VkResult
|
||||||
check_global_priority(const struct panvk_physical_device *phys_dev,
|
check_global_priority(const struct panvk_physical_device *phys_dev,
|
||||||
const VkDeviceQueueCreateInfo *create_info)
|
const VkDeviceQueueCreateInfo *create_info)
|
||||||
{
|
{
|
||||||
|
const unsigned arch = pan_arch(phys_dev->kmod.props.gpu_id);
|
||||||
const VkDeviceQueueGlobalPriorityCreateInfoKHR *priority_info =
|
const VkDeviceQueueGlobalPriorityCreateInfoKHR *priority_info =
|
||||||
vk_find_struct_const(create_info->pNext,
|
vk_find_struct_const(create_info->pNext,
|
||||||
DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR);
|
DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR);
|
||||||
|
|
@ -219,6 +220,13 @@ check_global_priority(const struct panvk_physical_device *phys_dev,
|
||||||
enum pan_kmod_group_allow_priority_flags allowed_prio_mask =
|
enum pan_kmod_group_allow_priority_flags allowed_prio_mask =
|
||||||
phys_dev->kmod.props.allowed_group_priorities_mask;
|
phys_dev->kmod.props.allowed_group_priorities_mask;
|
||||||
|
|
||||||
|
/* Non-medium priority context is not hooked-up in the JM backend, even
|
||||||
|
* though the panfrost kmod advertize it. Manually filter non-medium
|
||||||
|
* priority for now.
|
||||||
|
*/
|
||||||
|
if (arch < 10)
|
||||||
|
allowed_prio_mask &= PAN_KMOD_GROUP_ALLOW_PRIORITY_MEDIUM;
|
||||||
|
|
||||||
if (requested_prio & allowed_prio_mask)
|
if (requested_prio & allowed_prio_mask)
|
||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue