drm/amd/display: Define dithering options
authorDing Wang <Ding.Wang@amd.com>
Wed, 12 Apr 2017 19:29:13 +0000 (15:29 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 22:06:41 +0000 (18:06 -0400)
Signed-off-by: Ding Wang <Ding.Wang@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dc_hw_types.h

index 647c095e0ae9b932db19d74808ed7cd2c0afef6d..dd8902d28ee173397f548330138f3bebc6911db2 100644 (file)
@@ -430,6 +430,7 @@ struct dc_stream {
        enum signal_type output_signal;
 
        enum dc_color_space output_color_space;
+       enum dc_dither_option dither_option;
 
        struct rect src; /* composition area */
        struct rect dst; /* stream addressable area */
@@ -444,7 +445,6 @@ struct dc_stream {
        struct colorspace_transform gamut_remap_matrix;
        struct csc_transform csc_color_matrix;
 
-       /* TODO: dithering */
        /* TODO: custom INFO packets */
        /* TODO: ABM info (DMCU) */
        /* TODO: PSR info */
index 64d43dba8fd6461f5789ed9213e791729fa7c707..1a7ce061258f1ca6639d922c8606e88202ffc5ae 100644 (file)
@@ -484,6 +484,35 @@ enum dc_color_space {
        COLOR_SPACE_ADOBERGB,
 };
 
+enum dc_dither_option {
+       DITHER_OPTION_DEFAULT,
+       DITHER_OPTION_DISABLE,
+       DITHER_OPTION_FM6,
+       DITHER_OPTION_FM8,
+       DITHER_OPTION_FM10,
+       DITHER_OPTION_SPATIAL6_FRAME_RANDOM,
+       DITHER_OPTION_SPATIAL8_FRAME_RANDOM,
+       DITHER_OPTION_SPATIAL10_FRAME_RANDOM,
+       DITHER_OPTION_SPATIAL6,
+       DITHER_OPTION_SPATIAL8,
+       DITHER_OPTION_SPATIAL10,
+       DITHER_OPTION_TRUN6,
+       DITHER_OPTION_TRUN8,
+       DITHER_OPTION_TRUN10,
+       DITHER_OPTION_TRUN10_SPATIAL8,
+       DITHER_OPTION_TRUN10_SPATIAL6,
+       DITHER_OPTION_TRUN10_FM8,
+       DITHER_OPTION_TRUN10_FM6,
+       DITHER_OPTION_TRUN10_SPATIAL8_FM6,
+       DITHER_OPTION_SPATIAL10_FM8,
+       DITHER_OPTION_SPATIAL10_FM6,
+       DITHER_OPTION_TRUN8_SPATIAL6,
+       DITHER_OPTION_TRUN8_FM6,
+       DITHER_OPTION_SPATIAL8_FM6,
+       DITHER_OPTION_MAX = DITHER_OPTION_SPATIAL8_FM6,
+       DITHER_OPTION_INVALID
+};
+
 enum dc_quantization_range {
        QUANTIZATION_RANGE_UNKNOWN,
        QUANTIZATION_RANGE_FULL,