Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: fix transfer function passed to build_coefficients()

The default argument should be enum TRANSFER_FUNCTION_SRGB rather than
the current boolean value which improperly maps to
TRANSFER_FUNCTION_BT709.

Commit 9b3d76527f6e ("drm/amd/display: Revert adding degamma coefficients")
looks to have improperly reverted
commit d02097095916 ("drm/amd/display: Add regamma/degamma coefficients and set sRGB when TF is BT709")
replacing the enum value with a boolean value.

Cc: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Cc: Jaehyun Chung <jaehyun.chung@amd.com>
Cc: Zeng Heng <zengheng4@huawei.com>
Fixes: 9b3d76527f6e ("drm/amd/display: Revert adding degamma coefficients")
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+1 -1
+1 -1
drivers/gpu/drm/amd/display/modules/color/color_gamma.c
··· 1692 1692 struct pwl_float_data_ex *rgb = rgb_regamma; 1693 1693 const struct hw_x_point *coord_x = coordinates_x; 1694 1694 1695 - build_coefficients(&coeff, true); 1695 + build_coefficients(&coeff, TRANSFER_FUNCTION_SRGB); 1696 1696 1697 1697 i = 0; 1698 1698 while (i != hw_points_num + 1) {