drm/amd/display: Don't program bypass on linear regamma LUT
Subsystems (3)
PATCH 1/1 drm/amd/display: Don't program bypass on linear regamma LUT
Even though this is required for degamma since DCE HW only supports a couple predefined LUTs we can just program the LUT directly for regamma.
This fixes dark screens which occurs when we program regamma to bypass while degamma is using srgb LUT.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c +0 -7
@@ -139,13 +139,6 @@ int amdgpu_dm_set_regamma_lut(struct dm_crtc_state *crtc) lut = (struct drm_color_lut *)blob->data; lut_size = blob->length /sizeof (struct drm_color_lut ); -if (__is_lut_linear (lut, lut_size)) { -/* Set to bypass if lut is set to linear */ - stream->out_transfer_func->type =TF_TYPE_BYPASS ; - stream->out_transfer_func->tf =TRANSFER_FUNCTION_LINEAR ; -return 0 ; - } - gamma =dc_create_gamma ();if (!gamma)return -ENOMEM ;
Signature · 6 lines
2.17.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20180416193945.7601-1-harry.wentland-5C7GfCeVMHo@public.gmane.org
Leo Li
Reviewed-byQuoted 7 lines · Harry Wentland
Even though this is required for degamma since DCE HW only supports a couple predefined LUTs we can just program the LUT directly for regamma.
This fixes dark screens which occurs when we program regamma to bypass while degamma is using srgb LUT.
Signed-off-by Harry Wentland <[email protected]>
Thanks Harry,
Quoted 13 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 7 ------- 1 file changed, 7 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c +0
-0@@ -139,13 +139,6 @@ int amdgpu_dm_set_regamma_lut(struct dm_crtc_state *crtc) lut = (struct drm_color_lut *)blob->data; lut_size = blob->length /sizeof (struct drm_color_lut );
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c int amdgpu_dm_set_regamma_lut(struct dm_crtc_state *crtc) · line 144
Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c +0
-7-if (__is_lut_linear (lut, lut_size)) { -/* Set to bypass if lut is set to linear */ - stream->out_transfer_func->type =TF_TYPE_BYPASS ; - stream->out_transfer_func->tf =TRANSFER_FUNCTION_LINEAR ; -return 0 ; - } - gamma =dc_create_gamma ();if (!gamma)return -ENOMEM ;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx