summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew P Boie <andrew.p.boie@intel.com>2013-02-04 10:43:08 -0800
committerGerrit Code Review <gerrit@otc-android.intel.com>2013-02-04 10:43:08 -0800
commit63c42637e4fc2b6a5691197b62ee15708c20761e (patch)
tree8e25cf16072f9a4e4a302c66b541110c00fa650d
parent73e275e7be13df5c74e26510dcb9d9c0cc24981e (diff)
parent65a831d46cf14a85d523f386736ba0721b0d790b (diff)
downloadexternal_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.c7
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 */