Skip to content

Commit

Permalink
drm: apple: Switch back to drm_atomic_helper_commit_tail_rpm()
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jannau committed Apr 29, 2024
1 parent bfbe627 commit 38ae67f
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions drivers/gpu/drm/apple/apple_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,26 +238,6 @@ static void apple_crtc_atomic_begin(struct drm_crtc *crtc,
}
}

static void dcp_atomic_commit_tail(struct drm_atomic_state *old_state)
{
struct drm_device *dev = old_state->dev;

drm_atomic_helper_commit_modeset_disables(dev, old_state);

drm_atomic_helper_commit_modeset_enables(dev, old_state);

drm_atomic_helper_commit_planes(dev, old_state,
DRM_PLANE_COMMIT_ACTIVE_ONLY);

drm_atomic_helper_fake_vblank(old_state);

drm_atomic_helper_commit_hw_done(old_state);

drm_atomic_helper_wait_for_flip_done(dev, old_state);

drm_atomic_helper_cleanup_planes(dev, old_state);
}

static void apple_crtc_cleanup(struct drm_crtc *crtc)
{
drm_crtc_cleanup(crtc);
Expand All @@ -280,7 +260,7 @@ static const struct drm_mode_config_funcs apple_mode_config_funcs = {
};

static const struct drm_mode_config_helper_funcs apple_mode_config_helpers = {
.atomic_commit_tail = dcp_atomic_commit_tail,
.atomic_commit_tail = drm_atomic_helper_commit_tail_rpm,
};

static void appledrm_connector_cleanup(struct drm_connector *connector)
Expand Down

0 comments on commit 38ae67f

Please sign in to comment.