diff options
author | Corbin McElhanney <corbin.mcelhanney@amd.com> | 2017-05-09 12:00:24 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 18:07:05 -0400 |
commit | 6838161c723d061c85e20057dbf0a2a9378c4e59 (patch) | |
tree | 516256b31a893436462ea8d44aaadf36fb7c1e9d /drivers/gpu/drm/amd/display/modules/freesync/freesync.c | |
parent | d5c40d5368876d701811faa65c341198cb958cb0 (diff) |
drm/amd/display: fix freesync not working on raven
Signed-off-by: Corbin McElhanney <corbin.mcelhanney@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules/freesync/freesync.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index 05a086c7b31a..9a073bc55144 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c | |||
@@ -1130,6 +1130,7 @@ void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync, | |||
1130 | unsigned int stream_index, map_index; | 1130 | unsigned int stream_index, map_index; |
1131 | struct freesync_state *state; | 1131 | struct freesync_state *state; |
1132 | struct core_freesync *core_freesync = NULL; | 1132 | struct core_freesync *core_freesync = NULL; |
1133 | struct dc_static_screen_events triggers = {0}; | ||
1133 | 1134 | ||
1134 | if (mod_freesync == NULL) | 1135 | if (mod_freesync == NULL) |
1135 | return; | 1136 | return; |
@@ -1157,6 +1158,7 @@ void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync, | |||
1157 | /* Update the stream */ | 1158 | /* Update the stream */ |
1158 | update_stream(core_freesync, streams[stream_index]); | 1159 | update_stream(core_freesync, streams[stream_index]); |
1159 | 1160 | ||
1161 | |||
1160 | /* Calculate vmin/vmax and refresh rate for | 1162 | /* Calculate vmin/vmax and refresh rate for |
1161 | * current mode | 1163 | * current mode |
1162 | */ | 1164 | */ |
@@ -1164,6 +1166,14 @@ void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync, | |||
1164 | core_freesync->map[map_index].caps-> | 1166 | core_freesync->map[map_index].caps-> |
1165 | min_refresh_in_micro_hz, | 1167 | min_refresh_in_micro_hz, |
1166 | state->nominal_refresh_rate_in_micro_hz); | 1168 | state->nominal_refresh_rate_in_micro_hz); |
1169 | |||
1170 | /* Update mask */ | ||
1171 | triggers.overlay_update = true; | ||
1172 | triggers.surface_update = true; | ||
1173 | |||
1174 | core_freesync->dc->stream_funcs.set_static_screen_events( | ||
1175 | core_freesync->dc, streams, num_streams, | ||
1176 | &triggers); | ||
1167 | } | 1177 | } |
1168 | } | 1178 | } |
1169 | 1179 | ||