]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Check ramp != NULL before applying lut1d for degamma
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 31 Mar 2020 20:45:31 +0000 (16:45 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 22 Apr 2020 22:11:47 +0000 (18:11 -0400)
commita7ef9dfc19d7758ede5538c9cde779f61d218915
tree811a5c021bc0d1f166111b51f4b472b8bbbd8642
parent2f89307e7b00921ad1a38a94cfefe5be09897c28
drm/amd/display: Check ramp != NULL before applying lut1d for degamma

[Why]
A NULL ramp is a valid configuration for passing into
mod_color_calculate_degamma_params but we'll hit a NULL pointer if we do
so.

We need this in order to get the right transfer function to do degamma
on NV12 formats where we aren't supplied with a custom user degamma.

[How]
Add the NULL check.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Zhan Liu <Zhan.Liu@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/color/color_gamma.c