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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This change shows the usage of proposed target_vblank field in 
drivers using the atomic code path.

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

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)
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux