drm/tegra: Implement more tiling modes

Tegra124 supports a block-linear mode in addition to the regular pitch
linear and tiled modes. Add support for these by moving the internal
representation into a structure rather than a simple flag.

Tested-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
Thierry Reding
2014-06-03 14:48:12 +02:00
parent 0c6b1e4ba7
commit c134f019ab
6 changed files with 120 additions and 26 deletions

View File

@@ -46,14 +46,15 @@ bool tegra_fb_is_bottom_up(struct drm_framebuffer *framebuffer)
return false;
}
bool tegra_fb_is_tiled(struct drm_framebuffer *framebuffer)
int tegra_fb_get_tiling(struct drm_framebuffer *framebuffer,
struct tegra_bo_tiling *tiling)
{
struct tegra_fb *fb = to_tegra_fb(framebuffer);
if (fb->planes[0]->flags & TEGRA_BO_TILED)
return true;
/* TODO: handle YUV formats? */
*tiling = fb->planes[0]->tiling;
return false;
return 0;
}
static void tegra_fb_destroy(struct drm_framebuffer *framebuffer)