blob: bc41bd9b790d79cd73052660a4e9bef4e533e593 [file] [log] [blame]
Naseer Ahmed7c958d42012-07-31 18:57:03 -07001/*
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -08002 * Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
3 *
Naseer Ahmed7c958d42012-07-31 18:57:03 -07004 * Not a Contribution, Apache license notifications and license are retained
5 * for attribution purposes only.
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20#ifndef HWC_MDP_COMP
21#define HWC_MDP_COMP
22
23#include <hwc_utils.h>
24#include <idle_invalidator.h>
25#include <cutils/properties.h>
26#include <overlay.h>
27
Saurabh Shah45782902013-11-15 10:13:14 -080028#define DEFAULT_IDLE_TIME 70
Sushil Chauhan69f2bb22013-02-13 10:50:47 -080029#define MAX_PIPES_PER_MIXER 4
Naseer Ahmed7c958d42012-07-31 18:57:03 -070030
Saurabh Shahacf10202013-02-26 10:15:15 -080031namespace overlay {
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080032class Rotator;
Saurabh Shahacf10202013-02-26 10:15:15 -080033};
34
Naseer Ahmed7c958d42012-07-31 18:57:03 -070035namespace qhwc {
Naseer Ahmed54821fe2012-11-28 18:44:38 -050036namespace ovutils = overlay::utils;
Naseer Ahmed7c958d42012-07-31 18:57:03 -070037
38class MDPComp {
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -080039public:
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080040 explicit MDPComp(int);
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -080041 virtual ~MDPComp(){};
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -080042 /*sets up mdp comp for the current frame */
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080043 int prepare(hwc_context_t *ctx, hwc_display_contents_1_t* list);
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -080044 /* draw */
45 virtual bool draw(hwc_context_t *ctx, hwc_display_contents_1_t *list) = 0;
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080046 /* dumpsys */
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -080047 void dump(android::String8& buf);
Ramkumar Radhakrishnan8bb48d32013-12-30 23:11:27 -080048 bool isGLESOnlyComp() { return (mCurrentFrame.mdpCount == 0); }
Saurabh Shah88e4d272013-09-03 13:31:29 -070049 static MDPComp* getObject(hwc_context_t *ctx, const int& dpy);
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -080050 /* Handler to invoke frame redraw on Idle Timer expiry */
51 static void timeout_handler(void *udata);
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080052 /* Initialize MDP comp*/
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -080053 static bool init(hwc_context_t *ctx);
Saurabh Shah98acd092013-05-03 10:48:24 -070054 static void resetIdleFallBack() { sIdleFallBack = false; }
Saurabh Shah3c1a6b02013-11-22 11:10:20 -080055 static void reset() { sBwClaimed = 0.0; };
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -080056
57protected:
Saurabh Shahe9bc60f2013-08-29 12:58:06 -070058 enum { MAX_SEC_LAYERS = 1 }; //TODO add property support
59
Naseer Ahmed54821fe2012-11-28 18:44:38 -050060 enum ePipeType {
61 MDPCOMP_OV_RGB = ovutils::OV_MDP_PIPE_RGB,
62 MDPCOMP_OV_VG = ovutils::OV_MDP_PIPE_VG,
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -080063 MDPCOMP_OV_DMA = ovutils::OV_MDP_PIPE_DMA,
Naseer Ahmed54821fe2012-11-28 18:44:38 -050064 MDPCOMP_OV_ANY,
Naseer Ahmed7c958d42012-07-31 18:57:03 -070065 };
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080066
67 /* mdp pipe data */
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -080068 struct MdpPipeInfo {
69 int zOrder;
70 virtual ~MdpPipeInfo(){};
71 };
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080072
radhakrishnac9a67412013-09-25 17:40:42 +053073 struct MdpYUVPipeInfo : public MdpPipeInfo{
74 ovutils::eDest lIndex;
75 ovutils::eDest rIndex;
76 virtual ~MdpYUVPipeInfo(){};
77 };
78
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080079 /* per layer data */
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -080080 struct PipeLayerPair {
81 MdpPipeInfo *pipeInfo;
Saurabh Shahacf10202013-02-26 10:15:15 -080082 overlay::Rotator* rot;
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080083 int listIndex;
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -080084 };
85
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080086 /* per frame data */
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -080087 struct FrameInfo {
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080088 /* maps layer list to mdp list */
89 int layerCount;
Ramkumar Radhakrishnane661f962013-06-05 17:21:38 -070090 int layerToMDP[MAX_NUM_APP_LAYERS];
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080091
92 /* maps mdp list to layer list */
93 int mdpCount;
94 struct PipeLayerPair mdpToLayer[MAX_PIPES_PER_MIXER];
95
96 /* layer composing on FB? */
97 int fbCount;
Ramkumar Radhakrishnane661f962013-06-05 17:21:38 -070098 bool isFBComposed[MAX_NUM_APP_LAYERS];
Jeykumar Sankaran6a9bb9e2013-08-01 14:19:26 -070099 /* layers lying outside ROI. Will
100 * be dropped off from the composition */
101 int dropCount;
102 bool drop[MAX_NUM_APP_LAYERS];
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800103
104 bool needsRedraw;
105 int fbZ;
106
107 /* c'tor */
108 FrameInfo();
109 /* clear old frame data */
Saurabh Shahaa236822013-04-24 18:07:26 -0700110 void reset(const int& numLayers);
111 void map();
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800112 };
113
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800114 /* cached data */
115 struct LayerCache {
116 int layerCount;
Ramkumar Radhakrishnane661f962013-06-05 17:21:38 -0700117 buffer_handle_t hnd[MAX_NUM_APP_LAYERS];
Prabhanjan Kandula2243aa62013-10-24 12:58:55 +0530118 bool isFBComposed[MAX_NUM_APP_LAYERS];
119 bool drop[MAX_NUM_APP_LAYERS];
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800120
121 /* c'tor */
122 LayerCache();
123 /* clear caching info*/
124 void reset();
Saurabh Shahaa236822013-04-24 18:07:26 -0700125 void cacheAll(hwc_display_contents_1_t* list);
126 void updateCounts(const FrameInfo&);
Jeykumar Sankaran988d3682013-11-15 11:57:16 -0800127 bool isSameFrame(const FrameInfo& curFrame,
128 hwc_display_contents_1_t* list);
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800129 };
130
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800131 /* allocates pipe from pipe book */
132 virtual bool allocLayerPipes(hwc_context_t *ctx,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800133 hwc_display_contents_1_t* list) = 0;
Saurabh Shahaf5f5972013-07-30 13:56:35 -0700134 /* allocate MDP pipes from overlay */
135 ovutils::eDest getMdpPipe(hwc_context_t *ctx, ePipeType type, int mixer);
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800136 /* configures MPD pipes */
137 virtual int configure(hwc_context_t *ctx, hwc_layer_1_t *layer,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800138 PipeLayerPair& pipeLayerPair) = 0;
Saurabh Shahaf5f5972013-07-30 13:56:35 -0700139 /* Checks for pipes needed versus pipes available */
140 virtual bool arePipesAvailable(hwc_context_t *ctx,
141 hwc_display_contents_1_t* list) = 0;
Saurabh Shah3d4b8042013-12-10 15:19:17 -0800142 /* Increments mdpCount if 4k2k yuv layer split is enabled.
143 * updates framebuffer z order if fb lies above source-split layer */
144 virtual void adjustForSourceSplit(hwc_context_t *ctx,
radhakrishnac9a67412013-09-25 17:40:42 +0530145 hwc_display_contents_1_t* list) = 0;
146 /* configures 4kx2k yuv layer*/
147 virtual int configure4k2kYuv(hwc_context_t *ctx, hwc_layer_1_t *layer,
148 PipeLayerPair& PipeLayerPair) = 0;
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800149 /* set/reset flags for MDPComp */
150 void setMDPCompLayerFlags(hwc_context_t *ctx,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800151 hwc_display_contents_1_t* list);
Saurabh Shahdf4741d2013-12-12 16:40:28 -0800152 void setRedraw(hwc_context_t *ctx,
153 hwc_display_contents_1_t* list);
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800154 /* checks for conditions where mdpcomp is not possible */
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800155 bool isFrameDoable(hwc_context_t *ctx);
156 /* checks for conditions where RGB layers cannot be bypassed */
Saurabh Shahdf4741d2013-12-12 16:40:28 -0800157 bool tryFullFrame(hwc_context_t *ctx, hwc_display_contents_1_t* list);
Saurabh Shahaa236822013-04-24 18:07:26 -0700158 /* checks if full MDP comp can be done */
159 bool fullMDPComp(hwc_context_t *ctx, hwc_display_contents_1_t* list);
160 /* check if we can use layer cache to do at least partial MDP comp */
161 bool partialMDPComp(hwc_context_t *ctx, hwc_display_contents_1_t* list);
Saurabh Shah8028e3b2013-10-15 12:27:59 -0700162 /* Partial MDP comp that uses caching to save power as primary goal */
163 bool cacheBasedComp(hwc_context_t *ctx, hwc_display_contents_1_t* list);
Saurabh Shahb772ae32013-11-18 15:40:02 -0800164 /* Partial MDP comp that prefers GPU perf-wise. Since the GPU's
165 * perf is proportional to the pixels it processes, we use the number of
166 * pixels as a heuristic */
167 bool loadBasedCompPreferGPU(hwc_context_t *ctx,
168 hwc_display_contents_1_t* list);
169 /* Partial MDP comp that prefers MDP perf-wise. Since the MDP's perf is
170 * proportional to the bandwidth, overlaps it sees, we use that as a
171 * heuristic */
172 bool loadBasedCompPreferMDP(hwc_context_t *ctx,
173 hwc_display_contents_1_t* list);
Saurabh Shah8028e3b2013-10-15 12:27:59 -0700174 /* Checks if its worth doing load based partial comp */
175 bool isLoadBasedCompDoable(hwc_context_t *ctx,
176 hwc_display_contents_1_t* list);
Saurabh Shahaa236822013-04-24 18:07:26 -0700177 /* checks for conditions where only video can be bypassed */
Saurabh Shahdf4741d2013-12-12 16:40:28 -0800178 bool tryVideoOnly(hwc_context_t *ctx, hwc_display_contents_1_t* list);
179 bool videoOnlyComp(hwc_context_t *ctx, hwc_display_contents_1_t* list,
Saurabh Shah90b7b9b2013-09-12 16:36:08 -0700180 bool secureOnly);
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800181 /* checks for conditions where YUV layers cannot be bypassed */
182 bool isYUVDoable(hwc_context_t* ctx, hwc_layer_1_t* layer);
Saurabh Shahf5f2b132013-11-25 12:08:35 -0800183 /* calcs bytes read by MDP in gigs for a given frame */
184 double calcMDPBytesRead(hwc_context_t *ctx,
Saurabh Shah8c5c8522013-08-29 17:32:49 -0700185 hwc_display_contents_1_t* list);
186 /* checks if the required bandwidth exceeds a certain max */
Saurabh Shahf5f2b132013-11-25 12:08:35 -0800187 bool bandwidthCheck(hwc_context_t *ctx, const double& size);
Prabhanjan Kandula21918db2013-11-26 15:51:58 +0530188 /* checks if MDP/MDSS can process current list w.r.to HW limitations
189 * All peculiar HW limitations should go here */
190 bool hwLimitationsCheck(hwc_context_t* ctx, hwc_display_contents_1_t* list);
Jeykumar Sankaran6a9bb9e2013-08-01 14:19:26 -0700191 /* generates ROI based on the modified area of the frame */
192 void generateROI(hwc_context_t *ctx, hwc_display_contents_1_t* list);
193 bool validateAndApplyROI(hwc_context_t *ctx, hwc_display_contents_1_t* list,
194 hwc_rect_t roi);
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800195
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800196 /* Is debug enabled */
197 static bool isDebug() { return sDebugLogs ? true : false; };
198 /* Is feature enabled */
199 static bool isEnabled() { return sEnabled; };
Sravan Kumar D.V.Nad5d9292013-04-24 14:23:04 +0530200 /* checks for mdp comp dimension limitation */
201 bool isValidDimension(hwc_context_t *ctx, hwc_layer_1_t *layer);
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800202 /* tracks non updating layers*/
203 void updateLayerCache(hwc_context_t* ctx, hwc_display_contents_1_t* list);
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800204 /* optimize layers for mdp comp*/
Prabhanjan Kandula9bd5f642013-09-25 17:00:36 +0530205 bool markLayersForCaching(hwc_context_t* ctx,
206 hwc_display_contents_1_t* list);
207 int getBatch(hwc_display_contents_1_t* list,
208 int& maxBatchStart, int& maxBatchEnd,
209 int& maxBatchCount);
210 bool canPushBatchToTop(const hwc_display_contents_1_t* list,
211 int fromIndex, int toIndex);
212 bool intersectingUpdatingLayers(const hwc_display_contents_1_t* list,
213 int fromIndex, int toIndex, int targetLayerIndex);
214
215 /* updates cache map with YUV info */
Saurabh Shah90b7b9b2013-09-12 16:36:08 -0700216 void updateYUV(hwc_context_t* ctx, hwc_display_contents_1_t* list,
217 bool secureOnly);
Saurabh Shahdf4741d2013-12-12 16:40:28 -0800218 /* Validates if the GPU/MDP layer split chosen by a strategy is supported
219 * by MDP.
220 * Sets up MDP comp data structures to reflect covnversion from layers to
221 * overlay pipes.
222 * Configures overlay.
223 * Configures if GPU should redraw.
224 */
225 bool postHeuristicsHandling(hwc_context_t *ctx,
226 hwc_display_contents_1_t* list);
227 void reset(hwc_context_t *ctx);
Saurabh Shahe9bc60f2013-08-29 12:58:06 -0700228 bool isSupportedForMDPComp(hwc_context_t *ctx, hwc_layer_1_t* layer);
Saurabh Shah173f4242013-11-20 09:50:12 -0800229 bool resourceCheck(hwc_context_t *ctx, hwc_display_contents_1_t *list);
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800230
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800231 int mDpy;
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800232 static bool sEnabled;
Jeykumar Sankaran24c199d2013-05-24 09:40:36 -0700233 static bool sEnableMixedMode;
Jeykumar Sankaran6a9bb9e2013-08-01 14:19:26 -0700234 /* Enables Partial frame composition */
235 static bool sEnablePartialFrameUpdate;
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800236 static bool sDebugLogs;
237 static bool sIdleFallBack;
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800238 static int sMaxPipesPerMixer;
Saurabh Shah8c5c8522013-08-29 17:32:49 -0700239 //Max bandwidth. Value is in GBPS. For ex: 2.3 means 2.3GBPS
Saurabh Shahf5f2b132013-11-25 12:08:35 -0800240 static double sMaxBw;
Saurabh Shah3c1a6b02013-11-22 11:10:20 -0800241 //Tracks composition bandwidth claimed. Represented as the total
242 //w*h*bpp*fps (gigabytes-per-second) going to MDP mixers.
243 static double sBwClaimed;
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800244 static IdleInvalidator *idleInvalidator;
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800245 struct FrameInfo mCurrentFrame;
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800246 struct LayerCache mCachedFrame;
radhakrishnac9a67412013-09-25 17:40:42 +0530247 //Enable 4kx2k yuv layer split
248 static bool sEnable4k2kYUVSplit;
249 bool allocSplitVGPipesfor4k2k(hwc_context_t *ctx,
250 hwc_display_contents_1_t* list, int index);
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800251};
252
Saurabh Shah88e4d272013-09-03 13:31:29 -0700253class MDPCompNonSplit : public MDPComp {
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800254public:
Saurabh Shah88e4d272013-09-03 13:31:29 -0700255 explicit MDPCompNonSplit(int dpy):MDPComp(dpy){};
256 virtual ~MDPCompNonSplit(){};
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800257 virtual bool draw(hwc_context_t *ctx, hwc_display_contents_1_t *list);
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800258
259private:
Saurabh Shah88e4d272013-09-03 13:31:29 -0700260 struct MdpPipeInfoNonSplit : public MdpPipeInfo {
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800261 ovutils::eDest index;
Saurabh Shah88e4d272013-09-03 13:31:29 -0700262 virtual ~MdpPipeInfoNonSplit() {};
Naseer Ahmed7c958d42012-07-31 18:57:03 -0700263 };
264
Naseer Ahmed7c958d42012-07-31 18:57:03 -0700265 /* configure's overlay pipes for the frame */
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800266 virtual int configure(hwc_context_t *ctx, hwc_layer_1_t *layer,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800267 PipeLayerPair& pipeLayerPair);
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800268
Naseer Ahmed7c958d42012-07-31 18:57:03 -0700269 /* allocates pipes to selected candidates */
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800270 virtual bool allocLayerPipes(hwc_context_t *ctx,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800271 hwc_display_contents_1_t* list);
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800272
Saurabh Shahaf5f5972013-07-30 13:56:35 -0700273 /* Checks for pipes needed versus pipes available */
274 virtual bool arePipesAvailable(hwc_context_t *ctx,
275 hwc_display_contents_1_t* list);
Saurabh Shah90b7b9b2013-09-12 16:36:08 -0700276
277 /* Checks for video pipes needed versus pipes available */
278 virtual bool areVGPipesAvailable(hwc_context_t *ctx,
279 hwc_display_contents_1_t* list);
radhakrishnac9a67412013-09-25 17:40:42 +0530280
Saurabh Shah3d4b8042013-12-10 15:19:17 -0800281 /* Increments mdpCount if 4k2k yuv layer split is enabled.
282 * updates framebuffer z order if fb lies above source-split layer */
283 virtual void adjustForSourceSplit(hwc_context_t *ctx,
radhakrishnac9a67412013-09-25 17:40:42 +0530284 hwc_display_contents_1_t* list);
285
286 /* configures 4kx2k yuv layer to 2 VG pipes*/
287 virtual int configure4k2kYuv(hwc_context_t *ctx, hwc_layer_1_t *layer,
288 PipeLayerPair& PipeLayerPair);
Naseer Ahmed7c958d42012-07-31 18:57:03 -0700289};
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800290
Saurabh Shah88e4d272013-09-03 13:31:29 -0700291class MDPCompSplit : public MDPComp {
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800292public:
Saurabh Shah88e4d272013-09-03 13:31:29 -0700293 explicit MDPCompSplit(int dpy):MDPComp(dpy){};
294 virtual ~MDPCompSplit(){};
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800295 virtual bool draw(hwc_context_t *ctx, hwc_display_contents_1_t *list);
296private:
Saurabh Shah88e4d272013-09-03 13:31:29 -0700297 struct MdpPipeInfoSplit : public MdpPipeInfo {
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800298 ovutils::eDest lIndex;
299 ovutils::eDest rIndex;
Saurabh Shah88e4d272013-09-03 13:31:29 -0700300 virtual ~MdpPipeInfoSplit() {};
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800301 };
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800302
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800303 bool acquireMDPPipes(hwc_context_t *ctx, hwc_layer_1_t* layer,
Saurabh Shah88e4d272013-09-03 13:31:29 -0700304 MdpPipeInfoSplit& pipe_info, ePipeType type);
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800305
306 /* configure's overlay pipes for the frame */
307 virtual int configure(hwc_context_t *ctx, hwc_layer_1_t *layer,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800308 PipeLayerPair& pipeLayerPair);
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800309
310 /* allocates pipes to selected candidates */
311 virtual bool allocLayerPipes(hwc_context_t *ctx,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800312 hwc_display_contents_1_t* list);
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800313
Saurabh Shahaf5f5972013-07-30 13:56:35 -0700314 /* Checks for pipes needed versus pipes available */
315 virtual bool arePipesAvailable(hwc_context_t *ctx,
316 hwc_display_contents_1_t* list);
317
Saurabh Shah90b7b9b2013-09-12 16:36:08 -0700318 /* Checks for video pipes needed versus pipes available */
319 virtual bool areVGPipesAvailable(hwc_context_t *ctx,
320 hwc_display_contents_1_t* list);
321
Saurabh Shah3d4b8042013-12-10 15:19:17 -0800322 /* Increments mdpCount if 4k2k yuv layer split is enabled.
323 * updates framebuffer z order if fb lies above source-split layer */
324 virtual void adjustForSourceSplit(hwc_context_t *ctx,
radhakrishnac9a67412013-09-25 17:40:42 +0530325 hwc_display_contents_1_t* list);
326
327 /* configures 4kx2k yuv layer*/
328 virtual int configure4k2kYuv(hwc_context_t *ctx, hwc_layer_1_t *layer,
329 PipeLayerPair& PipeLayerPair);
330
Saurabh Shahaf5f5972013-07-30 13:56:35 -0700331 int pipesNeeded(hwc_context_t *ctx, hwc_display_contents_1_t* list,
332 int mixer);
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800333};
Saurabh Shah2a4eb1b2013-07-22 16:33:23 -0700334
Naseer Ahmed7c958d42012-07-31 18:57:03 -0700335}; //namespace
336#endif