Commit bfe1708c authored by Bhawanpreet Lakha's avatar Bhawanpreet Lakha Committed by Alex Deucher

drm/amd/display: Atomic freesync ASSERT fix

Changes to atomic set property for freesync.

Now In set property, just set the freesync variables and return 0.
Based on the variables call mod_freesync_set_user_enable() inside
commit_tail
Signed-off-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0858a8f2
...@@ -4154,6 +4154,33 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) ...@@ -4154,6 +4154,33 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
mod_freesync_add_stream(adev->dm.freesync_module, mod_freesync_add_stream(adev->dm.freesync_module,
new_stream, &aconnector->caps); new_stream, &aconnector->caps);
} }
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc);
struct amdgpu_dm_connector *aconnector = NULL;
struct dm_connector_state *conn_state = NULL;
struct dm_crtc_state *acrtc_state = NULL;
acrtc_state = to_dm_crtc_state(acrtc->base.state);
aconnector =
amdgpu_dm_find_first_crtc_matching_connector(
state,
crtc,
false);
if (aconnector) {
conn_state = to_dm_connector_state(aconnector->base.state);
if (new_stream) {
mod_freesync_set_user_enable(adev->dm.freesync_module,
&acrtc_state->stream,
1,
&conn_state->user_enable);
}
}
}
} }
if (dm_state->context) if (dm_state->context)
......
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