[Xf86-video-armsoc] [PATCH 1/1] Only modify pending_flips for flips

armsoc-bugs at arm.com armsoc-bugs at arm.com
Fri Jan 31 09:49:40 PST 2014


From: Mathias Palmqvist <mathias.palmqvist at arm.com>

The following commit is copied from chromeos xf86-video-armsoc
https://chromium.googlesource.com/chromiumos/third_party/xf86-video-armsoc/+/c04f8b8%5E%21/

Change-Id: Iaa29210066c835ce30826a6ca34073aca72e0825
---
 src/armsoc_dri2.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/armsoc_dri2.c b/src/armsoc_dri2.c
index 32572ee..a9700d7 100644
--- a/src/armsoc_dri2.c
+++ b/src/armsoc_dri2.c
@@ -573,7 +573,8 @@ ARMSOCDRI2SwapComplete(struct ARMSOCDRISwapCmd *cmd)
 	ARMSOCDRI2DestroyBuffer(pDraw, cmd->pDstBuffer);
 	armsoc_bo_unreference(old_src_bo);
 	armsoc_bo_unreference(old_dst_bo);
-	pARMSOC->pending_flips--;
+	if (cmd->type == DRI2_FLIP_COMPLETE)
+		pARMSOC->pending_flips--;
 
 	free(cmd);
 }
@@ -626,7 +627,6 @@ ARMSOCDRI2ScheduleSwap(ClientPtr client, DrawablePtr pDraw,
 	 */
 	ARMSOCDRI2ReferenceBuffer(pSrcBuffer);
 	ARMSOCDRI2ReferenceBuffer(pDstBuffer);
-	pARMSOC->pending_flips++;
 
 	src_bo = boFromBuffer(pSrcBuffer);
 	dst_bo = boFromBuffer(pDstBuffer);
@@ -680,6 +680,7 @@ ARMSOCDRI2ScheduleSwap(ClientPtr client, DrawablePtr pDraw,
 		/* TODO: MIDEGL-1461: Handle rollback if multiple CRTC flip is
 		 * only partially successful
 		 */
+		pARMSOC->pending_flips++;
 		ret = drmmode_page_flip(pDraw, src_fb_id, cmd);
 
 		/* If using page flip events, we'll trigger an immediate
-- 
1.7.9.5



More information about the Xf86-video-armsoc mailing list