OSDN Git Service

minigbm: cros_gralloc: back out of scanout flag with more clarity
authorGurchetan Singh <gurchetansingh@chromium.org>
Thu, 9 Mar 2017 01:28:28 +0000 (17:28 -0800)
committerchrome-bot <chrome-bot@chromium.org>
Thu, 16 Mar 2017 18:25:47 +0000 (11:25 -0700)
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>
cros_gralloc/cros_alloc_device.cc

index 97c8186..7f0a50a 100644 (file)
@@ -22,7 +22,7 @@ static struct cros_gralloc_bo *cros_gralloc_bo_create(struct driver *drv,
        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,