omap_dumb: cleanup some getters

struct omap_bo has two kinds of "getters" (functions that return a field
value from the struct omap_bo):
 (a) simple getters (_width, _height, ...) just return a value.
 (b) getters with side-effects.  These will return a value if the
corresponding field has already been populated.  Otherwise, they will
first populate the field by calling a libdrm API.

For the type (b) getters, let's have them indicate an error during field
population by returning 0 (or NULL).  This works because 0 (NULL) is
never valid values for these fields to have, and the calling functions
never really care *why* the getter failed.

In summary, this patch makes the following changes:
 . return value immediately if already populated
 . return field value directly instead of taking in an input parameter
 . return 0 (or NULL) on error
 . use a temporary variable instead of assigning directly to struct fields

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>

BUG=chromium:272670
TEST=sanity check UI, inspect /var/log/Xorg.0.log with DEBUG enabled in
 /etc/X11/xorg/xorg.conf.d/exynos.conf

Change-Id: I56a0abe65e7cd6a35fb6d694ba9406efe291b1b9
Reviewed-on: https://chromium-review.googlesource.com/190691
Reviewed-by: John Sheu <sheu@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
4 files changed