diff options
author | Andrew P Boie <andrew.p.boie@intel.com> | 2013-02-04 10:43:08 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@otc-android.intel.com> | 2013-02-04 10:43:08 -0800 |
commit | 63c42637e4fc2b6a5691197b62ee15708c20761e (patch) | |
tree | 8e25cf16072f9a4e4a302c66b541110c00fa650d | |
parent | 73e275e7be13df5c74e26510dcb9d9c0cc24981e (diff) | |
parent | 65a831d46cf14a85d523f386736ba0721b0d790b (diff) | |
download | external_drm_gralloc-63c42637e4fc2b6a5691197b62ee15708c20761e.zip external_drm_gralloc-63c42637e4fc2b6a5691197b62ee15708c20761e.tar.gz external_drm_gralloc-63c42637e4fc2b6a5691197b62ee15708c20761e.tar.bz2 |
Merge "gralloc_drm_bo_lock: add special usage for GRALLOC_USAGE_HW_TEXTURE"
-rw-r--r-- | gralloc_drm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gralloc_drm.c b/gralloc_drm.c index 3006a9f..27a49c5 100644 --- a/gralloc_drm.c +++ b/gralloc_drm.c @@ -382,8 +382,13 @@ int gralloc_drm_bo_lock(struct gralloc_drm_bo_t *bo, { if ((bo->handle->usage & usage) != usage) { /* make FB special for testing software renderer with */ - if (!(bo->handle->usage & GRALLOC_USAGE_HW_FB)) + + if (!(bo->handle->usage & GRALLOC_USAGE_HW_FB) + && !(bo->handle->usage & GRALLOC_USAGE_HW_TEXTURE)) { + ALOGE("bo.usage:x%X/usage:x%X is not GRALLOC_USAGE_HW_FB or GRALLOC_USAGE_HW_TEXTURE" + ,bo->handle->usage,usage); return -EINVAL; + } } /* allow multiple locks with compatible usages */ |