drm/amd/display: add plane HDR multiplier driver-specific property
authorJoshua Ashton <joshua@froggi.es>
Thu, 16 Nov 2023 19:57:48 +0000 (18:57 -0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Dec 2023 20:09:55 +0000 (15:09 -0500)
commitec7b2a55463ea50401a8146793b61ee590255a45
tree1e2b9b3243fa8cbf3004f437b82e334509e978fc
parente4cddd51bfab2a40529a4af35bd2c912b5a0c239
drm/amd/display: add plane HDR multiplier driver-specific property

Multiplier to 'gain' the plane. When PQ is decoded using the fixed func
transfer function to the internal FP16 fb, 1.0 -> 80 nits (on AMD at
least) When sRGB is decoded, 1.0 -> 1.0.  Therefore, 1.0 multiplier = 80
nits for SDR content. So if you want, 203 nits for SDR content, pass in
(203.0 / 80.0).

v4:
- comment about the PQ TF need for L-to-NL (from Harry's review)

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Co-developed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c