minigbm: fix subsampling issue

For YUV, we're not consistent.  For the "y" component, we assume
the offset is just y * plane_stride, letting the API user take
care of the subsampling.  For the "x" component, we subsample the
"x" the user passes in (see drv_stride_from_format(..)).

Let's be consistent and not subsample.

This likely makes neglible difference since the users of the API map
the entire plane.

BUG=b:132939420
TEST=none

Change-Id: I0fcfd8ba6a2ae59a419af963eb7b54245f697d77
Reviewed-on: https://chromium-review.googlesource.com/1681382
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
diff --git a/gbm.c b/gbm.c
index 4e41daa..db2b4f2 100644
--- a/gbm.c
+++ b/gbm.c
@@ -267,7 +267,7 @@
 	*stride = ((struct mapping *)*map_data)->vma->map_strides[plane];
 
 	offset = *stride * rect.y;
-	offset += drv_stride_from_format(bo->gbm_format, rect.x, plane);
+	offset += rect.x * drv_bytes_per_pixel_from_format(bo->gbm_format, plane);
 	return (void *)((uint8_t *)addr + offset);
 }