drm/amd/display: Program csc matrix as part of stream update
Add csc_transform struct to dc_stream_update, and program if set when updating streams Signed-off-by: SivapiriyanKumarasamy <sivapiriyan.kumarasamy@amd.com> Reviewed-by: Anthony Koo <Anthony.Koo@amd.com> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
c85e6e546e
commit
eb385204b2
@@ -379,6 +379,27 @@ bool dc_stream_set_gamut_remap(struct dc *dc, const struct dc_stream_state *stre
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool dc_stream_program_csc_matrix(struct dc *dc, struct dc_stream_state *stream)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
bool ret = false;
|
||||||
|
struct pipe_ctx *pipes;
|
||||||
|
|
||||||
|
for (i = 0; i < MAX_PIPES; i++) {
|
||||||
|
if (dc->current_state->res_ctx.pipe_ctx[i].stream
|
||||||
|
== stream) {
|
||||||
|
|
||||||
|
pipes = &dc->current_state->res_ctx.pipe_ctx[i];
|
||||||
|
dc->hwss.program_csc_matrix(pipes,
|
||||||
|
stream->output_color_space,
|
||||||
|
stream->csc_color_matrix.matrix);
|
||||||
|
ret = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
void dc_stream_set_static_screen_events(struct dc *dc,
|
void dc_stream_set_static_screen_events(struct dc *dc,
|
||||||
struct dc_stream_state **streams,
|
struct dc_stream_state **streams,
|
||||||
int num_streams,
|
int num_streams,
|
||||||
@@ -1387,6 +1408,9 @@ static void commit_planes_do_stream_update(struct dc *dc,
|
|||||||
if (stream_update->gamut_remap)
|
if (stream_update->gamut_remap)
|
||||||
dc_stream_set_gamut_remap(dc, stream);
|
dc_stream_set_gamut_remap(dc, stream);
|
||||||
|
|
||||||
|
if (stream_update->output_csc_transform)
|
||||||
|
dc_stream_program_csc_matrix(dc, stream);
|
||||||
|
|
||||||
/* Full fe update*/
|
/* Full fe update*/
|
||||||
if (update_type == UPDATE_TYPE_FAST)
|
if (update_type == UPDATE_TYPE_FAST)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ struct dc_stream_update {
|
|||||||
struct colorspace_transform *gamut_remap;
|
struct colorspace_transform *gamut_remap;
|
||||||
enum dc_color_space *output_color_space;
|
enum dc_color_space *output_color_space;
|
||||||
|
|
||||||
|
struct dc_csc_transform *output_csc_transform;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -306,6 +307,9 @@ void dc_stream_set_dither_option(struct dc_stream_state *stream,
|
|||||||
bool dc_stream_set_gamut_remap(struct dc *dc,
|
bool dc_stream_set_gamut_remap(struct dc *dc,
|
||||||
const struct dc_stream_state *stream);
|
const struct dc_stream_state *stream);
|
||||||
|
|
||||||
|
bool dc_stream_program_csc_matrix(struct dc *dc,
|
||||||
|
struct dc_stream_state *stream);
|
||||||
|
|
||||||
bool dc_stream_get_crtc_position(struct dc *dc,
|
bool dc_stream_get_crtc_position(struct dc *dc,
|
||||||
struct dc_stream_state **stream,
|
struct dc_stream_state **stream,
|
||||||
int num_streams,
|
int num_streams,
|
||||||
|
|||||||
Reference in New Issue
Block a user