diff options
author | Vince Hsu <vince.h@nvidia.com> | 2016-05-23 10:32:25 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-05-29 22:03:31 -0700 |
commit | a6878fe5ae60af2f3a2488665c71f5e7cdcad71f (patch) | |
tree | 5b6a77695d93283a91f870ba54b54a642c135ee6 /gbm.c | |
parent | 58080dfa64598d295494d03a3b6332e351326f57 (diff) |
minigbm: add format modifiers per plane
To pass the surface format parameters to EGL, we add format modifiers
which are used for dmabuf import. The vendor ID definitions are copied
from drm_fourcc.h.
BUG=chromium:478339
TEST=none
Change-Id: Ida3e6787b29af73ff534c054006f93c3bad4c5b9
Signed-off-by: Vince Hsu <vince.h@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/346365
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Diffstat (limited to 'gbm.c')
-rw-r--r-- | gbm.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -316,6 +316,12 @@ gbm_bo_get_format(struct gbm_bo *bo) return bo->format; } +PUBLIC uint64_t +gbm_bo_get_format_modifier(struct gbm_bo *bo) +{ + return gbm_bo_get_plane_format_modifier(bo, 0); +} + PUBLIC struct gbm_device * gbm_bo_get_device(struct gbm_bo *bo) { @@ -388,6 +394,13 @@ gbm_bo_get_plane_stride(struct gbm_bo *bo, size_t plane) return bo->strides[plane]; } +PUBLIC uint64_t +gbm_bo_get_plane_format_modifier(struct gbm_bo *bo, size_t plane) +{ + assert(plane < bo->num_planes); + return bo->format_modifiers[plane]; +} + PUBLIC void gbm_bo_set_user_data(struct gbm_bo *bo, void *data, void (*destroy_user_data)(struct gbm_bo *, void *)) |