summaryrefslogtreecommitdiff
path: root/include/video
diff options
context:
space:
mode:
authorKevin Huang <kevinh@nvidia.com>2013-01-25 11:31:17 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 13:00:24 -0700
commit734193988a64ddc3bc233519bc908973866255b8 (patch)
treedebd9022d93cb03b67ffe181045b62aba4c529eb /include/video
parentfcde04fd31e2d18a7e1762ea73dc66bba74fcf85 (diff)
video: tegra: dc: add advanced cursor support
Support advanced display cursor for t11x and t14x. For t14x, window H is set to window mode by default in the sense that cursor is not necessary for most phones. It can be switched to cursor mode as below. echo 0 > /sys/class/graphics/fb0/device/win_h To switch cursor between normal and legacy mode, user can set flag of tegra_dc_ext_cursor through the ioctl TEGRA_DC_EXT_SET_CURSOR. Change-Id: If5ef50401b8a2b2fd22500636d07506983aee0b5 Signed-off-by: Kevin Huang <kevinh@nvidia.com> Reviewed-on: http://git-master/r/194210 Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com> Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>
Diffstat (limited to 'include/video')
-rw-r--r--include/video/tegra_dc_ext.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/video/tegra_dc_ext.h b/include/video/tegra_dc_ext.h
index edb0f6565782..e42537d378ca 100644
--- a/include/video/tegra_dc_ext.h
+++ b/include/video/tegra_dc_ext.h
@@ -132,8 +132,14 @@ struct tegra_dc_ext_flip_2 {
* 0 1 foreground color
* - Exactly one of the SIZE flags must be specified.
*/
-#define TEGRA_DC_EXT_CURSOR_IMAGE_FLAGS_SIZE_32x32 1
-#define TEGRA_DC_EXT_CURSOR_IMAGE_FLAGS_SIZE_64x64 2
+
+#define TEGRA_DC_EXT_CURSOR_IMAGE_FLAGS_SIZE_32x32 ((1 & 0x7) << 0)
+#define TEGRA_DC_EXT_CURSOR_IMAGE_FLAGS_SIZE_64x64 ((2 & 0x7) << 0)
+#define TEGRA_DC_EXT_CURSOR_IMAGE_FLAGS_SIZE_128x128 ((3 & 0x7) << 0)
+#define TEGRA_DC_EXT_CURSOR_IMAGE_FLAGS_SIZE_256x256 ((4 & 0x7) << 0)
+#define TEGRA_DC_EXT_CURSOR_IMAGE_FLAGS_SIZE(x) (((x) & 0x7) >> 0)
+#define TEGRA_DC_EXT_CURSOR_FLAGS_2BIT_LEGACY (0 << 16)
+#define TEGRA_DC_EXT_CURSOR_FLAGS_RGBA_NORMAL (1 << 16)
struct tegra_dc_ext_cursor_image {
struct {
__u8 r;
@@ -145,7 +151,7 @@ struct tegra_dc_ext_cursor_image {
};
/* Possible flags for struct nvdc_cursor's flags field */
-#define TEGRA_DC_EXT_CURSOR_FLAGS_VISIBLE 1
+#define TEGRA_DC_EXT_CURSOR_FLAGS_VISIBLE (1 << 0)
struct tegra_dc_ext_cursor {
__s16 x;