diff options
author | Harry Wentland <harry.wentland@amd.com> | 2023-11-28 20:52:50 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-01-23 01:13:26 +0300 |
commit | 07b2483ee1d0a0e64eef81e653f6eaffc6392092 (patch) | |
tree | c95b9a3889cd86e8b62f3a30f0a439e1cd49e5d7 /drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c | |
parent | efbfc987a331f5e33e8ea16fe8471b82c4a5fcd9 (diff) | |
download | linux-07b2483ee1d0a0e64eef81e653f6eaffc6392092.tar.xz |
drm/amd/display: Add dpp_get_gamut_remap functions
We want to be able to read the DPP's gamut remap matrix.
v2:
- code-style and doc comments clean-up (Melissa)
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
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/dc/dcn10/dcn10_cm_common.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c index 3538973bd0c6..b7e57aa27361 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c @@ -62,6 +62,26 @@ void cm_helper_program_color_matrices( } +void cm_helper_read_color_matrices(struct dc_context *ctx, + uint16_t *regval, + const struct color_matrices_reg *reg) +{ + uint32_t cur_csc_reg, regval0, regval1; + unsigned int i = 0; + + for (cur_csc_reg = reg->csc_c11_c12; + cur_csc_reg <= reg->csc_c33_c34; cur_csc_reg++) { + REG_GET_2(cur_csc_reg, + csc_c11, ®val0, + csc_c12, ®val1); + + regval[2 * i] = regval0; + regval[(2 * i) + 1] = regval1; + + i++; + } +} + void cm_helper_program_xfer_func( struct dc_context *ctx, const struct pwl_params *params, |