hwc: Avoid changing VG pipe color format dynamically
VG pipe can be allocated for both YUV as well as RGB layer.
Switching this color format dynamically can cause overlay set
failure due to smp allocation change. Avoid this condition by
storing the color format it is allocated for.
Change-Id: I84df03883bd050c80d49e2ab63a37905535fb670
diff --git a/liboverlay/overlay.h b/liboverlay/overlay.h
index e8369ca..665e23f 100644
--- a/liboverlay/overlay.h
+++ b/liboverlay/overlay.h
@@ -50,7 +50,7 @@
enum { MIXER_LEFT, MIXER_RIGHT, MIXER_UNUSED };
enum { MIXER_DEFAULT = MIXER_LEFT, MIXER_MAX = MIXER_UNUSED };
enum { MAX_FB_DEVICES = DPY_MAX };
- enum { FORMAT_YUV, FORMAT_RGB };
+ enum { FORMAT_YUV, FORMAT_RGB , FORMAT_NONE };
struct PipeSpecs {
PipeSpecs() : formatClass(FORMAT_RGB), needsScaling(false), fb(false),
@@ -170,7 +170,7 @@
* display without being garbage-collected once. To add if a pipe is
* asisgned to a mixer within a display it cannot be reused for another
* mixer without being UNSET once*/
- utils::eDest nextPipe(utils::eMdpPipeType, int dpy, int mixer);
+ utils::eDest nextPipe(utils::eMdpPipeType, const PipeSpecs& pipeSpecs);
/* Helpers that enfore target specific policies while returning pipes */
utils::eDest getPipe_8x26(const PipeSpecs& pipeSpecs);
utils::eDest getPipe_8x16(const PipeSpecs& pipeSpecs);
@@ -199,6 +199,8 @@
int mDisplay;
/* Mixer within a split display this pipe is attached to */
int mMixer;
+ /* Format for which this pipe is attached to the mixer*/
+ int mFormatType;
/* operations on bitmap */
static bool pipeUsageUnchanged();