diff options
-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 */ |