Commit ebfb1526 authored by Harry VanZyllDeJong's avatar Harry VanZyllDeJong Committed by Alex Deucher
Browse files

drm/amd/display: Add vrr_active_variable to dc_stream_update



[WHY]
The display driver on some OSes need to track it in order to
perform memory clock switching decisions.

[HOW]
Propagate the vrr active state to dirty bit so that on mode set it
disables dynamic memory clock switching.

Acked-by: default avatarAlan Liu <HaoPing.Liu@amd.com>
Signed-off-by: default avatarHarry VanZyllDeJong <harry.vanzylldejong@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3de58f22
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -2652,6 +2652,9 @@ static void copy_stream_update_to_stream(struct dc *dc,
	if (update->allow_freesync)
	if (update->allow_freesync)
		stream->allow_freesync = *update->allow_freesync;
		stream->allow_freesync = *update->allow_freesync;


	if (update->vrr_active_variable)
		stream->vrr_active_variable = *update->vrr_active_variable;

	if (update->crtc_timing_adjust)
	if (update->crtc_timing_adjust)
		stream->adjust = *update->crtc_timing_adjust;
		stream->adjust = *update->crtc_timing_adjust;


+1 −0
Original line number Original line Diff line number Diff line
@@ -304,6 +304,7 @@ struct dc_stream_update {
	bool *dpms_off;
	bool *dpms_off;
	bool integer_scaling_update;
	bool integer_scaling_update;
	bool *allow_freesync;
	bool *allow_freesync;
	bool *vrr_active_variable;


	struct colorspace_transform *gamut_remap;
	struct colorspace_transform *gamut_remap;
	enum dc_color_space *output_color_space;
	enum dc_color_space *output_color_space;
+1 −1
Original line number Original line Diff line number Diff line
@@ -1374,7 +1374,7 @@ unsigned long long mod_freesync_calc_field_rate_from_timing(
	return field_rate_in_uhz;
	return field_rate_in_uhz;
}
}


bool mod_freesync_get_freesync_enabled(struct mod_vrr_params *pVrr, struct dc_stream_state *const pStream)
bool mod_freesync_get_freesync_enabled(struct mod_vrr_params *pVrr)
{
{
	return (pVrr->state != VRR_STATE_UNSUPPORTED) && (pVrr->state != VRR_STATE_DISABLED);
	return (pVrr->state != VRR_STATE_UNSUPPORTED) && (pVrr->state != VRR_STATE_DISABLED);
}
}
+1 −2
Original line number Original line Diff line number Diff line
@@ -195,7 +195,6 @@ unsigned int mod_freesync_calc_v_total_from_refresh(
		unsigned int refresh_in_uhz);
		unsigned int refresh_in_uhz);


// Returns true when FreeSync is supported and enabled (even if it is inactive)
// Returns true when FreeSync is supported and enabled (even if it is inactive)
bool mod_freesync_get_freesync_enabled(struct mod_vrr_params *pVrr,
bool mod_freesync_get_freesync_enabled(struct mod_vrr_params *pVrr);
		struct dc_stream_state *const pStream);


#endif
#endif