summaryrefslogtreecommitdiff
path: root/drv_priv.h
diff options
context:
space:
mode:
authorKristian H. Kristensen <hoegsberg@chromium.org>2016-09-06 11:43:26 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-12-21 22:24:10 -0800
commitb1efbd8d169f6d72f69a0f381db9f6dc80e372bf (patch)
tree853a3bed51e29830af465eacdb2a264dc3425d55 /drv_priv.h
parent3fa6dff290d82b3d689e0700e17b52ed28ce2614 (diff)
rockchip: Add support for AFBC buffers
This adds support for allocating AFBC (ARM FrameBuffer Compression) buffers with minigbm for Rockchip SoCs. AFBC buffers are allocated through the new gbm_bo_create_with_modifiers() entry point. Callers are responsible for determining which modifiers are valid for the intended use case and pass in that list. gbm will then pick the optimal modifier and allocate a buffer with that layout. The chosen modifier can be queries through gbm_bo_get_format_modifier(). Callers of the new entry point are expected to forward the modifier when using the buffer with other APIs (EGL, KMS etc). The old gbm_bo_create() entry point continues to work as before and won't allocate AFBC buffers. BUG=chrome-os-partner:56407 TEST=drm-tests null_platform_test with AFBC support Change-Id: I1aa345b0d79c4545b7bfc17e9699ef6ad57c68e2 Reviewed-on: https://chromium-review.googlesource.com/386318 Commit-Ready: Kristian H. Kristensen <hoegsberg@chromium.org> Tested-by: Kristian H. Kristensen <hoegsberg@chromium.org> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Diffstat (limited to 'drv_priv.h')
-rw-r--r--drv_priv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drv_priv.h b/drv_priv.h
index 9b0e4da..cdd13ee 100644
--- a/drv_priv.h
+++ b/drv_priv.h
@@ -67,6 +67,11 @@ struct backend
void (*close)(struct driver *drv);
int (*bo_create)(struct bo *bo, uint32_t width, uint32_t height,
uint32_t format, uint32_t flags);
+ int (*bo_create_with_modifiers)(struct bo *bo,
+ uint32_t width, uint32_t height,
+ uint32_t format,
+ const uint64_t *modifiers,
+ uint32_t count);
void* (*bo_map)(struct bo *bo, struct map_info *data, size_t plane);
int (*bo_unmap)(struct bo *bo, struct map_info *data);
int (*bo_destroy)(struct bo *bo);