diff options
author | Sushil Chauhan <sushilchauhan@codeaurora.org> | 2013-12-02 13:27:53 -0800 |
---|---|---|
committer | Sushil Chauhan <sushilchauhan@codeaurora.org> | 2013-12-02 13:27:53 -0800 |
commit | 9be6542ada4cda7d0bf9cd71867aba37e32dfb39 (patch) | |
tree | eb29f91250cf94b46e6046e319acaf8a06df07cb /libcopybit | |
parent | bff954800abc9804804f57c99cad616b28e75791 (diff) | |
download | display-9be6542ada4cda7d0bf9cd71867aba37e32dfb39.tar.gz |
copybit: Initialize release & acquire fence fds of Copybit context.
Initialize release and acquire fence fds of Copybit context to -1.
Otherwise fd 0 gets closed in first call to msm_copybit, which is
valid fd and it leads to bad state if fd 0 is being used as stdin.
Change-Id: I01278bbb580d61e2d4b4c7b3f7b346274af6d914
Diffstat (limited to 'libcopybit')
-rw-r--r-- | libcopybit/copybit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcopybit/copybit.cpp b/libcopybit/copybit.cpp index 5d8da05d..47d9b937 100644 --- a/libcopybit/copybit.cpp +++ b/libcopybit/copybit.cpp @@ -714,6 +714,10 @@ static int open_copybit(const struct hw_module_t* module, const char* name, ctx->mAlpha = MDP_ALPHA_NOP; ctx->mFlags = 0; ctx->sync.flags = 0; + ctx->relFence = -1; + for (int i=0; i < MDP_MAX_FENCE_FD; i++) { + ctx->acqFence[i] = -1; + } ctx->sync.acq_fen_fd = ctx->acqFence; ctx->sync.rel_fen_fd = &ctx->relFence; ctx->list.count = 0; |