0 前言
本文主要分析iTOP4412 VSYNC的实现。
1 HWC
如果NUM_OF_WIN_BUF小于2,则使能FIMD VSYNC
#if (NUM_OF_WIN_BUF < 2)
#define ENABLE_FIMD_VSYNC
#endif
// @file: device/samsung/exynos4/libhwcomposer/SecHWCUtils.h
在window的开、关函数中会通过S3CFB_SET_VSYNC_INT对上述VSYNC进行开、关控制:
int window_open(struct hwc_win_info_t *win, int id)
{
...
#ifdef ENABLE_FIMD_VSYNC
if (ioctl(win->fd, S3CFB_SET_VSYNC_INT, &vsync) < 0) {
SEC_HWC_Log(HWC_LOG_ERROR, "%s::S3CFB_SET_VSYNC_INT fail", __func__);
goto error;
}
#endif
...
}
// @file: device/samsung/exynos4/libhwcomposer/SecHWCUtils.cpp
int window_close(struct hwc_win_info_t *win)
{
int ret = 0;
if (0 < win->fd) {
...
#ifdef ENABLE_FIMD_VSYNC
int vsync = 0
|