]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/amd/display: Add some tm3dlut flags
authorVitaly Prosyak <vitaly.prosyak@amd.com>
Tue, 26 Mar 2019 22:34:00 +0000 (17:34 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 22 Jun 2019 14:34:09 +0000 (09:34 -0500)
Move flags from color_gamma.h to mod_shared.h
and add more options and setting structures

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Acked-by: Vitaly Prosyak <Vitaly.Prosyak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/color/color_gamma.h
drivers/gpu/drm/amd/display/modules/inc/mod_shared.h

index c56c203abfcba7565fa59099a71136fb194fd7cc..369953fafadfdb0cdb8390373f4d12f32b035998 100644 (file)
@@ -82,18 +82,6 @@ struct freesync_hdr_tf_params {
        unsigned int skip_tm; // skip tm
 };
 
-union tm3dlut_flags {
-       unsigned int raw;
-       struct {
-               unsigned int dochroma_scale                     :1;
-               unsigned int spec_version                       :3;
-               unsigned int less_than_dcip3                    :1;
-               unsigned int exp_shaper_max                     :6;
-               unsigned int zero_display_black                 :1;
-               unsigned int reseved                            :20;
-       } bits;
-};
-
 void setup_x_points_distribution(void);
 void precompute_pq(void);
 void precompute_de_pq(void);
index b711e7e6c2044ef39313a6b280cbf83fc5fa1539..5a631854efdad36c83f866dbca5f7611926cff63 100644 (file)
@@ -45,5 +45,42 @@ enum vrr_packet_type {
        PACKET_TYPE_VTEM
 };
 
+#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
+union tm3dlut_internal_flags {
+       unsigned int raw;
+       struct {
+               unsigned int dochroma_scale                     :1;
+               unsigned int spec_version                       :3;
+               unsigned int use_zero_display_black  :1;
+               unsigned int use_zero_source_black  :1;
+               unsigned int force_display_black                :6;
+               unsigned int apply_display_gamma        :1;
+               unsigned int exp_shaper_max                     :6;
+               unsigned int unity3dlut                         :1;
+               unsigned int bypass3dlut                        :1;
+               unsigned int use3dlut                           :1;
+               unsigned int less_than_dcip3            :1;
+               unsigned int override_lum                       :1;
+               unsigned int reseved                            :8;
+       } bits;
+};
+
+enum tm_show_option_internal {
+       tm_show_option_internal_single_file             = 0,/*flags2 not in use*/
+       tm_show_option_internal_duplicate_file,/*use flags2*/
+       tm_show_option_internal_duplicate_sidebyside/*use flags2*/
+};
+
+struct tm3dlut_settings {
+       unsigned char version;
+       union tm3dlut_internal_flags flags;
+       union tm3dlut_internal_flags flags2;
+       enum tm_show_option_internal option;
+       unsigned int min_lum;/*multiplied by 100*/
+       unsigned int max_lum;
+       unsigned int min_lum2;
+       unsigned int max_lum2;
+};
+#endif
 
 #endif /* MOD_SHARED_H_ */