Dumb: Adds a function to return mapped address

This function will return user virtual address for the buffer
if it is mapped. If not, then NULL as is initialized with same.

Change-Id: I772d7fc7d279edf9171667ea53fe2ab530249efe
Signed-off-by: Akshu Agrawal <akshu.a@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26628
Reviewed-by: Akshu Agrawal <akshu@chromium.org>
Tested-by: Akshu Agrawal <akshu@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Abhinav Kochhar <abhinav@chromium.org>
Commit-Ready: Anush Elangovan <anush@google.com>
diff --git a/src/omap_drmif_fb.h b/src/omap_drmif_fb.h
index 4fcf0b9..e07261a 100644
--- a/src/omap_drmif_fb.h
+++ b/src/omap_drmif_fb.h
@@ -52,6 +52,7 @@
 uint32_t omap_bo_height(struct omap_bo *bo);
 uint32_t omap_bo_bpp(struct omap_bo *bo);
 uint32_t omap_bo_pitch(struct omap_bo *bo);
+void *omap_bo_addr(struct omap_bo *bo);
 
 #endif /* OMAP_DRMIF_FB_H_ */
 
diff --git a/src/omap_dumb.c b/src/omap_dumb.c
index 5734368..7fa89e7 100644
--- a/src/omap_dumb.c
+++ b/src/omap_dumb.c
@@ -223,6 +223,11 @@
 	return bo->pitch;
 }
 
+void *omap_bo_addr(struct omap_bo *bo)
+{
+	return bo->map_addr;
+}
+
 void *omap_bo_map(struct omap_bo *bo)
 {
 	if (!bo->map_addr)