minigbm: Use the stride value returned by mapImage

mapImage can return a different stride value. This value must be
used for the mapped address.

BUG=b:38152101 b:79346377
TEST=graphics_Sanity autotest passed

Change-Id: Ie0eb716291366ae6a047d704f66d24ec41738713
Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
Reviewed-on: https://chromium-review.googlesource.com/1041369
Commit-Ready: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
diff --git a/dri.c b/dri.c
index 8ca00c6..ae491bb 100644
--- a/dri.c
+++ b/dri.c
@@ -260,11 +260,11 @@
 void *dri_bo_map(struct bo *bo, struct vma *vma, size_t plane, uint32_t map_flags)
 {
 	struct dri_driver *dri = bo->drv->priv;
-	int stride;
 
 	/* GBM flags and DRI flags are the same. */
-	vma->addr = dri->image_extension->mapImage(dri->context, bo->priv, 0, 0, bo->width,
-						   bo->height, map_flags, &stride, &vma->priv);
+	vma->addr =
+	    dri->image_extension->mapImage(dri->context, bo->priv, 0, 0, bo->width, bo->height,
+					   map_flags, (int *)&vma->map_strides[plane], &vma->priv);
 	if (!vma->addr)
 		return MAP_FAILED;