mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
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: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Ilya Bakoulin <ilya.bakoulin@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
fa53b23ff7
commit
a90e1dc25c
@ -4697,7 +4697,7 @@ static bool commit_minimal_transition_state(struct dc *dc,
|
||||
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,
|
||||
int surface_count,
|
||||
struct dc_stream_update *stream_update)
|
||||
@ -4707,6 +4707,9 @@ static void populate_fast_updates(struct dc_fast_update *fast_update,
|
||||
if (stream_update) {
|
||||
fast_update[0].out_transfer_func = stream_update->out_transfer_func;
|
||||
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++) {
|
||||
@ -4740,6 +4743,26 @@ static bool fast_updates_exist(struct dc_fast_update *fast_update, int surface_c
|
||||
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,
|
||||
struct dc_surface_update *srf_updates,
|
||||
int surface_count,
|
||||
|
@ -1587,6 +1587,12 @@ bool dc_acquire_release_mpc_3dlut(
|
||||
bool dc_resource_is_dsc_encoding_supported(const struct dc *dc);
|
||||
void get_audio_check(struct audio_info *aud_modes,
|
||||
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
|
||||
* The streams parameter is an absolute set of all active streams.
|
||||
|
Loading…
Reference in New Issue
Block a user