diff options
author | David Schalig <dschalig@nvidia.com> | 2011-10-06 20:24:07 +0900 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 01:21:01 -0700 |
commit | dcc68d0411013cf282c51db7aa1b365ea5f8af20 (patch) | |
tree | 1d6782c04959729600bca0d9b3fa2b2677c722c0 /include/video | |
parent | bea7ee4aad1ad1edc56f94aef1ef543ffc41c3fc (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.h | 25 |
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, |