drm/amd/display: Integrate color transform3x4 with 3dlut tm
[Why & How] Reuse existent code path (dcn1+) and in order to do that apply de gamma in 1D blender LUT and re use MPC OGAM. Follow up is required. Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by: Aric Cyr <Aric.Cyr@amd.com> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> Acked-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com> Acked-by: Vitaly Prosyak <Vitaly.Prosyak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
8bb3d7e7b5
commit
f99b6f4f21
|
@ -1669,6 +1669,13 @@ static void copy_surface_update_to_plane(
|
|||
srf_update->lut3d_func))
|
||||
memcpy(surface->lut3d_func, srf_update->lut3d_func,
|
||||
sizeof(*surface->lut3d_func));
|
||||
|
||||
if (srf_update->blend_tf &&
|
||||
(surface->blend_tf !=
|
||||
srf_update->blend_tf))
|
||||
memcpy(surface->blend_tf, srf_update->blend_tf,
|
||||
sizeof(*surface->blend_tf));
|
||||
|
||||
#endif
|
||||
if (srf_update->input_csc_color_matrix)
|
||||
surface->input_csc_color_matrix =
|
||||
|
|
|
@ -60,6 +60,11 @@ static void construct(struct dc_context *ctx, struct dc_plane_state *plane_state
|
|||
plane_state->lut3d_func->ctx = ctx;
|
||||
plane_state->lut3d_func->initialized = false;
|
||||
}
|
||||
plane_state->blend_tf = dc_create_transfer_func();
|
||||
if (plane_state->blend_tf != NULL) {
|
||||
plane_state->blend_tf->type = TF_TYPE_BYPASS;
|
||||
plane_state->blend_tf->ctx = ctx;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -85,6 +90,11 @@ static void destruct(struct dc_plane_state *plane_state)
|
|||
plane_state->lut3d_func);
|
||||
plane_state->lut3d_func = NULL;
|
||||
}
|
||||
if (plane_state->blend_tf != NULL) {
|
||||
dc_transfer_func_release(
|
||||
plane_state->blend_tf);
|
||||
plane_state->blend_tf = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -761,6 +761,7 @@ struct dc_surface_update {
|
|||
#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
|
||||
const struct dc_transfer_func *func_shaper;
|
||||
const struct dc_3dlut *lut3d_func;
|
||||
const struct dc_transfer_func *blend_tf;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -64,7 +64,8 @@ union lut3d_control_flags {
|
|||
unsigned int use_gamut_map_lib :1;
|
||||
unsigned int chromatic_adaptation_src :1;
|
||||
unsigned int chromatic_adaptation_dst :1;
|
||||
unsigned int reseved :5;
|
||||
unsigned int do_blender_lut_degamma :1;
|
||||
unsigned int reseved :4;
|
||||
} bits;
|
||||
};
|
||||
|
||||
|
@ -78,8 +79,8 @@ enum lut3d_control_gamut_map {
|
|||
lut3d_control_gamut_map_none = 0,
|
||||
lut3d_control_gamut_map_tonemap,
|
||||
lut3d_control_gamut_map_chto,
|
||||
lut3d_control_gamut_map_chto_chso,
|
||||
lut3d_control_gamut_map_chto_chci
|
||||
lut3d_control_gamut_map_chso,
|
||||
lut3d_control_gamut_map_chci
|
||||
};
|
||||
|
||||
enum lut3d_control_rotation_mode {
|
||||
|
|
Loading…
Reference in New Issue