diff options
author | Joshua Ashton <joshua@froggi.es> | 2023-11-16 18:57:51 -0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-12-13 16:08:00 -0500 |
commit | 0ef47454dc82358b62a424b37c7520a84f307edb (patch) | |
tree | cfcf6e4a702231eb1d426657a60e0c8db1a8e1df /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | |
parent | f545d82479b46368bf00d0bfecf33fa914bd5f8f (diff) | |
download | linux-0ef47454dc82358b62a424b37c7520a84f307edb.tar.gz linux-0ef47454dc82358b62a424b37c7520a84f307edb.tar.bz2 linux-0ef47454dc82358b62a424b37c7520a84f307edb.zip |
drm/amd/display: add plane blend LUT and TF driver-specific properties
Blend 1D LUT or a pre-defined transfer function (TF) can be set to
linearize content before blending, so that it's positioned just before
blending planes in the AMD color mgmt pipeline, and after 3D LUT
(non-linear space). Shaper and Blend LUTs are 1D LUTs that sandwich 3D
LUT. Drivers should advertize blend properties according to HW caps.
There is no blend ROM for pre-defined TF. When setting blend TF (!=
Identity) and LUT at the same time, the color module will combine the
pre-defined TF and the custom LUT values into the LUT that's actually
programmed.
v3:
- spell out TF+LUT behavior in the commit and comments (Harry)
v5:
- get blend blob correctly
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Signed-off-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h')
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h index 9bee60cbc2b5..a9a0bc875b78 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h @@ -800,6 +800,18 @@ struct dm_plane_state { * &struct drm_color_lut. */ struct drm_property_blob *lut3d; + /** + * @blend_lut: blend lut lookup table blob. The blob (if not NULL) is an + * array of &struct drm_color_lut. + */ + struct drm_property_blob *blend_lut; + /** + * @blend_tf: + * + * Pre-defined transfer function for converting plane pixel data before + * applying blend LUT. + */ + enum amdgpu_transfer_function blend_tf; }; struct dm_crtc_state { |