提交 08616da5 编写于 作者: L Leo (Sunpeng) Li 提交者: Alex Deucher

drm/amd/display: Use hardware max low point when sampling OTF

The MAX_LOW_POINT macro should reflect the maximum low point within
hardware. Otherwise, sampling for the hardware points from the output
transfer function (OTF) will be incorrect.

Also, fix usage of MAX_LOW_POINT accordingly.
Signed-off-by: NLeo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: NKrunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: NHarry Wentland <harry.wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 3a97f3ff
...@@ -409,7 +409,7 @@ static bool convert_to_custom_float(struct pwl_result_data *rgb_resulted, ...@@ -409,7 +409,7 @@ static bool convert_to_custom_float(struct pwl_result_data *rgb_resulted,
return true; return true;
} }
#define MAX_LOW_POINT 11 #define MAX_LOW_POINT 25
#define NUMBER_REGIONS 16 #define NUMBER_REGIONS 16
#define NUMBER_SW_SEGMENTS 16 #define NUMBER_SW_SEGMENTS 16
...@@ -443,8 +443,8 @@ dce110_translate_regamma_to_hw_format(const struct dc_transfer_func *output_tf, ...@@ -443,8 +443,8 @@ dce110_translate_regamma_to_hw_format(const struct dc_transfer_func *output_tf,
/* 16 segments /* 16 segments
* segments are from 2^-11 to 2^5 * segments are from 2^-11 to 2^5
*/ */
region_start = -MAX_LOW_POINT; region_start = -11;
region_end = NUMBER_REGIONS - MAX_LOW_POINT; region_end = region_start + NUMBER_REGIONS;
for (i = 0; i < NUMBER_REGIONS; i++) for (i = 0; i < NUMBER_REGIONS; i++)
seg_distr[i] = 4; seg_distr[i] = 4;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册