diff options
| author | Anshuman Kar <anshumank@nvidia.com> | 2017-05-02 14:22:44 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-31 17:53:36 -0400 |
| commit | 930bec30c6d987980148a84df9915d3841bdb988 (patch) | |
| tree | 38d5ddbb65dad2a43ed5ee06fc9b6616a7b8a44f /include/video | |
| parent | 8aea400004cdc728dc867d289199fadbc75ef15b (diff) | |
dc: Add support to toggle cmu from flip
Adding kernel support for toggling the following
display component:
cmu_v2 (per head)
- Add support for turning on/off as well
as adding support to modify the lut from
userspace
TDS-2156
Change-Id: Ic0304710777afa3c1a40396ff23a3770d3a5dbab
Signed-off-by: Anshuman Kar <anshumank@nvidia.com>
Reviewed-on: http://git-master/r/1482030
(cherry picked from commit 98b83486c7058eed5c6bb86415ef1eb3af7b79e5)
Reviewed-on: http://git-master/r/1479094
(cherry-picked from commit 6c1d4f8d5cd318f9b4f49aa82923cc8e37372585)
Reviewed-on: http://git-master/r/1473787
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ujwal Patel <ujwalp@nvidia.com>
Diffstat (limited to 'include/video')
| -rw-r--r-- | include/video/tegra_dc_ext.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/include/video/tegra_dc_ext.h b/include/video/tegra_dc_ext.h index 606e4cb26..b98ff0813 100644 --- a/include/video/tegra_dc_ext.h +++ b/include/video/tegra_dc_ext.h | |||
| @@ -154,6 +154,7 @@ | |||
| 154 | #define TEGRA_DC_EXT_FLIP_FLAG_DEGAMMA_SRGB (2 << 16) | 154 | #define TEGRA_DC_EXT_FLIP_FLAG_DEGAMMA_SRGB (2 << 16) |
| 155 | #define TEGRA_DC_EXT_FLIP_FLAG_DEGAMMA_YUV_8_10 (4 << 16) | 155 | #define TEGRA_DC_EXT_FLIP_FLAG_DEGAMMA_YUV_8_10 (4 << 16) |
| 156 | #define TEGRA_DC_EXT_FLIP_FLAG_DEGAMMA_YUV_12 (8 << 16) | 156 | #define TEGRA_DC_EXT_FLIP_FLAG_DEGAMMA_YUV_12 (8 << 16) |
| 157 | /*End of window specific flip flags*/ | ||
| 157 | /*Passthrough condition for running 4K HDMI*/ | 158 | /*Passthrough condition for running 4K HDMI*/ |
| 158 | #define TEGRA_DC_EXT_FLIP_HEAD_FLAG_YUVBYPASS (1 << 0) | 159 | #define TEGRA_DC_EXT_FLIP_HEAD_FLAG_YUVBYPASS (1 << 0) |
| 159 | #define TEGRA_DC_EXT_FLIP_HEAD_FLAG_VRR_MODE (1 << 1) | 160 | #define TEGRA_DC_EXT_FLIP_HEAD_FLAG_VRR_MODE (1 << 1) |
| @@ -162,6 +163,16 @@ | |||
| 162 | /* Flag for HDR_DATA handling */ | 163 | /* Flag for HDR_DATA handling */ |
| 163 | #define TEGRA_DC_EXT_FLIP_FLAG_HDR_ENABLE (1 << 0) | 164 | #define TEGRA_DC_EXT_FLIP_FLAG_HDR_ENABLE (1 << 0) |
| 164 | #define TEGRA_DC_EXT_FLIP_FLAG_HDR_DATA_UPDATED (1 << 1) | 165 | #define TEGRA_DC_EXT_FLIP_FLAG_HDR_DATA_UPDATED (1 << 1) |
| 166 | /* | ||
| 167 | * Following flag is used when TEGRA_DC_EXT_FLIP_USER_DATA_CMU_V2 is used. | ||
| 168 | * FLAG_CMU_V2_UPDATE: this flag is valid only when | ||
| 169 | * tegra_dc_ext_cmu_v2.cmu_enable = true. | ||
| 170 | * If flag is present, driver will update LUT | ||
| 171 | * values provided from userspace. | ||
| 172 | * If flag is not present then driver will program LUT | ||
| 173 | * from cached values. | ||
| 174 | */ | ||
| 175 | #define TEGRA_DC_EXT_FLIP_FLAG_UPDATE_CMU_V2 (1 << 0) | ||
| 165 | /* Flags for post-syncpt handling */ | 176 | /* Flags for post-syncpt handling */ |
| 166 | /* Bits 1:0 are reserved for the post-syncpt type */ | 177 | /* Bits 1:0 are reserved for the post-syncpt type */ |
| 167 | #define TEGRA_DC_EXT_FLIP_FLAG_POST_SYNCPT_TYPE_SHIFT 0 | 178 | #define TEGRA_DC_EXT_FLIP_FLAG_POST_SYNCPT_TYPE_SHIFT 0 |
| @@ -392,6 +403,7 @@ enum tegra_dc_ext_flip_data_type { | |||
| 392 | TEGRA_DC_EXT_FLIP_USER_DATA_IMP_TAG, /* only valid during FLIP */ | 403 | TEGRA_DC_EXT_FLIP_USER_DATA_IMP_TAG, /* only valid during FLIP */ |
| 393 | TEGRA_DC_EXT_FLIP_USER_DATA_POST_SYNCPT, | 404 | TEGRA_DC_EXT_FLIP_USER_DATA_POST_SYNCPT, |
| 394 | TEGRA_DC_EXT_FLIP_USER_DATA_CSC_V2, | 405 | TEGRA_DC_EXT_FLIP_USER_DATA_CSC_V2, |
| 406 | TEGRA_DC_EXT_FLIP_USER_DATA_CMU_V2, | ||
| 395 | }; | 407 | }; |
| 396 | 408 | ||
| 397 | /* | 409 | /* |
| @@ -520,6 +532,11 @@ struct tegra_dc_ext_udata_csc_v2 { | |||
| 520 | __u8 reserved[17]; | 532 | __u8 reserved[17]; |
| 521 | } __attribute__((__packed__)); | 533 | } __attribute__((__packed__)); |
| 522 | 534 | ||
| 535 | struct tegra_dc_ext_udata_cmu_v2 { | ||
| 536 | __u64 __user cmu_v2; /* pointer to "tegra_dc_ext_cmu_v2" */ | ||
| 537 | __u8 reserved[18]; | ||
| 538 | } __attribute__((__packed__)); | ||
| 539 | |||
| 523 | /* size of the this struct is 32 bytes */ | 540 | /* size of the this struct is 32 bytes */ |
| 524 | struct tegra_dc_ext_flip_user_data { | 541 | struct tegra_dc_ext_flip_user_data { |
| 525 | __u8 data_type; | 542 | __u8 data_type; |
| @@ -534,6 +551,7 @@ struct tegra_dc_ext_flip_user_data { | |||
| 534 | struct tegra_dc_ext_imp_flip_tag imp_tag; | 551 | struct tegra_dc_ext_imp_flip_tag imp_tag; |
| 535 | struct tegra_dc_ext_syncpt post_syncpt; /* out */ | 552 | struct tegra_dc_ext_syncpt post_syncpt; /* out */ |
| 536 | struct tegra_dc_ext_udata_csc_v2 csc_v2; | 553 | struct tegra_dc_ext_udata_csc_v2 csc_v2; |
| 554 | struct tegra_dc_ext_udata_cmu_v2 cmu_v2; | ||
| 537 | }; | 555 | }; |
| 538 | } __attribute__((__packed__)); | 556 | } __attribute__((__packed__)); |
| 539 | 557 | ||
| @@ -841,8 +859,8 @@ struct tegra_dc_ext_cmu { | |||
| 841 | struct tegra_dc_ext_cmu_v2 { | 859 | struct tegra_dc_ext_cmu_v2 { |
| 842 | __u16 cmu_enable; | 860 | __u16 cmu_enable; |
| 843 | __u16 lut_size; | 861 | __u16 lut_size; |
| 844 | __u16 lut_range; | 862 | __u16 lut_range; /* ignored in the driver */ |
| 845 | __u16 lut_mode; | 863 | __u16 lut_mode; /* ignored in the driver */ |
| 846 | __u64 rgb[TEGRA_DC_EXT_LUT_SIZE_1025 + 1]; | 864 | __u64 rgb[TEGRA_DC_EXT_LUT_SIZE_1025 + 1]; |
| 847 | }; | 865 | }; |
| 848 | 866 | ||
