OSDN Git Service

drm/amd/display: DGAM enabled for HDR
authorKrunoslav Kovac <Krunoslav.Kovac@amd.com>
Thu, 17 Jan 2019 22:56:51 +0000 (17:56 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Feb 2019 02:16:23 +0000 (21:16 -0500)
commit8f0159122714d38f89140993eb0a070f8eeb2e9d
treeb1e2637f4754d95680f5c2c87592d6c115378b34
parenta057ec460ab1f43a85e0fbb9938c2c3460cb7445
drm/amd/display: DGAM enabled for HDR

[Why]
On HW that doesn't have input LUT, we may combine degamma with OS ramp
Problem here is that it assumes DGAM is inverse of PQ or SRGB. It doesn't
handle linear case, it would default to sRGB and always enable DGAM..

[How] Add handling for linear case. Also check for null ramp and instead of
blowing up, assume it's identity.

Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/color/color_gamma.c