Skip to content

Commit 7d6080c

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 <[email protected]>
1 parent f1ed883 commit 7d6080c

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
@@ -1247,8 +1247,8 @@ int DCP_FW_NAME(iomfb_modeset)(struct apple_dcp *dcp,
12471247
.timing_mode_id = mode->timing_mode_id
12481248
};
12491249

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

12531253
cookie = kzalloc(sizeof(*cookie), GFP_KERNEL);
12541254
if (!cookie) {
@@ -1422,7 +1422,7 @@ void DCP_FW_NAME(iomfb_flush)(struct apple_dcp *dcp, struct drm_crtc *crtc, stru
14221422
req->clear = 1;
14231423
}
14241424

1425-
if (has_surface && dcp->use_timestamps) {
1425+
if (has_surface && (dcp->use_timestamps || crtc_state->vrr_enabled)) {
14261426
/*
14271427
* TODO: ascertain with certainty what these timestamps
14281428
* are. They are something to do with presentation timing,

0 commit comments

Comments
 (0)