summaryrefslogtreecommitdiff
path: root/drv.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.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.h')
-rw-r--r--drv.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drv.h b/drv.h
index 9204475..355ea45 100644
--- a/drv.h
+++ b/drv.h
@@ -92,6 +92,12 @@ struct bo *
drv_bo_create(struct driver *drv, uint32_t width, uint32_t height,
uint32_t format, uint64_t flags);
+struct bo *
+drv_bo_create_with_modifiers(struct driver *drv,
+ uint32_t width, uint32_t height,
+ uint32_t format,
+ const uint64_t *modifiers, uint32_t count);
+
void
drv_bo_destroy(struct bo *bo);