Skip to content

Commit ae20e32

Browse files
committed
drm: apple: Only use swap timestamps if VRR is actually active
macOS is inconsistent with how it uses DCP timestamps. Some swaps don't use them at all. We know they are required for VRR display modes to work properly, so let's just turn them on when we are connected to a VRR display. This includes the 120 Hz mode on the 14" and 16" MacBook Pros. Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
1 parent ae31173 commit ae20e32

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/gpu/drm/apple/iomfb_template.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,8 +1248,8 @@ int DCP_FW_NAME(iomfb_modeset)(struct apple_dcp *dcp,
12481248
.timing_mode_id = mode->timing_mode_id
12491249
};
12501250

1251-
/* Keep track of suspected vrr modes */
1252-
dcp->use_timestamps = mode->vrr;
1251+
/* Use DCP swap timestamps on MacBook Pros with VRR */
1252+
dcp->use_timestamps = mode->vrr && dcp->main_display;
12531253

12541254
if (mode->vrr)
12551255
dcp->min_vrr = mode->min_vrr;
@@ -1424,7 +1424,7 @@ void DCP_FW_NAME(iomfb_flush)(struct apple_dcp *dcp, struct drm_crtc *crtc, stru
14241424
req->clear = 1;
14251425
}
14261426

1427-
if (has_surface && dcp->use_timestamps) {
1427+
if (has_surface && (dcp->use_timestamps || crtc_state->vrr_enabled)) {
14281428
/*
14291429
* TODO: ascertain with certainty what these timestamps
14301430
* are. These names are guesses based on what macOS populates

0 commit comments

Comments
 (0)