diff options
author | Janghyuck Kim <janghyuck.kim@samsung.com> | 2019-09-05 13:25:43 +0900 |
---|---|---|
committer | Cho KyongHo <pullip.cho@samsung.com> | 2020-02-25 10:43:40 -0800 |
commit | 70ade3fb91faf93c1f8b41713fbf5c43af5399cc (patch) | |
tree | 389d57a0f08bec23114098397b076a0d84932ab4 | |
parent | be3fa43062b5574d9710c9160ba8cc45714851d0 (diff) |
libacryl: add framerate setting for mscl
Change-Id: I1c8852971073b59b19dd52c3c2ae1a6b7c2494f2
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
-rw-r--r-- | libacryl/acrylic_mscl9810.cpp | 22 | ||||
-rw-r--r-- | libacryl/acrylic_mscl9810.h | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/libacryl/acrylic_mscl9810.cpp b/libacryl/acrylic_mscl9810.cpp index 5d1c6d9..fe9fc46 100644 --- a/libacryl/acrylic_mscl9810.cpp +++ b/libacryl/acrylic_mscl9810.cpp @@ -20,6 +20,7 @@ #define V4L2_CID_CONTENT_PROTECTION (EXYNOS_CID_BASE + 201) #define V4L2_CID_CSC_EQ (EXYNOS_CID_BASE + 101) #define V4L2_CID_CSC_RANGE (EXYNOS_CID_BASE + 102) +#define SC_CID_FRAMERATE (EXYNOS_CID_BASE + 110) static const char *__dirname[AcrylicCompositorMSCL9810::NUM_IMAGES] = {"source", "target"}; @@ -614,3 +615,24 @@ bool AcrylicCompositorMSCL9810::waitExecution(int __unused handle) { return dequeueBuffer(); } + +bool AcrylicCompositorMSCL9810::requestPerformanceQoS(AcrylicPerformanceRequest *request) +{ + uint32_t framerate; + + if (!request || (request->getFrameCount() == 0)) + framerate = 0; + else + framerate = request->getFrame(0)->mFrameRate; + + v4l2_control ctrl; + + ctrl.id = SC_CID_FRAMERATE; + ctrl.value = framerate; + ALOGD_TEST("VIDIOC_S_CTRL: framerate=%d", ctrl.value); + /* For compatiblity, error is not returned. */ + if (mDev.ioctl(VIDIOC_S_CTRL, &ctrl) < 0) + ALOGD("Trying set frame rate is failed, but ignored"); + + return true; +} diff --git a/libacryl/acrylic_mscl9810.h b/libacryl/acrylic_mscl9810.h index 71baa77..47642e9 100644 --- a/libacryl/acrylic_mscl9810.h +++ b/libacryl/acrylic_mscl9810.h @@ -33,6 +33,7 @@ public: virtual bool execute(int fence[], unsigned int num_fences); virtual bool execute(int *handle = NULL); virtual bool waitExecution(int handle); + virtual bool requestPerformanceQoS(AcrylicPerformanceRequest *request); private: enum { STATE_REQBUFS = 1, STATE_QBUF = 2, STATE_PROCESSING = STATE_REQBUFS | STATE_QBUF }; |