Skip to content

Commit

Permalink
drm/amd/display: Fix vblank IRQ refcount in DM.
Browse files Browse the repository at this point in the history
Temporary fix follwoing the introduction of page_flip_target
hook in drm.

Change-Id: Iebb736fd861358cbf1ed4b0b37134dae1fd68c63
Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
  • Loading branch information
Andrey Grodzovsky authored and Harry Wentland committed Jan 6, 2017
1 parent f9d3764 commit fc56980
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,10 @@ static int amdgpu_atomic_helper_page_flip(struct drm_crtc *crtc,
if (!state)
return -ENOMEM;

ret = drm_crtc_vblank_get(crtc);
if (ret)
return ret;

state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc);
retry:
crtc_state = drm_atomic_get_crtc_state(state, crtc);
Expand Down Expand Up @@ -1116,6 +1120,9 @@ static int amdgpu_atomic_helper_page_flip(struct drm_crtc *crtc,
if (ret == -EDEADLK)
goto backoff;

if (ret)
drm_crtc_vblank_put(crtc);

drm_atomic_state_free(state);

return ret;
Expand Down

0 comments on commit fc56980

Please sign in to comment.