summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c900c65)
raw | patch | inline | side by side (parent: c900c65)
author | Vivek Dhande <a0132295@ti.com> | |
Fri, 4 Sep 2020 12:39:03 +0000 (18:09 +0530) | ||
committer | Vivek Dhande <a0132295@ti.com> | |
Fri, 4 Sep 2020 12:44:59 +0000 (18:14 +0530) |
- Reduced test time from 120 seconds to 30 seconds
- Issue:
- Sample application was printing wrong number of frames displayed
- Root-cause
- App has an additional layer on top of normal UART/CIO print statements
- Argument parsing done in this function was incorrect
- Resolution:
- Add 'vsnprintf()' along with 'va_start()' and 'va_end()' for argument parsing
Signed-off-by: Vivek Dhande <a0132295@ti.com>
- Issue:
- Sample application was printing wrong number of frames displayed
- Root-cause
- App has an additional layer on top of normal UART/CIO print statements
- Argument parsing done in this function was incorrect
- Resolution:
- Add 'vsnprintf()' along with 'va_start()' and 'va_end()' for argument parsing
Signed-off-by: Vivek Dhande <a0132295@ti.com>
packages/ti/drv/dss/examples/dss_display_test/dss_display_test.c | patch | blob | history | |
packages/ti/drv/dss/examples/dss_display_test/dss_display_test.h | patch | blob | history |
diff --git a/packages/ti/drv/dss/examples/dss_display_test/dss_display_test.c b/packages/ti/drv/dss/examples/dss_display_test/dss_display_test.c
index 66dc1b6443713bfd28674625a6484297afeec9ed..da5d6035cc826024dc9d20dac874af925f52a51d 100755 (executable)
Utils_prfLoadPrintAll(TRUE, 0);
Utils_prfLoadCalcReset();
Utils_prfLoadUnRegister(TaskP_self());
- App_print("Number of frames = %d, elapsed msec = %d, fps = %d\n",
+ App_print("Number of frames = %d, elapsed msec = %d, fps = %0.2f\n",
DISP_APP_RUN_COUNT,
gTestStopTime - gTestStartTime,
- (uint32_t)((float)DISP_APP_RUN_COUNT / ((gTestStopTime - gTestStartTime)/1000.0)));
+ (float)((float)DISP_APP_RUN_COUNT / ((gTestStopTime - gTestStartTime)/1000.0)));
#endif
void App_print(const char *format, ...)
{
- va_list vaArgPtr;
- va_start(vaArgPtr, format);
-
- DSS_log(format, vaArgPtr);
- va_end(vaArgPtr);
-
- return;
+ char printBuffer[DISP_APP_PRINT_BUFFER_SIZE];
+ va_list arguments;
+
+ /* Start the var args processing. */
+ va_start(arguments, format);
+ vsnprintf (printBuffer, sizeof(printBuffer), format, arguments);
+ DSS_log(printBuffer);
+ /* End the var args processing. */
+ va_end(arguments);
}
diff --git a/packages/ti/drv/dss/examples/dss_display_test/dss_display_test.h b/packages/ti/drv/dss/examples/dss_display_test/dss_display_test.h
index f51c4cb2242de54c308787902328cc26d002da11..36b2fb962130f6e5538964947b5868a471d1971a 100755 (executable)
#if defined (SIMULATOR)
#define DISP_APP_RUN_COUNT (0x10U)
#else
-#define DISP_APP_RUN_COUNT (0x1000U)
+#define DISP_APP_RUN_COUNT ((uint32_t)2000U)
#endif
/* Worst case frames per handle */
#define DSS_log printf
#endif
+/* Print buffer character limit for prints- UART or CCS Console */
+#define DISP_APP_PRINT_BUFFER_SIZE ((uint32_t)4000)
/* ========================================================================== */
/* Structure Declarations */
/* ========================================================================== */