No longer needed since Andrey's fix made it upstream into
drm_atomic_helper_page_flip

Signed-off-by: Harry Wentland <harry.wentl...@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 60 +----------------------
 1 file changed, 1 insertion(+), 59 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index e337b18e455d..3927a6e73084 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2338,64 +2338,6 @@ void amdgpu_dm_crtc_destroy(struct drm_crtc *crtc)
        kfree(crtc);
 }
 
-static int amdgpu_atomic_helper_page_flip(struct drm_crtc *crtc,
-                               struct drm_framebuffer *fb,
-                               struct drm_pending_vblank_event *event,
-                               uint32_t flags,
-                               struct drm_modeset_acquire_ctx *ctx)
-{
-       struct drm_plane *plane = crtc->primary;
-       struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc);
-       struct drm_atomic_state *state;
-       struct drm_plane_state *plane_state;
-       struct drm_crtc_state *crtc_state;
-       int ret = 0;
-
-       state = drm_atomic_state_alloc(plane->dev);
-       if (!state)
-               return -ENOMEM;
-
-       state->acquire_ctx = ctx;
-
-       crtc_state = drm_atomic_get_crtc_state(state, crtc);
-       if (IS_ERR(crtc_state)) {
-               ret = PTR_ERR(crtc_state);
-               goto fail;
-       }
-       crtc_state->event = event;
-
-       plane_state = drm_atomic_get_plane_state(state, plane);
-       if (IS_ERR(plane_state)) {
-               ret = PTR_ERR(plane_state);
-               goto fail;
-       }
-
-       ret = drm_atomic_set_crtc_for_plane(plane_state, crtc);
-       if (ret != 0)
-               goto fail;
-       drm_atomic_set_fb_for_plane(plane_state, fb);
-
-       /* Make sure we don't accidentally do a full modeset. */
-       state->allow_modeset = false;
-       if (!crtc_state->active) {
-               DRM_DEBUG_ATOMIC("[CRTC:%d] disabled, rejecting legacy flip\n",
-                                crtc->base.id);
-               ret = -EINVAL;
-               goto fail;
-       }
-       acrtc->flip_flags = flags;
-       ret = drm_atomic_nonblocking_commit(state);
-       if (ret != 0)
-               goto fail;
-
-       /* Driver takes ownership of state on successful async commit. */
-       return 0;
-fail:
-       drm_atomic_state_put(state);
-
-       return ret;
-}
-
 static void dm_crtc_destroy_state(struct drm_crtc *crtc,
                                           struct drm_crtc_state *state)
 {
@@ -2459,7 +2401,7 @@ static const struct drm_crtc_funcs amdgpu_dm_crtc_funcs = 
{
        .gamma_set = drm_atomic_helper_legacy_gamma_set,
        .set_config = drm_atomic_helper_set_config,
        .set_property = drm_atomic_helper_crtc_set_property,
-       .page_flip = amdgpu_atomic_helper_page_flip,
+       .page_flip = drm_atomic_helper_page_flip,
        .atomic_duplicate_state = dm_crtc_duplicate_state,
        .atomic_destroy_state = dm_crtc_destroy_state,
 };
-- 
2.11.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to