@@ -1210,17 +1210,17 @@ int DCP_FW_NAME(iomfb_modeset)(struct apple_dcp *dcp,
12101210 if (cmode )
12111211 dev_info (dcp -> dev ,
12121212 "set_digital_out_mode() color mode depth:%hhu format:%u "
1213- "colorimetry:%u eotf:%u range:%u\n" , cmode -> depth ,
1213+ "colorimetry:%u eotf:%u range:%u vrr:%u \n" , cmode -> depth ,
12141214 cmode -> format , cmode -> colorimetry , cmode -> eotf ,
1215- cmode -> range );
1215+ cmode -> range , mode -> vrr );
12161216
12171217 dcp -> mode = (struct dcp_set_digital_out_mode_req ){
12181218 .color_mode_id = mode -> color_mode_id ,
12191219 .timing_mode_id = mode -> timing_mode_id
12201220 };
12211221
1222- /* keep around to fake timestamps in dcp_swap_submit */
1223- dcp -> precise_sync_rate = mode -> precise_sync_rate ;
1222+ /* Keep track of suspected vrr modes */
1223+ dcp -> use_timestamps = mode -> vrr ;
12241224
12251225 cookie = kzalloc (sizeof (* cookie ), GFP_KERNEL );
12261226 if (!cookie ) {
@@ -1411,7 +1411,7 @@ void DCP_FW_NAME(iomfb_flush)(struct apple_dcp *dcp, struct drm_crtc *crtc, stru
14111411 req -> clear = 1 ;
14121412 }
14131413
1414- if (has_surface && dcp -> main_display && ( dcp -> precise_sync_rate >> 16 ) == 120 ) {
1414+ if (has_surface && dcp -> use_timestamps ) {
14151415 /*
14161416 * Fake timstamps to get 120hz refresh rate. It looks
14171417 * like the actual value does not matter, as long as it is non zero.
0 commit comments