diff options
author | Robert Foss <robert.foss@collabora.com> | 2016-09-16 17:21:11 -0400 |
---|---|---|
committer | Robert Foss <robert.foss@collabora.com> | 2016-10-25 17:35:46 -0400 |
commit | 7c5db467ba9385c36a65f3180e1b2b74a0373374 (patch) | |
tree | 3efcf37b72709abb573487438895d2f3bc0b4a26 | |
parent | eab9ec3c995d94700b1f715454beda907931cf89 (diff) | |
download | gbm_gralloc-7c5db467ba9385c36a65f3180e1b2b74a0373374.tar.gz gbm_gralloc-7c5db467ba9385c36a65f3180e1b2b74a0373374.tar.xz |
Stub out GRALLOC_MODULE_PERFORM_GET_USAGE
This implements an initial stub for GRALLOC_MODULE_PERFORM_GET_USAGE
Signed-off-by: Robert Foss <robert.foss@collabora.com>
-rw-r--r-- | gralloc.cpp | 8 | ||||
-rw-r--r-- | gralloc_drm.h | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gralloc.cpp b/gralloc.cpp index 482dfcd..d8f2abd 100644 --- a/gralloc.cpp +++ b/gralloc.cpp @@ -114,6 +114,14 @@ static int gbm_mod_perform(const struct gralloc_module_t *mod, int op, ...) err = 0; } break; + /* TODO: This is a stub and should be implemented fully */ + case GRALLOC_MODULE_PERFORM_GET_USAGE: + { + int *buffer_usage = va_arg(args, int *); + *buffer_usage = 0; + err = 0; + } + break; default: err = -EINVAL; break; diff --git a/gralloc_drm.h b/gralloc_drm.h index e4b528f..4ba7d7b 100644 --- a/gralloc_drm.h +++ b/gralloc_drm.h @@ -30,6 +30,13 @@ extern "C" { enum { GRALLOC_MODULE_PERFORM_GET_DRM_FD = 0x40000002, + + /* perform(const struct gralloc_module_t *mod, + * int op, + * buffer_handle_t buffer, + * int *usage); + */ + GRALLOC_MODULE_PERFORM_GET_USAGE = 0xffeeff03, }; #ifdef __cplusplus |