hwc: qbuf: Add API to unlock all
Add API to unlock all current and previous buffers. This is essential in suspend cases. CRs-fixed: 382332 (cherry picked from commit d24eb9e70480f89561108078f68cbbd9b20e4bb5) Change-Id: I54fcded7cabc79d991d4b28a248867d860ec6b08
This commit is contained in:
parent
54cbb6f94f
commit
1be2fcd4f0
@ -180,7 +180,7 @@ static int hwc_set(hwc_composer_device_t *dev,
|
||||
ctx->mExtDisplay->commit();
|
||||
} else {
|
||||
ctx->mOverlay->setState(ovutils::OV_CLOSED);
|
||||
ctx->qbuf->unlockAllPrevious();
|
||||
ctx->qbuf->unlockAll();
|
||||
}
|
||||
|
||||
if(!ctx->overlayInUse)
|
||||
|
@ -33,7 +33,10 @@ class QueuedBufferStore {
|
||||
}
|
||||
~QueuedBufferStore() {}
|
||||
void lockAndAdd(private_handle_t*);
|
||||
//Unlocks only previous and makes the current as previous
|
||||
void unlockAllPrevious();
|
||||
//Unlocks previous as well as current, useful in suspend case
|
||||
void unlockAll();
|
||||
|
||||
private:
|
||||
QueuedBufferStore& operator=(const QueuedBufferStore&);
|
||||
@ -70,6 +73,13 @@ inline void QueuedBufferStore::unlockAllPrevious() {
|
||||
clearCurrent();
|
||||
}
|
||||
|
||||
inline void QueuedBufferStore::unlockAll() {
|
||||
//Unlocks prev and moves current to prev
|
||||
unlockAllPrevious();
|
||||
//Unlocks the newly populated prev if any.
|
||||
unlockAllPrevious();
|
||||
}
|
||||
|
||||
//Clear currentbuf store
|
||||
inline void QueuedBufferStore::clearCurrent() {
|
||||
for(int i = 0; i < MAX_QUEUED_BUFS; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user