minigbm: cros_gralloc: back out of scanout flag with more clarity
We interpret the following flags as GRALLOC_USAGE_HW_COMPOSER
as BO_USE_SCANOUT | BO_USE_RENDERING:
If the combination is not supported by the driver, let's check if
the gralloc flag is present before we back out for clarity.
BUG=chromium:616275
TEST=compiles
Change-Id: If546ce653f1088cbb1d31cf2f90aba0621ed8b4a
Reviewed-on: https://chromium-review.googlesource.com/451978
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
diff --git a/cros_gralloc/cros_alloc_device.cc b/cros_gralloc/cros_alloc_device.cc
index 97c8186..7f0a50a 100644
--- a/cros_gralloc/cros_alloc_device.cc
+++ b/cros_gralloc/cros_alloc_device.cc
@@ -22,7 +22,7 @@
supported = drv_is_combination_supported(drv, drv_format, drv_usage,
DRM_FORMAT_MOD_NONE);
- if (!supported && (drv_usage & BO_USE_SCANOUT)) {
+ if (!supported && (usage & GRALLOC_USAGE_HW_COMPOSER)) {
drv_usage &= ~BO_USE_SCANOUT;
supported = drv_is_combination_supported(drv, drv_format,
drv_usage,