]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/display: Re-add custom degamma support
authorDavid Francis <David.Francis@amd.com>
Mon, 11 Feb 2019 19:15:19 +0000 (14:15 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Mar 2019 20:04:03 +0000 (15:04 -0500)
[Why]
The dc_gamma_type CUSTOM_GAMMA is used to represent degamma
mappings passed in by drm. This type of gamma must be interpolated
into a transfer function by apply_1d_lut.  The line in
mod_color_calculate_degamma_params that handled this case
was erroneously removed.

[How]
For CUSTOM_GAMMA degamma, calculate the lut as before.

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/color/color_gamma.c

index 0fbc8fbc354160e66b6a8cfc75b228241723b326..a1055413bade66242a6637389deece2c9aba1695 100644 (file)
@@ -1854,6 +1854,8 @@ bool mod_color_calculate_degamma_params(struct dc_transfer_func *input_tf,
                        coordinates_x, axis_x, curve,
                        MAX_HW_POINTS, tf_pts,
                        mapUserRamp && ramp && ramp->type == GAMMA_RGB_256);
+       if (ramp->type == GAMMA_CUSTOM)
+               apply_lut_1d(ramp, MAX_HW_POINTS, tf_pts);
 
        ret = true;