drm/amd/display: Fix gamma 2.2 colorop TFs
Subsystems (3)
PATCH 1/1 drm/amd/display: Fix gamma 2.2 colorop TFs
Use GAMMA22 for degamma/blend and GAMMA22_INV for shaper so curves match the color pipeline.
Tested-by Xaver Hugl <[email protected]>
Signed-off-by Alex Hung <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c +3 -3
@@ -37,19 +37,19 @@ const u64 amdgpu_dm_supported_degam_tfs =BIT (DRM_COLOROP_1D_CURVE_SRGB_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_PQ_125_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_BT2020_INV_OETF ) | -BIT (DRM_COLOROP_1D_CURVE_GAMMA22_INV ); +BIT (DRM_COLOROP_1D_CURVE_GAMMA22 );const u64 amdgpu_dm_supported_shaper_tfs =BIT (DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_BT2020_OETF ) | -BIT (DRM_COLOROP_1D_CURVE_GAMMA22 ); +BIT (DRM_COLOROP_1D_CURVE_GAMMA22_INV );const u64 amdgpu_dm_supported_blnd_tfs =BIT (DRM_COLOROP_1D_CURVE_SRGB_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_PQ_125_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_BT2020_INV_OETF ) | -BIT (DRM_COLOROP_1D_CURVE_GAMMA22_INV ); +BIT (DRM_COLOROP_1D_CURVE_GAMMA22 );#define MAX_COLOR_PIPELINE_OPS 10
Signature · 1 line
2.43.0
Quoted 2 lines · Alex Hung
Use GAMMA22 for degamma/blend and
GAMMA22_INVfor shaper so curves match the color pipeline.
Oh, thanks for this fix!
I had a hard time figuring out that the problem I was facing in the userspace was that I was trying setting an incorrect value, because I hadn't paid attention to how it was exposed in the kernel. Unf!
Reviewed-by Melissa Wen <[email protected]>
Quoted 35 lines
Tested-by Xaver Hugl <[email protected]>Signed-off-by Alex Hung <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c +3
-3@@ -37,19 +37,19 @@ const u64 amdgpu_dm_supported_degam_tfs =BIT (DRM_COLOROP_1D_CURVE_SRGB_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_PQ_125_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_BT2020_INV_OETF ) | -BIT (DRM_COLOROP_1D_CURVE_GAMMA22_INV ); +BIT (DRM_COLOROP_1D_CURVE_GAMMA22 );const u64 amdgpu_dm_supported_shaper_tfs =BIT (DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_BT2020_OETF ) | -BIT (DRM_COLOROP_1D_CURVE_GAMMA22 ); +BIT (DRM_COLOROP_1D_CURVE_GAMMA22_INV );const u64 amdgpu_dm_supported_blnd_tfs =BIT (DRM_COLOROP_1D_CURVE_SRGB_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_PQ_125_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_BT2020_INV_OETF ) | -BIT (DRM_COLOROP_1D_CURVE_GAMMA22_INV ); +BIT (DRM_COLOROP_1D_CURVE_GAMMA22 );#define MAX_COLOR_PIPELINE_OPS 10
Quoted 6 lines · Alex Hung
Use GAMMA22 for degamma/blend and
GAMMA22_INVfor shaper so curves match the color pipeline.Tested-by Xaver Hugl <[email protected]>Signed-off-by Alex Hung <[email protected]>
Reviewed-by Harry Wentland <[email protected]>
Harry
Quoted 31 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c +3
-3@@ -37,19 +37,19 @@ const u64 amdgpu_dm_supported_degam_tfs =BIT (DRM_COLOROP_1D_CURVE_SRGB_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_PQ_125_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_BT2020_INV_OETF ) | -BIT (DRM_COLOROP_1D_CURVE_GAMMA22_INV ); +BIT (DRM_COLOROP_1D_CURVE_GAMMA22 );const u64 amdgpu_dm_supported_shaper_tfs =BIT (DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_BT2020_OETF ) | -BIT (DRM_COLOROP_1D_CURVE_GAMMA22 ); +BIT (DRM_COLOROP_1D_CURVE_GAMMA22_INV );const u64 amdgpu_dm_supported_blnd_tfs =BIT (DRM_COLOROP_1D_CURVE_SRGB_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_PQ_125_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_BT2020_INV_OETF ) | -BIT (DRM_COLOROP_1D_CURVE_GAMMA22_INV ); +BIT (DRM_COLOROP_1D_CURVE_GAMMA22 );#define MAX_COLOR_PIPELINE_OPS 10
Alex Deucher
AppliedApplied. Thanks!
Alex
Quoted 47 lines · Harry Wentland
Quoted 6 lines · Alex Hung
Use GAMMA22 for degamma/blend and
GAMMA22_INVfor shaper so curves match the color pipeline.Tested-by Xaver Hugl <[email protected]>Signed-off-by Alex Hung <[email protected]>Reviewed-by Harry Wentland <[email protected]>Harry
Quoted 31 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c +3
-3@@ -37,19 +37,19 @@ const u64 amdgpu_dm_supported_degam_tfs =BIT (DRM_COLOROP_1D_CURVE_SRGB_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_PQ_125_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_BT2020_INV_OETF ) | -BIT (DRM_COLOROP_1D_CURVE_GAMMA22_INV ); +BIT (DRM_COLOROP_1D_CURVE_GAMMA22 );const u64 amdgpu_dm_supported_shaper_tfs =BIT (DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_BT2020_OETF ) | -BIT (DRM_COLOROP_1D_CURVE_GAMMA22 ); +BIT (DRM_COLOROP_1D_CURVE_GAMMA22_INV );const u64 amdgpu_dm_supported_blnd_tfs =BIT (DRM_COLOROP_1D_CURVE_SRGB_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_PQ_125_EOTF ) |BIT (DRM_COLOROP_1D_CURVE_BT2020_INV_OETF ) | -BIT (DRM_COLOROP_1D_CURVE_GAMMA22_INV ); +BIT (DRM_COLOROP_1D_CURVE_GAMMA22 );#define MAX_COLOR_PIPELINE_OPS 10