minigbm: work with strides, not widths

When doing alignment, many times we get the bytes per pixel, try
to align to a certain boundary, and then pass in the "aligned width"
to drv_bo_from_format. This back and forth is confusing and error
prone. Let's change our drivers and helpers to eliminate this, and
try to work in strides as soon as possible.

Additionally, let's make drv_bpp_from_format a static function. This
is because bits per pixel is ill-defined for YUV formats, and we should
work in strides whenever possible.

BUG=none
TEST=graphics_Gbm runs successfully on Cyan, ui boots

Change-Id: I207ce6fd5eaac472b7b82f0d952b46697e325498
Reviewed-on: https://chromium-review.googlesource.com/462479
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
10 files changed