OSDN Git Service

tegra: Support tiled buffers
authorLauri Peltonen <lpeltonen@nvidia.com>
Thu, 18 Dec 2014 07:01:37 +0000 (23:01 -0800)
committerStéphane Marchesin <marcheu@chromium.org>
Mon, 12 Jan 2015 20:07:24 +0000 (20:07 +0000)
commit7842d8fdd9555a9f64188d492e3d9e643f267cb8
tree69292e7253b2045e39cca8a7e2523a37caf35f51
parentd224eaa75e53fbe273b90b9e4fc8f8da8acc321f
tegra: Support tiled buffers

If GBM_BO_USE_RENDERING flag is passed, allocate tiled buffers.  Add logic
to the Tegra backend to compute tiled buffer dimensions and tiling
parameters (kind and block height).

The tiling parameters must somehow be passed to EGL at EGLImage creation.
The long term plan is to introduce an extensible structure that can contain
arbitrary vendor specific metadata.  For now, we abuse the PITCH attribute
to pass tiling parameters.

Add a new GBM utility function gbm_bo_get_stride_or_tiling, which returns
either the tiling parameters or byte pitch, depending whether the buffer
is tiled or not.

The Nvidia term for our tiled layout is "blocklinear".

BUG=None
TEST=null_platform_test on Tegra

Change-Id: I4e0226efa401b08f7e4a009a7f74b3453c622a10
Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/236663
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
gbm.c
gbm.h
gbm_priv.h
tegra.c