From d36ea0b01af64bd56755835334e13673b0f8d9aa Mon Sep 17 00:00:00 2001 From: Tony Kim Date: Mon, 5 Sep 2022 17:12:30 +0900 Subject: [PATCH 4/4] https://sc-debu-git.synaptics.com/gerrit/#/c/171604/2 Change-Id: Ic8fd170b2fb124fb6170148f6374ee9fcc8a86ea --- amp/src/service/display/src/disp_api.c | 22 ++++++++++++++-------- amp/src/service/display/src/disp_prv.c | 16 +++++++++++++--- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/amp/src/service/display/src/disp_api.c b/amp/src/service/display/src/disp_api.c index adb8bea..6e94f1e 100755 --- a/amp/src/service/display/src/disp_api.c +++ b/amp/src/service/display/src/disp_api.c @@ -2874,7 +2874,7 @@ HRESULT DISP_DEINT_ReturnInBDFn(void *pInst, AMP_BD_HANDLE hInBD) { DISP_PLANE *pPlane = (DISP_PLANE *)pInst; HRESULT ret = SUCCESS; - DISP_INFO("return Input BD from DEINT pPlane=%p hBD=%p to pOutputQue", + DISP_HIGH("return Input BD from DEINT pPlane=%p hBD=%p to pOutputQue\n", pPlane, hInBD); ret = AMP_BDCHAIN_PushItem(pPlane->pOutputQue, hInBD); ASSERT_RET_SHOW(ret, "AMP_BDCHAIN_PushItem outputQ=%p BD=%p ret=%x\n", @@ -3061,6 +3061,7 @@ HRESULT DISP_DEINT_recy_OutBD(DISP_PLANE *pPlane, AMP_BD_HANDLE hBD) { HRESULT ret = SUCCESS; if (!isInBDChain(pPlane->pDEINTDispBDQ, hBD)) { + DISP_HIGH("pPlane:%p, push hBD:%p\n", pPlane, hBD); ret = AMP_BDCHAIN_PushItem(pPlane->pOutputQue, hBD); ASSERT_RET_SHOW(ret, "push item output que hBD=%p", hBD); return ret; @@ -3260,6 +3261,7 @@ HRESULT DISP_VID_PushFrame(AMP_DISP_PLANE_ID uiPlaneId, VOID *handle, AMP_BD_ST #ifndef VPP_ENABLE_VPP_TA_IN_QUIESCENT_MODE if(g_quiescentMode) { //Re-cycle immediately if VPP_TA is not present in quiescent mode + DISP_HIGH("uiPlaneId:%d, push hBD:%p\n", uiPlaneId, hBD); Ret = AMP_BDCHAIN_PushItem(pPlane->pOutputQue, hBD); if (Ret != SUCCESS) { DISP_ERROR("DISP_DEINT_PushFrame fails, error code [%x]!", Ret); @@ -3359,7 +3361,7 @@ HRESULT DISP_VID_PopFrame(AMP_DISP_PLANE_ID uiPlaneId, VOID *handle, AMP_BD_HAND } if (isTagPath(hBD, handle)) { - DISP_MID("find BD=%p from handle=%p", hBD, handle); + DISP_HIGH("find BD=%p from handle=%p\n", hBD, handle); /* set frame status to displayed */ Ret = BD_GetFrameInfo(hBD, &pFrameInfo); @@ -3383,10 +3385,10 @@ HRESULT DISP_VID_PopFrame(AMP_DISP_PLANE_ID uiPlaneId, VOID *handle, AMP_BD_HAND to unused before deleting the item from o/p queue*/ if (is_last_frame(hBD)) { if(gVPPMapTable.vpp_plane_map[uiPlaneId].is_video) { - DISP_HIGH("free last frame here!!!"); + DISP_HIGH("free last frame here!!!\n"); video_plane_ref_bd(uiPlaneId, hBD, FALSE); } - DISP_HIGH("Clearing the status of built-in frame of type REPEAT_LAST_FRAME"); + DISP_HIGH("Clearing the status of built-in frame of type REPEAT_LAST_FRAME\n"); disp_last_frame_recycle(uiPlaneId); } Ret = AMP_BDCHAIN_DeleteItem(pPlane->pOutputQue, hBD); @@ -3401,21 +3403,21 @@ HRESULT DISP_VID_PopFrame(AMP_DISP_PLANE_ID uiPlaneId, VOID *handle, AMP_BD_HAND Ret = AMP_BD_GetStatus(hBD, &bValid, &uiRefCnt); if (Ret != SUCCESS || !bValid || uiRefCnt == 1) { DISP_ERROR("BD exception, AMP_BD_GetStatus hBD:%p ret=0x%x, valid:%d, " - "refCnt:%d, handle:%p, uiPlaneId:%d\n", hBD, Ret, bValid, - uiRefCnt, handle, uiPlaneId); + "refCnt:%d, handle:%p, uiPlaneId:%d, *pBD:%p\n", hBD, Ret, bValid, + uiRefCnt, handle, uiPlaneId, *pBD); Ret = ERR_SWMODEWRONG; goto Disp_PopFrame_Exit; } Ret = AMP_BD_Unref(hBD); if (Ret != SUCCESS) { - DISP_ERROR("AMP_BD_Unref fails, error code [%x]!", Ret); + DISP_ERROR("AMP_BD_Unref fails, error code [%x]!\n", Ret); goto Disp_PopFrame_Exit; } Ret = AMP_BD_Unmap(hBD); if (Ret != SUCCESS) { - DISP_ERROR("AMP_BD_Unmap fails, hBD=%p error code [%x]!", hBD, Ret); + DISP_ERROR("AMP_BD_Unmap fails, hBD=%p error code [%x]!\n", hBD, Ret); goto Disp_PopFrame_Exit; } @@ -5626,6 +5628,10 @@ HRESULT DISP_GFX_PushBD(AMP_DISP_PLANE_ID uiPlaneId, AMP_BD_ST *hBD) if(g_quiescentMode) { //Re-cycle immediately if VPP_TA is not present in quiescent mode pFrameInfo->uStatus = AMP_FRAME_ST_DISPLAYED; + + if (uiPlaneId == AMP_DISP_PLANE_MAIN) { + DISP_HIGH("uiPlaneId:%d, push hBD:%p\n", uiPlaneId, hBD); + } Ret = AMP_BDCHAIN_PushItem(pPlane->pOutputQue, hBD); GFX_STATUS_BROADCAST(); return Ret; diff --git a/amp/src/service/display/src/disp_prv.c b/amp/src/service/display/src/disp_prv.c index ea13f6c..5ef14b0 100755 --- a/amp/src/service/display/src/disp_prv.c +++ b/amp/src/service/display/src/disp_prv.c @@ -955,7 +955,7 @@ HRESULT bdchain_move_items(DISP_PLANE *pPlane, AMP_BDCHAIN *pChainIn, else #endif { - DISP_INFO("move BD=%p %p -> %p", + DISP_HIGH("move BD=%p %p -> %p", pFrame, pChainIn, pChainOut); Ret = AMP_BDCHAIN_PushItem(pChainOut, pFrame); @@ -2698,6 +2698,9 @@ VOID disp_callback_isr(VOID) /* after push new frame, pervious BD is still displaying and will be recycled in next V sync */ if (pPlane->LastBD) { + if (PlaneId == AMP_DISP_PLANE_MAIN) { + DISP_HIGH("PlaneId:%d, push hBD:%p\n", PlaneId, pPlane->LastBD); + } Ret = AMP_BDCHAIN_PushItem(pPlane->pOutputQue, pPlane->LastBD); if (Ret != SUCCESS) { DISP_ERROR("Push to pOutputQue hBD=%p fail ret=%x", @@ -2710,9 +2713,12 @@ VOID disp_callback_isr(VOID) /* current BD is build in frame, recycle it here */ if (pPlane->pCurrentDisp == pPlane->pDefaultLogo) { if (pPlane->CurrentBD) { + if (PlaneId == AMP_DISP_PLANE_MAIN) { + DISP_HIGH("PlaneId:%d, push hBD:%p\n", PlaneId, pPlane->CurrentBD); + } Ret = AMP_BDCHAIN_PushItem(pPlane->pOutputQue, pPlane->CurrentBD); if (Ret != SUCCESS) { - DISP_ERROR("Push to pOutputQue hBD=%p fail ret=%x", + DISP_ERROR("Push to pOutputQue hBD=%p fail ret=%x\n", pPlane->CurrentBD, Ret); } @@ -2795,9 +2801,13 @@ VOID disp_callback_isr_end(VOID) if ((Ret != SUCCESS)||(!pFrameInfo)) DISP_ERROR(" BD_GetFrameInfo fails, BD:0x%x\n", hBD); + if (PlaneId == AMP_DISP_PLANE_MAIN) { + DISP_HIGH("PlaneId:%d, push hBD:%p\n", PlaneId, hBD); + } + Ret = AMP_BDCHAIN_PushItem(pPlane->pOutputQue, hBD); if (Ret != SUCCESS) - DISP_ERROR("Push to pOutputQue hBD=%p fail ret=%x", hBD, Ret); + DISP_ERROR("Push to pOutputQue hBD=%p fail ret=%x\n", hBD, Ret); } } if(gVPPMapTable.vpp_plane_map[PlaneId].is_video) { -- 2.7.4