external/gbm_gralloc
Revisão | 137cc39aaa57f8c64db3397cd6ec7600a191a88d (tree) |
---|---|
Hora | 2018-07-03 07:58:19 |
Autor | Mauro Rossi <issor.oruam@gmai...> |
Commiter | Rob Herring |
Update usage flag handling for hwc
Add support for GRALLOC_USAGE_HW_COMPOSER usage flag
mapping it to GBM flags, inspired by minigbm implementation.
Fixes the artifacts issues with vulkan hal radv with the following apps
with benefit to all apps using HWC layers:
V1 - GPU Benchmark Pro (Vulkan API)
PPSSPP - PSP emulator
Sascha Willems Vulkan Examples (e.g. Vulkan Gears, Vulkan Texture)
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
@@ -147,6 +147,8 @@ static unsigned int get_pipe_bind(int usage) | ||
147 | 147 | bind |= GBM_BO_USE_RENDERING; |
148 | 148 | if (usage & GRALLOC_USAGE_HW_FB) |
149 | 149 | bind |= GBM_BO_USE_SCANOUT; |
150 | + if (usage & GRALLOC_USAGE_HW_COMPOSER) | |
151 | + bind |= GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING; | |
150 | 152 | |
151 | 153 | return bind; |
152 | 154 | } |