minigbm: add resource_info callback for virtio-gpu

In ARC++, the wayland sevice and the video stack rely on
GRALLOC_DRM_GET_STRIDE and (*lock_ycbcr) with zero flags to return
the metadata associated with the buffer.

In the past, we've simply returned the metadata that was calculated
during allocation.

Since the current virtio-gpu API relies on shadow buffers, there's
actually two different sets of metadata:

1) The metadata of the shadow buffer --> useful for mapping
2) The metadata of the host resource --> useful for passing to Chrome

For the wayland_service and video stack, we want to return (2).
For the Android framework, we want to return (1).

BUG=b:132939420
TEST=compile

Change-Id: I1134d651396ba68e064eaf2e3cad3cb3225d7c5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1681383
Reviewed-by: David Stevens <stevensd@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
diff --git a/drv.h b/drv.h
index 6642a3d..2b86aad 100644
--- a/drv.h
+++ b/drv.h
@@ -179,6 +179,9 @@
 
 uint32_t drv_num_buffers_per_bo(struct bo *bo);
 
+int drv_resource_info(struct bo *bo, uint32_t strides[DRV_MAX_PLANES],
+		      uint32_t offsets[DRV_MAX_PLANES]);
+
 #define drv_log(format, ...)                                                                       \
 	do {                                                                                       \
 		drv_log_prefix("minigbm", __FILE__, __LINE__, format, ##__VA_ARGS__);              \