Plumb buffer map permissions through gbm.

Map read/write permissions were being ignored by minigbm.  This can
cause segfaults or failed mappings if the device FD permissions are not
rw.

Also adds bounds checking in tegra.c for tile/untile transfers.

BUG=chromium:737328
TEST=cyan, nyan graphicsSanity with read only on device

Change-Id: I8fccaed4e908cda3ff7d7cf451d0ad75d65039e6
Reviewed-on: https://chromium-review.googlesource.com/556980
Commit-Ready: Joe Kniss <djmk@google.com>
Tested-by: Joe Kniss <djmk@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
13 files changed