Skip to content

Commit 0b6a5bd

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 0f77a4f commit 0b6a5bd

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
@@ -239,26 +239,6 @@ static void apple_crtc_atomic_begin(struct drm_crtc *crtc,
239239
}
240240
}
241241

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

283263
static const struct drm_mode_config_helper_funcs apple_mode_config_helpers = {
284-
.atomic_commit_tail = dcp_atomic_commit_tail,
264+
.atomic_commit_tail = drm_atomic_helper_commit_tail_rpm,
285265
};
286266

287267
static void appledrm_connector_cleanup(struct drm_connector *connector)

0 commit comments

Comments
 (0)