Skip to contentSkip to conversation

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

PATCH In review Alex Deucher 3 participants 3 messages Sep 19, 2022 – Oct 11, 2022

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 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 <[email protected]>
Cc Jaehyun Chung <[email protected]>
Cc Zeng Heng <[email protected]>
Fixes 9b3d76527f6e ("drm/amd/display: Revert adding degamma coefficients")
---
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/color/color_gamma.c +1 -1
index 04f7656906ca..447a0ec9cbe2 100644
@@ -1692,7 +1692,7 @@ static void apply_degamma_for_user_regamma(struct pwl_float_data_ex *rgb_regamma
 	struct pwl_float_data_ex *rgb = rgb_regamma;
 	const struct hw_x_point *coord_x = coordinates_x;
 
-	build_coefficients(&coeff, true);
+	build_coefficients(&coeff, TRANSFER_FUNCTION_SRGB);
 
 	i = 0;
 	while (i != hw_points_num + 1) {
Signature · 1 line
2.37.3
#1 lore raw

Ping?

Alex

Quoted 35 lines · Alex Deucher

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 <[email protected]>
Cc Jaehyun Chung <[email protected]>
Cc Zeng Heng <[email protected]>
Fixes 9b3d76527f6e ("drm/amd/display: Revert adding degamma coefficients")
---
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/color/color_gamma.c +1 -2
index 04f7656906ca..447a0ec9cbe2 100644
@@ -1692,7 +1692,7 @@ static void apply_degamma_for_user_regamma(struct pwl_float_data_ex *rgb_regamma
        struct pwl_float_data_ex *rgb = rgb_regamma;
        const struct hw_x_point *coord_x = coordinates_x;
 
-       build_coefficients(&coeff, true);
+       build_coefficients(&coeff, TRANSFER_FUNCTION_SRGB);
 
        i = 0;
        while (i != hw_points_num + 1) {
--

2.37.3

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Alex Deucher
Quoted 9 lines · Alex Deucher

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.

Quoted 5 lines
Cc Krunoslav Kovac <[email protected]>
Cc Jaehyun Chung <[email protected]>
Cc Zeng Heng <[email protected]>
Fixes 9b3d76527f6e ("drm/amd/display: Revert adding degamma coefficients")

Harry

Quoted 17 lines
---
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/color/color_gamma.c +1 -1
index 04f7656906ca..447a0ec9cbe2 100644
@@ -1692,7 +1692,7 @@ static void apply_degamma_for_user_regamma(struct pwl_float_data_ex *rgb_regamma
 	struct pwl_float_data_ex *rgb = rgb_regamma;
 	const struct hw_x_point *coord_x = coordinates_x;
 
-	build_coefficients(&coeff, true);
+	build_coefficients(&coeff, TRANSFER_FUNCTION_SRGB);
 
 	i = 0;
 	while (i != hw_points_num + 1) {