Commit a90e1dc2 authored by Ilya Bakoulin's avatar Ilya Bakoulin Committed by Alex Deucher

drm/amd/display: Add helper function to check for non-address fast updates

[Why/How]
Need to identify which fast updates will update more than just the
address.
Reviewed-by: default avatarAlvin Lee <alvin.lee2@amd.com>
Signed-off-by: default avatarIlya Bakoulin <ilya.bakoulin@amd.com>
Signed-off-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fa53b23f
...@@ -4697,7 +4697,7 @@ static bool commit_minimal_transition_state(struct dc *dc, ...@@ -4697,7 +4697,7 @@ static bool commit_minimal_transition_state(struct dc *dc,
return true; return true;
} }
static void populate_fast_updates(struct dc_fast_update *fast_update, void populate_fast_updates(struct dc_fast_update *fast_update,
struct dc_surface_update *srf_updates, struct dc_surface_update *srf_updates,
int surface_count, int surface_count,
struct dc_stream_update *stream_update) struct dc_stream_update *stream_update)
...@@ -4707,6 +4707,9 @@ static void populate_fast_updates(struct dc_fast_update *fast_update, ...@@ -4707,6 +4707,9 @@ static void populate_fast_updates(struct dc_fast_update *fast_update,
if (stream_update) { if (stream_update) {
fast_update[0].out_transfer_func = stream_update->out_transfer_func; fast_update[0].out_transfer_func = stream_update->out_transfer_func;
fast_update[0].output_csc_transform = stream_update->output_csc_transform; fast_update[0].output_csc_transform = stream_update->output_csc_transform;
} else {
fast_update[0].out_transfer_func = NULL;
fast_update[0].output_csc_transform = NULL;
} }
for (i = 0; i < surface_count; i++) { for (i = 0; i < surface_count; i++) {
...@@ -4740,6 +4743,26 @@ static bool fast_updates_exist(struct dc_fast_update *fast_update, int surface_c ...@@ -4740,6 +4743,26 @@ static bool fast_updates_exist(struct dc_fast_update *fast_update, int surface_c
return false; return false;
} }
bool fast_nonaddr_updates_exist(struct dc_fast_update *fast_update, int surface_count)
{
int i;
if (fast_update[0].out_transfer_func ||
fast_update[0].output_csc_transform)
return true;
for (i = 0; i < surface_count; i++) {
if (fast_update[i].input_csc_color_matrix ||
fast_update[i].gamma ||
fast_update[i].gamut_remap_matrix ||
fast_update[i].coeff_reduction_factor ||
fast_update[i].cursor_csc_color_matrix)
return true;
}
return false;
}
static bool full_update_required(struct dc *dc, static bool full_update_required(struct dc *dc,
struct dc_surface_update *srf_updates, struct dc_surface_update *srf_updates,
int surface_count, int surface_count,
......
...@@ -1587,6 +1587,12 @@ bool dc_acquire_release_mpc_3dlut( ...@@ -1587,6 +1587,12 @@ bool dc_acquire_release_mpc_3dlut(
bool dc_resource_is_dsc_encoding_supported(const struct dc *dc); bool dc_resource_is_dsc_encoding_supported(const struct dc *dc);
void get_audio_check(struct audio_info *aud_modes, void get_audio_check(struct audio_info *aud_modes,
struct audio_check *aud_chk); struct audio_check *aud_chk);
bool fast_nonaddr_updates_exist(struct dc_fast_update *fast_update, int surface_count);
void populate_fast_updates(struct dc_fast_update *fast_update,
struct dc_surface_update *srf_updates,
int surface_count,
struct dc_stream_update *stream_update);
/* /*
* Set up streams and links associated to drive sinks * Set up streams and links associated to drive sinks
* The streams parameter is an absolute set of all active streams. * The streams parameter is an absolute set of all active streams.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment