diff options
author | Robert Morell <rmorell@nvidia.com> | 2011-02-18 15:51:38 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:48:12 -0800 |
commit | cd42c053c598d720c12ca8d2e13715ee490f6717 (patch) | |
tree | 60b8098504ecc8b1ee6524f5df22e1151072a570 /include/video | |
parent | 5197ed5e5f11b4f77bdcf9020a01bada5db45f1a (diff) |
video: tegra: Add cursor support to dc extensions
This change adds full support for specify the cursor image and
manipulating its position.
bug 818525
Original-Change-Id: I101a951aff358b0ac0998afc6fe5f6c5c4d37c64
Signed-off-by: Robert Morell <rmorell@nvidia.com>
Reviewed-on: http://git-master/r/40518
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R93f0c68a14e4419f200a77d48a17eb8862f2e4e1
Diffstat (limited to 'include/video')
-rw-r--r-- | include/video/tegra_dc_ext.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/video/tegra_dc_ext.h b/include/video/tegra_dc_ext.h index 346825aa4147..f9935ef8c04f 100644 --- a/include/video/tegra_dc_ext.h +++ b/include/video/tegra_dc_ext.h @@ -89,6 +89,42 @@ struct tegra_dc_ext_flip { __u32 post_syncpt_val; }; +/* + * Cursor image format: + * - Tegra hardware supports two colors: foreground and background, specified + * by the client in RGB8. + * - The image should be specified as two 1bpp bitmaps immediately following + * each other in memory. Each pixel in the final cursor will be constructed + * from the bitmaps with the following logic: + * bitmap1 bitmap0 + * (mask) (color) + * 1 0 transparent + * 1 1 inverted + * 0 0 background color + * 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 +struct tegra_dc_ext_cursor_image { + struct { + __u8 r; + __u8 g; + __u8 b; + } foreground, background; + __u32 buff_id; + __u32 flags; +}; + +/* Possible flags for struct nvdc_cursor's flags field */ +#define TEGRA_DC_EXT_CURSOR_FLAGS_VISIBLE 1 + +struct tegra_dc_ext_cursor { + __s16 x; + __s16 y; + __u32 flags; +}; + #define TEGRA_DC_EXT_SET_NVMAP_FD \ _IOW('D', 0x00, __s32) @@ -100,5 +136,13 @@ struct tegra_dc_ext_flip { #define TEGRA_DC_EXT_FLIP \ _IOWR('D', 0x03, struct tegra_dc_ext_flip) +#define TEGRA_DC_EXT_GET_CURSOR \ + _IO('D', 0x04) +#define TEGRA_DC_EXT_PUT_CURSOR \ + _IO('D', 0x05) +#define TEGRA_DC_EXT_SET_CURSOR_IMAGE \ + _IOW('D', 0x06, struct tegra_dc_ext_cursor_image) +#define TEGRA_DC_EXT_SET_CURSOR \ + _IOW('D', 0x07, struct tegra_dc_ext_cursor) #endif /* __TEGRA_DC_EXT_H */ |