Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c021cd0f authored by Rahul Sharma's avatar Rahul Sharma Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: set correct timeline at fence create



This change adds the offset to the associated timeline
when the retire and release fences are created.
The DRM client queries the fences using the atomic commit
instead of set_property ioctl. So the sync point should
contain the updated timeline before sending the FDs to
client.

Change-Id: I1ac9507934223bd1091be6960805c63cb4aacfb1
Signed-off-by: default avatarAbhijit Kulkarni <kabhijit@codeaurora.org>
Signed-off-by: default avatarRahul Sharma <rahsha@codeaurora.org>
parent 6e84efb6
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -477,7 +477,10 @@ static int sde_connector_atomic_set_property(struct drm_connector *connector,
		if (!val)
		if (!val)
			goto end;
			goto end;


		rc = sde_fence_create(&c_conn->retire_fence, &fence_fd, 0);
		/*
		 * update the the offset to a timeline for commit completion
		 */
		rc = sde_fence_create(&c_conn->retire_fence, &fence_fd, 1);
		if (rc) {
		if (rc) {
			SDE_ERROR("fence create failed rc:%d\n", rc);
			SDE_ERROR("fence create failed rc:%d\n", rc);
			goto end;
			goto end;
+7 −0
Original line number Original line Diff line number Diff line
@@ -1720,6 +1720,13 @@ static int _sde_crtc_get_output_fence(struct drm_crtc *crtc,


	offset = sde_crtc_get_property(cstate, CRTC_PROP_OUTPUT_FENCE_OFFSET);
	offset = sde_crtc_get_property(cstate, CRTC_PROP_OUTPUT_FENCE_OFFSET);


	/*
	 * Hwcomposer now queries the fences using the commit list in atomic
	 * commit ioctl. The offset should be set to next timeline
	 * which will be incremented during the prepare commit phase
	 */
	offset++;

	return sde_fence_create(&sde_crtc->output_fence, val, offset);
	return sde_fence_create(&sde_crtc->output_fence, val, offset);
}
}