OSDN Git Service

drm/amd/display: Fix increment when sampling OTF in DCE
authorLeo (Sunpeng) Li <sunpeng.li@amd.com>
Fri, 9 Feb 2018 17:51:01 +0000 (12:51 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Feb 2018 19:20:17 +0000 (14:20 -0500)
Previously, the number of software segmets per region was reduced to 16.
This needs to be reflected in the sampling distance (increment) used when
translating to the hardware format.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

index bc69864..0422c72 100644 (file)
@@ -481,7 +481,7 @@ dce110_translate_regamma_to_hw_format(const struct dc_transfer_func *output_tf,
 
        j = 0;
        for (k = 0; k < (region_end - region_start); k++) {
-               increment = 32 / (1 << seg_distr[k]);
+               increment = NUMBER_SW_SEGMENTS / (1 << seg_distr[k]);
                start_index = (region_start + k + MAX_LOW_POINT) *
                                NUMBER_SW_SEGMENTS;
                for (i = start_index; i < start_index + NUMBER_SW_SEGMENTS;