summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Morell <rmorell@nvidia.com>2011-10-11 16:14:25 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:50:24 -0800
commit36284052749cecb6e41236749e60ad013e9453e9 (patch)
tree8e30b2a3e58d91ec4f69f13dd0d3dc268b3433aa
parent9ed4ddd22b9861947e37534d172ba0eaf462257e (diff)
video: tegra: Add support for tiled surfaces
This adds a new flags field to the dc_ext flip ioctl, adds a flag for tiled surfaces, and updates the ioctl handling code to set the appropriate core dc tiling flag when the dc_ext tiled flag is passed. Bug 831397 Change-Id: I36cbf4a59173885a98209e559f77404bddcf54cd Reviewed-on: http://git-master/r/64109 Reviewed-by: Michael Frydrych <mfrydrych@nvidia.com> Tested-by: Michael Frydrych <mfrydrych@nvidia.com> Reviewed-by: Markus Holtmanns <mholtmanns@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: Robert Morell <rmorell@nvidia.com> Rebase-Id: Rf741be9e6945b6b92699e26fb1745fafef4d8fe4
-rw-r--r--drivers/video/tegra/dc/ext/dev.c2
-rw-r--r--include/video/tegra_dc_ext.h7
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/video/tegra/dc/ext/dev.c b/drivers/video/tegra/dc/ext/dev.c
index a6290d4701ce..8ac008b072ad 100644
--- a/drivers/video/tegra/dc/ext/dev.c
+++ b/drivers/video/tegra/dc/ext/dev.c
@@ -189,6 +189,8 @@ static int tegra_dc_ext_set_windowattr(struct tegra_dc_ext *ext,
win->flags |= TEGRA_WIN_FLAG_BLEND_PREMULT;
else if (flip_win->attr.blend == TEGRA_DC_EXT_BLEND_COVERAGE)
win->flags |= TEGRA_WIN_FLAG_BLEND_COVERAGE;
+ if (flip_win->attr.flags & TEGRA_DC_EXT_FLIP_FLAG_TILED)
+ win->flags |= TEGRA_WIN_FLAG_TILED;
win->fmt = flip_win->attr.pixformat;
win->x.full = flip_win->attr.x;
win->y.full = flip_win->attr.y;
diff --git a/include/video/tegra_dc_ext.h b/include/video/tegra_dc_ext.h
index 380b026701d7..2c4ce57e5c00 100644
--- a/include/video/tegra_dc_ext.h
+++ b/include/video/tegra_dc_ext.h
@@ -55,6 +55,8 @@
#define TEGRA_DC_EXT_BLEND_PREMULT 1
#define TEGRA_DC_EXT_BLEND_COVERAGE 2
+#define TEGRA_DC_EXT_FLIP_FLAG_TILED (1 << 2)
+
struct tegra_dc_ext_flip_windowattr {
__s32 index;
__u32 buff_id;
@@ -82,11 +84,12 @@ struct tegra_dc_ext_flip_windowattr {
struct timespec timestamp;
__u32 pre_syncpt_id;
__u32 pre_syncpt_val;
- /* These are optional; if zero, U and V are taken from buff_id */
+ /* These two are optional; if zero, U and V are taken from buff_id */
__u32 buff_id_u;
__u32 buff_id_v;
+ __u32 flags;
/* Leave some wiggle room for future expansion */
- __u32 pad[6];
+ __u32 pad[5];
};
#define TEGRA_DC_EXT_FLIP_N_WINDOWS 3