summaryrefslogtreecommitdiff
path: root/include/video
diff options
context:
space:
mode:
authorDavid Schalig <dschalig@nvidia.com>2011-10-06 20:24:07 +0900
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:14 -0800
commit80225d4761a7afb4ad16cc2a15e5c5ac16283d30 (patch)
tree2153cc57461ceb3eb0cbab664c67f2b3c3b533c4 /include/video
parentf8b65fb54494b360a3263cc4176a7f1f47277c45 (diff)
video: tegra: dc: add ioctl for setting gamma lut
Adds ioctl TEGRA_DC_EXT_SET_LUT to dc_ext driver for setting a DC window's color palette. Bug 868060 Change-Id: I57ffcf3a3f91e76efd1c7f1f972b73c2edbaed82 Reviewed-on: http://git-master/r/56392 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Rebase-Id: R712c71151d0c3e3d274279f334bedf312e26e75d
Diffstat (limited to 'include/video')
-rw-r--r--include/video/tegra_dc_ext.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/video/tegra_dc_ext.h b/include/video/tegra_dc_ext.h
index bdfebaeb3c9a..77d4e62d70f6 100644
--- a/include/video/tegra_dc_ext.h
+++ b/include/video/tegra_dc_ext.h
@@ -164,6 +164,29 @@ struct tegra_dc_ext_csc {
__u16 kvb; /* s.2.8 */
};
+/*
+ * RGB Lookup table
+ *
+ * In true-color and YUV modes this is used for post-CSC RGB->RGB lookup, i.e.
+ * gamma-correction. In palette-indexed RGB modes, this table designates the
+ * mode's color palette.
+ *
+ * To convert 8-bit per channel RGB values to 16-bit, duplicate the 8 bits
+ * in low and high byte, e.g. r=r|(r<<8)
+ *
+ * Current Tegra DC hardware supports 8-bit per channel to 8-bit per channel,
+ * and each hardware window (overlay) uses its own lookup table.
+ *
+ */
+struct tegra_dc_ext_lut {
+ __u32 win_index; /* window index to set lut for */
+ __u32 start; /* start index to update lut from */
+ __u32 len; /* number of valid lut entries */
+ __u16* r; /* array of size 16-bit red values */
+ __u16* g; /* array of size 16-bit green values */
+ __u16* b; /* array of size 16-bit blue values */
+};
+
#define TEGRA_DC_EXT_FLAGS_ENABLED 1
struct tegra_dc_ext_status {
@@ -205,6 +228,8 @@ struct tegra_dc_ext_status {
#define TEGRA_DC_EXT_GET_VBLANK_SYNCPT \
_IOR('D', 0x09, __u32)
+#define TEGRA_DC_EXT_SET_LUT \
+ _IOR('D', 0x0A, struct tegra_dc_ext_lut)
enum tegra_dc_ext_control_output_type {
TEGRA_DC_EXT_DSI,