summaryrefslogtreecommitdiff
path: root/libs/hwui/Properties.h
diff options
context:
space:
mode:
author Juston Li <justonli@google.com> 2024-08-13 20:45:14 +0000
committer Juston Li <justonli@google.com> 2024-09-19 19:04:31 +0000
commit9a9e06c425ea0a93f1553407d65fef2ab2d4f12b (patch)
tree71d0fff9f5784a3daa1971873e43e41b96b9d125 /libs/hwui/Properties.h
parent7a9c9eecd8055336fc46bfa6edab039092a0fe04 (diff)
[Vulkan] Query global priority support for queue creation
Setting up a device queue with a global queue priority above the system default requires sufficient privileges (SYS_NICE) otherwise queue creation will fail. SurfaceFlinger and system_server have SYS_NICE and will set priority to REALTIME. SysUI and Launcher take that as an indication they should request HIGH for better preemption strategy. However for upstream DRM drivers, we currently lack a way to grant them granular access to HIGH but not RT. For long term, the right way to do this is via drm specific cgroup for scheduling controls however this is currently being worked on upstream. In the meantime, instead of fatally crashing, we can query the global priorities supported before queue creation and if its not supported, drop the priority request and log a warning. Note this requires vkGetPhysicalDeviceQueueFamilyProperties2 which is provided by Vulkan 1.1 while the global priority query can be safely added to the pNext chain and will be ignored if VK_EXT_global_priority_query isn't supported. Bug: 343986434 Flag: com.android.graphics.hwui.flags.query_global_priority Test: UI comes up debug.renderengine.backend=skiavkthreaded Change-Id: I662c9ce3f3724e87690e25d260ee010340451c53
Diffstat (limited to 'libs/hwui/Properties.h')
-rw-r--r--libs/hwui/Properties.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h
index db471527b861..6f84796fb11e 100644
--- a/libs/hwui/Properties.h
+++ b/libs/hwui/Properties.h
@@ -346,6 +346,7 @@ public:
static bool hdr10bitPlus;
static bool skipTelemetry;
static bool resampleGainmapRegions;
+ static bool queryGlobalPriority;
static int timeoutMultiplier;