aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/fb.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-10-07 09:47:58 +0200
committerThierry Reding <treding@nvidia.com>2013-10-31 09:55:46 +0100
commitdb7fbdfd25ee009165b6c3b80a9d1c6d8534ad94 (patch)
tree1ba0c25b63b227a7f139b03ae217daf0b7ec1f81 /drivers/gpu/drm/tegra/fb.c
parentdrm/tegra: Add support for tiled buffer objects (diff)
downloadlinux-dev-db7fbdfd25ee009165b6c3b80a9d1c6d8534ad94.tar.xz
linux-dev-db7fbdfd25ee009165b6c3b80a9d1c6d8534ad94.zip
drm/tegra: Support bottom-up buffer objects
The gr3d engine renders images bottom-up. Allow buffers that are used for 3D content to be marked as such and implement support in the display controller to present them properly. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/fb.c')
-rw-r--r--drivers/gpu/drm/tegra/fb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
index fdb00e040046..490f7719e317 100644
--- a/drivers/gpu/drm/tegra/fb.c
+++ b/drivers/gpu/drm/tegra/fb.c
@@ -34,6 +34,16 @@ struct tegra_bo *tegra_fb_get_plane(struct drm_framebuffer *framebuffer,
return fb->planes[index];
}
+bool tegra_fb_is_bottom_up(struct drm_framebuffer *framebuffer)
+{
+ struct tegra_fb *fb = to_tegra_fb(framebuffer);
+
+ if (fb->planes[0]->flags & TEGRA_BO_BOTTOM_UP)
+ return true;
+
+ return false;
+}
+
bool tegra_fb_is_tiled(struct drm_framebuffer *framebuffer)
{
struct tegra_fb *fb = to_tegra_fb(framebuffer);