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>
diff --git a/drv.h b/drv.h
index 9204475..355ea45 100644
--- a/drv.h
+++ b/drv.h
@@ -92,6 +92,12 @@
 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);