OSDN Git Service

minigbm: work with strides, not widths
authorGurchetan Singh <gurchetansingh@chromium.org>
Wed, 29 Mar 2017 15:23:40 +0000 (08:23 -0700)
committerchrome-bot <chrome-bot@chromium.org>
Fri, 31 Mar 2017 04:21:54 +0000 (21:21 -0700)
commit6423ecbecac4ca1f376d2b36bc3b7f391ea7761e
tree04e5d529fade942085186b722c7fe3f0f45f4089
parent4f298f9fd2801512199416bbbbb916777179c5b5
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>
amdgpu.c
cros_gralloc/cros_alloc_device.cc
drv.c
drv.h
helpers.c
helpers.h
i915.c
mediatek.c
rockchip.c
vc4.c