mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
drm/amd/display: fix calculation for the pwl backlight curve
[Why] The PWL backlight curve is used by the firmware to convert between brightness and linear PWM value. Driver has a backlight LUT, but the firmware holds a PWL curve and interpolates between points. The calculations are incorrect leading to slightly off backlight values being programmed. [How] Fix the PWL backlight curve threshold/offset calculations Signed-off-by: Anthony Koo <Anthony.Koo@amd.com> Reviewed-by: Josip Pavic <Josip.Pavic@amd.com> Acked-by: Anson Jacob <Anson.Jacob@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
b99844e423
commit
4fa6a75128
1 changed files with 1 additions and 1 deletions
|
@ -266,7 +266,7 @@ static void fill_backlight_transform_table_v_2_2(struct dmcu_iram_parameters par
|
|||
* format U4.10.
|
||||
*/
|
||||
for (i = 1; i+1 < num_entries; i++) {
|
||||
lut_index = (params.backlight_lut_array_size - 1) * i / (num_entries - 1);
|
||||
lut_index = DIV_ROUNDUP((i * params.backlight_lut_array_size), num_entries);
|
||||
ASSERT(lut_index < params.backlight_lut_array_size);
|
||||
|
||||
table->backlight_thresholds[i] = (big_endian) ?
|
||||
|
|
Loading…
Reference in a new issue