diff options
author | Mauro Rossi <issor.oruam@gmail.com> | 2018-06-29 13:45:10 +0200 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2018-08-07 14:49:31 +0530 |
commit | c500eb110e27d73a8a5d63117e9ec7f9a341fa5b (patch) | |
tree | 2229fe310ab83efbb6b9d67edf1b0c035ee6c402 | |
parent | 75a896db32c62d926ea04852c568d9c6bd400b12 (diff) | |
download | dragonboard410c-c500eb110e27d73a8a5d63117e9ec7f9a341fa5b.tar.gz |
gralloc: 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)
Change-Id: I2ffe5f5862ba0105df8dd36db8e28760c2245546
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
[AmitP: cherry picked from https://github.com/robherring/gbm_gralloc/tree/master]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
-rw-r--r-- | gralloc/gralloc_gbm.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gralloc/gralloc_gbm.cpp b/gralloc/gralloc_gbm.cpp index 418b7bb..ab6c12b 100644 --- a/gralloc/gralloc_gbm.cpp +++ b/gralloc/gralloc_gbm.cpp @@ -147,6 +147,8 @@ static unsigned int get_pipe_bind(int usage) bind |= GBM_BO_USE_RENDERING; if (usage & GRALLOC_USAGE_HW_FB) bind |= GBM_BO_USE_SCANOUT; + if (usage & GRALLOC_USAGE_HW_COMPOSER) + bind |= GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING; return bind; } |