hwc: Use asynchronous commit ioctl for display post
bug: 7274951 Change-Id: I70b2a00d6a2558f533bd87c92038774126434f03
This commit is contained in:
committed by
Iliyan Malchev
parent
ff4f0254be
commit
32aa90fc54
@@ -18,6 +18,7 @@
|
||||
#ifndef FB_PRIV_H
|
||||
#define FB_PRIV_H
|
||||
#include <linux/fb.h>
|
||||
#include <linux/msm_mdp.h>
|
||||
|
||||
#define NUM_FRAMEBUFFERS_MIN 2
|
||||
#define NUM_FRAMEBUFFERS_MAX 3
|
||||
@@ -44,6 +45,8 @@ struct private_module_t {
|
||||
pthread_mutex_t lock;
|
||||
private_handle_t *currentBuffer;
|
||||
struct fb_var_screeninfo info;
|
||||
struct mdp_buf_fence fence;
|
||||
struct mdp_display_commit commit;
|
||||
struct fb_fix_screeninfo finfo;
|
||||
float xdpi;
|
||||
float ydpi;
|
||||
|
||||
@@ -111,7 +111,8 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer)
|
||||
if (hnd && hnd->flags & private_handle_t::PRIV_FLAGS_FRAMEBUFFER) {
|
||||
m->info.activate = FB_ACTIVATE_VBL | FB_ACTIVATE_FORCE;
|
||||
m->info.yoffset = hnd->offset / m->finfo.line_length;
|
||||
if (ioctl(m->framebuffer->fd, FBIOPUT_VSCREENINFO, &m->info) == -1) {
|
||||
m->commit.var = m->info;
|
||||
if (ioctl(m->framebuffer->fd, MSMFB_DISPLAY_COMMIT, &m->commit) == -1) {
|
||||
ALOGE("%s: FBIOPUT_VSCREENINFO failed for external, err: %s", __FUNCTION__,
|
||||
strerror(errno));
|
||||
return -errno;
|
||||
@@ -152,6 +153,9 @@ int mapFrameBufferLocked(struct private_module_t* module)
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
|
||||
memset(&module->fence, 0, sizeof(struct mdp_buf_fence));
|
||||
memset(&module->commit, 0, sizeof(struct mdp_display_commit));
|
||||
|
||||
struct fb_fix_screeninfo finfo;
|
||||
if (ioctl(fd, FBIOGET_FSCREENINFO, &finfo) == -1)
|
||||
return -errno;
|
||||
|
||||
Reference in New Issue
Block a user