summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 614e9c7)
raw | patch | inline | side by side (from parent 1: 614e9c7)
[DSS DRV][Bug Fix][PDK-5040]Display stops working if two pipelines are started back... REL.CORESDK.07.03.00.22
author | Vivek Dhande <a0132295@ti.com> | |
Sun, 14 Mar 2021 14:00:01 +0000 (19:30 +0530) | ||
committer | Ankur <ankurbaranwal@ti.com> | |
Mon, 15 Mar 2021 07:36:43 +0000 (02:36 -0500) |
- Issue:
- When two display pipelines (connected to the same overlay) are started back to back by calling FVID2_Start() twice, pipelines do not start and does not display anything.
- Same is observed for 2 LCDs
- Resolution:
- Second start has to wait for a VSYNC to come from first pipeline before starting
- Fix:
- We should not allow pipelines to be started back to back until the first vsync callback of pipeline comes.
- Wait for semaphore before starting second pipeline
Signed-off-by: Vivek Dhande <a0132295@ti.com>
- When two display pipelines (connected to the same overlay) are started back to back by calling FVID2_Start() twice, pipelines do not start and does not display anything.
- Same is observed for 2 LCDs
- Resolution:
- Second start has to wait for a VSYNC to come from first pipeline before starting
- Fix:
- We should not allow pipelines to be started back to back until the first vsync callback of pipeline comes.
- Wait for semaphore before starting second pipeline
Signed-off-by: Vivek Dhande <a0132295@ti.com>
diff --git a/packages/ti/drv/dss/src/drv/dctrl/dss_dctrlApi.c b/packages/ti/drv/dss/src/drv/dctrl/dss_dctrlApi.c
index cfb455142ab56885926f6381c05e754cae1db780..95f41856569bb78c91d5e6c7d9001f5be81e404a 100755 (executable)
Dss_DctrlDrvInfo gDss_DctrlDrvInfo;
Dss_EvtMgrClientInfo gDss_DctrlEvtMgrClientInfo[DSS_DCTRL_EVT_MGR_MAX_CLIENTS];
+/* Semaphore to sync up back to back Fvid2_start() calls.
+ A VSYNC is needed between back to back Fvid2_start() calls. */
+SemaphoreP_Handle gDssStartSyncSem;
/* ========================================================================== */
/* Internal/Private Function Declarations */
/* ========================================================================== */
sizeof (Dss_DctrlDrvInitParams));
}
}
+ if (FVID2_SOK == retVal)
+ {
+ /* create semaphore */
+ SemaphoreP_Params_init(&semParams);
+ semParams.mode = SemaphoreP_Mode_BINARY;
+ gDssStartSyncSem = SemaphoreP_create(1U, &semParams);
+ }
return (retVal);
}
pObj->isRegistered = FALSE;
}
+ if (gDssStartSyncSem != NULL)
+ {
+ /* Delete semaphore */
+ (void)SemaphoreP_delete(gDssStartSyncSem);
+ }
+
return (retVal);
}
}
else if(DSS_VP_EVENT_VSYNC == currEvent)
{
+ /* Post crate sync semaphore */
+ if(NULL != gDssStartSyncSem)
+ {
+ /* Post the instance semaphore */
+ (void) SemaphoreP_post(gDssStartSyncSem);
+ }
activePipeNum = 0U;
for(j=0U; j<gDss_DctrlDrvInfo.numValidPipes; j++)
{
diff --git a/packages/ti/drv/dss/src/drv/dctrl/dss_dctrlPriv.h b/packages/ti/drv/dss/src/drv/dctrl/dss_dctrlPriv.h
index 14556755ac0ec015e5c78c8266d622abe1ead561..fe9ee75ecea9ecefe1678847c5d09385e7b65cec 100755 (executable)
Dss_DctrlDrvInstObj *instObj;
/**< Display instance objects pointer */
Dss_DctrlDrvInitParams drvInitParams;
+ /**< Display driver initialization parameters objects pointer */
} Dss_DctrlDrvCommonObj;
/**
diff --git a/packages/ti/drv/dss/src/drv/disp/dss_dispApi.c b/packages/ti/drv/dss/src/drv/disp/dss_dispApi.c
index 992ccda0137aea3ac16036ad9ce6c6a28b1e638e..b49ffbc9adb7e3fb3f5de84629276a50ed7c3f9b 100755 (executable)
extern Dss_EvtMgrClientInfo gDss_DispEvtMgrClientInfo[DSS_DISP_EVT_MGR_MAX_CLIENTS];
+extern SemaphoreP_Handle gDssStartSyncSem;
/* ========================================================================== */
/* Internal/Private Function Declarations */
/* ========================================================================== */
/* Check for NULL pointers */
GT_assert(DssTrace, (NULL != instObj));
+ /* wait for start sync semaphore */
+ if(NULL != gDssStartSyncSem)
+ {
+ /* Take the instance semaphore */
+ (void) SemaphoreP_pend(gDssStartSyncSem, SemaphoreP_WAIT_FOREVER);
+ }
+
/* Take the instance semaphore */
(void) SemaphoreP_pend(instObj->lockSem, SemaphoreP_WAIT_FOREVER);