Skip to content

Commit 7ebce2b

Browse files
committed
drm: apple: Switch back to drm_atomic_helper_commit_tail_rpm()
The custom commit_tail implementation stopped making after "drm/apple: Disable fake vblank IRQ machinery" which stopped calling drm_vblank_init(). Revert back to the standard helper implementation. Avoids or at least significantly reduces page flips taking approximately one frame time in kwin_wayland 6. Fixes: ("drm/apple: Switch to nonblocking commit handling") Signed-off-by: Janne Grunau <j@jannau.net>
1 parent be70c65 commit 7ebce2b

1 file changed

Lines changed: 1 addition & 21 deletions

File tree

drivers/gpu/drm/apple/apple_drv.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -238,26 +238,6 @@ static void apple_crtc_atomic_begin(struct drm_crtc *crtc,
238238
}
239239
}
240240

241-
static void dcp_atomic_commit_tail(struct drm_atomic_state *old_state)
242-
{
243-
struct drm_device *dev = old_state->dev;
244-
245-
drm_atomic_helper_commit_modeset_disables(dev, old_state);
246-
247-
drm_atomic_helper_commit_modeset_enables(dev, old_state);
248-
249-
drm_atomic_helper_commit_planes(dev, old_state,
250-
DRM_PLANE_COMMIT_ACTIVE_ONLY);
251-
252-
drm_atomic_helper_fake_vblank(old_state);
253-
254-
drm_atomic_helper_commit_hw_done(old_state);
255-
256-
drm_atomic_helper_wait_for_flip_done(dev, old_state);
257-
258-
drm_atomic_helper_cleanup_planes(dev, old_state);
259-
}
260-
261241
static void apple_crtc_cleanup(struct drm_crtc *crtc)
262242
{
263243
drm_crtc_cleanup(crtc);
@@ -280,7 +260,7 @@ static const struct drm_mode_config_funcs apple_mode_config_funcs = {
280260
};
281261

282262
static const struct drm_mode_config_helper_funcs apple_mode_config_helpers = {
283-
.atomic_commit_tail = dcp_atomic_commit_tail,
263+
.atomic_commit_tail = drm_atomic_helper_commit_tail_rpm,
284264
};
285265

286266
static void appledrm_connector_cleanup(struct drm_connector *connector)

0 commit comments

Comments
 (0)