drm/amd/display: add plane degamma TF driver-specific property

Allow userspace to tell the kernel driver the input space and,
therefore, uses correct predefined transfer function (TF) to go from
encoded values to linear values.

v2:
- rename TF enum prefix from DRM_ to AMDGPU_ (Harry)
- remove HLG TF

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>
This commit is contained in:
Joshua Ashton
2023-11-16 18:57:45 -01:00
committed by Alex Deucher
parent 571c2fa26a
commit d5a348d96e
4 changed files with 62 additions and 2 deletions

View File

@@ -355,6 +355,11 @@ struct amdgpu_mode_info {
* size of degamma LUT as supported by the driver (read-only).
*/
struct drm_property *plane_degamma_lut_size_property;
/**
* @plane_degamma_tf_property: Plane pre-defined transfer function to
* to go from scanout/encoded values to linear values.
*/
struct drm_property *plane_degamma_tf_property;
};
#define AMDGPU_MAX_BL_LEVEL 0xFF