aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2018-04-12 16:37:09 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-04-19 11:19:11 -0400
commitd78fd7255881645fc645e23145d469385227170d (patch)
tree00b7aa0f55a454d729617eb678ef0e4310456378
parenta10beabba213924d876f2d10ca9351aeab93f58a (diff)
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>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
index f6cb502c303f..25f064c01038 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
+++ b/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)
138 lut = (struct drm_color_lut *)blob->data; 138 lut = (struct drm_color_lut *)blob->data;
139 lut_size = blob->length / sizeof(struct drm_color_lut); 139 lut_size = blob->length / sizeof(struct drm_color_lut);
140 140
141 if (__is_lut_linear(lut, lut_size)) {
142 /* Set to bypass if lut is set to linear */
143 stream->out_transfer_func->type = TF_TYPE_BYPASS;
144 stream->out_transfer_func->tf = TRANSFER_FUNCTION_LINEAR;
145 return 0;
146 }
147
148 gamma = dc_create_gamma(); 141 gamma = dc_create_gamma();
149 if (!gamma) 142 if (!gamma)
150 return -ENOMEM; 143 return -ENOMEM;