浏览代码

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.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Harry Wentland 7 年之前
父节点
当前提交
d78fd72558
共有 1 个文件被更改,包括 0 次插入7 次删除
  1. 0 7
      drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c

+ 0 - 7
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c

@@ -138,13 +138,6 @@ int amdgpu_dm_set_regamma_lut(struct dm_crtc_state *crtc)
 	lut = (struct drm_color_lut *)blob->data;
 	lut = (struct drm_color_lut *)blob->data;
 	lut_size = blob->length / sizeof(struct drm_color_lut);
 	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();
 	gamma = dc_create_gamma();
 	if (!gamma)
 	if (!gamma)
 		return -ENOMEM;
 		return -ENOMEM;