From bc9ce81318cd8c2b364cc1e16e6fe7de5f94b713 Mon Sep 17 00:00:00 2001 From: Tony Kim Date: Fri, 11 Nov 2022 17:06:55 +0900 Subject: [PATCH] [PATCH] [MMCEI-9987] congested vbi interrupt filtering (3) Change-Id: I652b6d64efa7b8f854c1ad77e17e1f538445a86a --- amp/src/hal/vpp/g4_hdr/ca_wrapper/source/vpp_api_tz.c | 6 +++++- amp/src/service/display/src/disp_prv.c | 12 ++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/amp/src/hal/vpp/g4_hdr/ca_wrapper/source/vpp_api_tz.c b/amp/src/hal/vpp/g4_hdr/ca_wrapper/source/vpp_api_tz.c index 0889acd..b8b2505 100644 --- a/amp/src/hal/vpp/g4_hdr/ca_wrapper/source/vpp_api_tz.c +++ b/amp/src/hal/vpp/g4_hdr/ca_wrapper/source/vpp_api_tz.c @@ -480,6 +480,7 @@ INT MV_VPPOBJ_Suspend(INT handle, BOOL optimize) VPP_LOG("%s \n", __FUNCTION__); Ret = VppSuspend(optimize); + VPP_playback_started = 0; //toto add return (Ret); } @@ -1087,6 +1088,9 @@ INT MV_VPPOBJ_EarlyDisplayFrame(INT handle, INT planeID, VOID *frame) * MV_EUNCONFIG - VPP not configured or plane not active * MV_EFRAMEQFULL - frame queue is full *******************************************************************/ + int g_last_video_plane_dst_x =0; + int g_last_video_plane_dst_y =0; + INT MV_VPPOBJ_DisplayFrame(INT handle, INT planeID, VOID *frame) { VDEC_VID_BUF_DESC *pDesc; @@ -1101,7 +1105,7 @@ INT MV_VPPOBJ_DisplayFrame(INT handle, INT planeID, VOID *frame) pDesc = (VDEC_VID_BUF_DESC *)frame; pVBufInfo = pDesc->user_data; pVBufInfo->m_hDesc = (UINT32)frame; - if (!pVBufInfo->builtinFrame) { + if (!pVBufInfo->builtinFrame && g_last_video_plane_dst_x && g_last_video_plane_dst_y ) { VPP_playback_started = 1; } #if 1 diff --git a/amp/src/service/display/src/disp_prv.c b/amp/src/service/display/src/disp_prv.c index 5ef14b0..7760f0a 100755 --- a/amp/src/service/display/src/disp_prv.c +++ b/amp/src/service/display/src/disp_prv.c @@ -1556,6 +1556,8 @@ video_setscale_ratioctrl_exit: return Ret; } + extern int g_last_video_plane_dst_x; + extern int g_last_video_plane_dst_y; VOID set_scale_handler(DISP_PLANE *pPlane, MV_CC_MSG_t *pMsg) { BOOL DstInvalid = FALSE; @@ -1625,6 +1627,16 @@ VOID set_scale_handler(DISP_PLANE *pPlane, MV_CC_MSG_t *pMsg) pPlane->DesiredWins.dst.x, pPlane->DesiredWins.dst.y, pPlane->DesiredWins.dst.width, pPlane->DesiredWins.dst.height, pPlane->ScalingMode); + + DISP_MODULE *pDisp; + pDisp = gDispModule; + + if (pPlane == &(pDisp->Plane[AMP_DISP_PLANE_MAIN]) ) + { + //store the last scaling param for main video + g_last_video_plane_dst_x = pPlane->DesiredWins.dst.x; + g_last_video_plane_dst_y = pPlane->DesiredWins.dst.y; + } AmpFree(pScalingWins); } -- 2.7.4