[PATCH] drm/amd/display: Drop our own page_flip_helper

Deucher, Alexander Alexander.Deucher at amd.com
Wed Aug 9 19:47:28 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Harry Wentland
> Sent: Wednesday, August 09, 2017 3:39 PM
> To: amd-gfx at lists.freedesktop.org; Grodzovsky, Andrey
> Cc: Wentland, Harry
> Subject: [PATCH] drm/amd/display: Drop our own page_flip_helper
> 
> No longer needed since Andrey's fix made it upstream into
> drm_atomic_helper_page_flip
> 
> Signed-off-by: Harry Wentland <harry.wentland at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list