diff mbox

[2/2] drm/amd/dal: Switch to page_flip_target hook in DAL.

Message ID 1483286380-15865-3-git-send-email-Andrey.Grodzovsky@amd.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrey Grodzovsky Jan. 1, 2017, 3:59 p.m. UTC
This change shows the usage of proposed target_vblank field in 
drivers using the atomic code path.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
index b44cd1a..eba3caa 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
@@ -1057,7 +1057,8 @@  static int dm_crtc_funcs_atomic_set_property(
 static int amdgpu_atomic_helper_page_flip(struct drm_crtc *crtc,
 				struct drm_framebuffer *fb,
 				struct drm_pending_vblank_event *event,
-				uint32_t flags)
+				uint32_t flags,
+				uint32_t target_vblank)
 {
 	struct drm_plane *plane = crtc->primary;
 	struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc);
@@ -1078,6 +1079,7 @@  static int amdgpu_atomic_helper_page_flip(struct drm_crtc *crtc,
 		goto fail;
 	}
 	crtc_state->event = event;
+	crtc_state->target_vblank = target_vblank;
 
 	plane_state = drm_atomic_get_plane_state(state, plane);
 	if (IS_ERR(plane_state)) {
@@ -1130,7 +1132,7 @@  static int amdgpu_atomic_helper_page_flip(struct drm_crtc *crtc,
 	.destroy = amdgpu_dm_crtc_destroy,
 	.gamma_set = amdgpu_dm_atomic_crtc_gamma_set,
 	.set_config = drm_atomic_helper_set_config,
-	.page_flip = amdgpu_atomic_helper_page_flip,
+	.page_flip_target = amdgpu_atomic_helper_page_flip,
 	.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
 	.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
 	.atomic_set_property = dm_crtc_funcs_atomic_set_property
@@ -2757,7 +2759,7 @@  int amdgpu_dm_atomic_commit(
 							   fb,
 							   crtc->state->event,
 							   acrtc->flip_flags,
-							   drm_crtc_vblank_count(crtc));
+							   crtc->state->target_vblank);
 			/*clean up the flags for next usage*/
 			acrtc->flip_flags = 0;
 			if (ret)