blob: d974875bd6d56ed87ee50ea1e6273d63e9cafd2a [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 Shahbe7bd322014-02-20 16:18:45 -080055 static void reset() { sHandleTimeout = false; };
Ramkumar Radhakrishnanfb822912014-03-14 17:28:14 -070056 static bool isIdleFallback() { return sIdleFallBack; }
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -080057
58protected:
Saurabh Shahe9bc60f2013-08-29 12:58:06 -070059 enum { MAX_SEC_LAYERS = 1 }; //TODO add property support
60
Naseer Ahmed54821fe2012-11-28 18:44:38 -050061 enum ePipeType {
62 MDPCOMP_OV_RGB = ovutils::OV_MDP_PIPE_RGB,
63 MDPCOMP_OV_VG = ovutils::OV_MDP_PIPE_VG,
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -080064 MDPCOMP_OV_DMA = ovutils::OV_MDP_PIPE_DMA,
Naseer Ahmed54821fe2012-11-28 18:44:38 -050065 MDPCOMP_OV_ANY,
Naseer Ahmed7c958d42012-07-31 18:57:03 -070066 };
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080067
68 /* mdp pipe data */
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -080069 struct MdpPipeInfo {
70 int zOrder;
71 virtual ~MdpPipeInfo(){};
72 };
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080073
radhakrishnac9a67412013-09-25 17:40:42 +053074 struct MdpYUVPipeInfo : public MdpPipeInfo{
75 ovutils::eDest lIndex;
76 ovutils::eDest rIndex;
77 virtual ~MdpYUVPipeInfo(){};
78 };
79
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080080 /* per layer data */
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -080081 struct PipeLayerPair {
82 MdpPipeInfo *pipeInfo;
Saurabh Shahacf10202013-02-26 10:15:15 -080083 overlay::Rotator* rot;
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080084 int listIndex;
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -080085 };
86
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080087 /* per frame data */
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -080088 struct FrameInfo {
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080089 /* maps layer list to mdp list */
90 int layerCount;
Ramkumar Radhakrishnane661f962013-06-05 17:21:38 -070091 int layerToMDP[MAX_NUM_APP_LAYERS];
Jeykumar Sankaran85977e32013-02-25 17:06:08 -080092
93 /* maps mdp list to layer list */
94 int mdpCount;
95 struct PipeLayerPair mdpToLayer[MAX_PIPES_PER_MIXER];
96
97 /* layer composing on FB? */
98 int fbCount;
Ramkumar Radhakrishnane661f962013-06-05 17:21:38 -070099 bool isFBComposed[MAX_NUM_APP_LAYERS];
Jeykumar Sankaran6a9bb9e2013-08-01 14:19:26 -0700100 /* layers lying outside ROI. Will
101 * be dropped off from the composition */
102 int dropCount;
103 bool drop[MAX_NUM_APP_LAYERS];
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800104
105 bool needsRedraw;
106 int fbZ;
107
108 /* c'tor */
109 FrameInfo();
110 /* clear old frame data */
Saurabh Shahaa236822013-04-24 18:07:26 -0700111 void reset(const int& numLayers);
112 void map();
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800113 };
114
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800115 /* cached data */
116 struct LayerCache {
117 int layerCount;
Ramkumar Radhakrishnane661f962013-06-05 17:21:38 -0700118 buffer_handle_t hnd[MAX_NUM_APP_LAYERS];
Prabhanjan Kandula2243aa62013-10-24 12:58:55 +0530119 bool isFBComposed[MAX_NUM_APP_LAYERS];
120 bool drop[MAX_NUM_APP_LAYERS];
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800121
122 /* c'tor */
123 LayerCache();
124 /* clear caching info*/
125 void reset();
Saurabh Shahaa236822013-04-24 18:07:26 -0700126 void cacheAll(hwc_display_contents_1_t* list);
127 void updateCounts(const FrameInfo&);
Jeykumar Sankaran988d3682013-11-15 11:57:16 -0800128 bool isSameFrame(const FrameInfo& curFrame,
129 hwc_display_contents_1_t* list);
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800130 };
131
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800132 /* allocates pipe from pipe book */
133 virtual bool allocLayerPipes(hwc_context_t *ctx,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800134 hwc_display_contents_1_t* list) = 0;
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800135 /* configures MPD pipes */
136 virtual int configure(hwc_context_t *ctx, hwc_layer_1_t *layer,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800137 PipeLayerPair& pipeLayerPair) = 0;
Saurabh Shah3d4b8042013-12-10 15:19:17 -0800138 /* Increments mdpCount if 4k2k yuv layer split is enabled.
139 * updates framebuffer z order if fb lies above source-split layer */
140 virtual void adjustForSourceSplit(hwc_context_t *ctx,
radhakrishnac9a67412013-09-25 17:40:42 +0530141 hwc_display_contents_1_t* list) = 0;
142 /* configures 4kx2k yuv layer*/
143 virtual int configure4k2kYuv(hwc_context_t *ctx, hwc_layer_1_t *layer,
144 PipeLayerPair& PipeLayerPair) = 0;
Jeykumar Sankaran6c7eeac2013-11-18 11:19:45 -0800145 /* generates ROI based on the modified area of the frame */
146 virtual void generateROI(hwc_context_t *ctx,
147 hwc_display_contents_1_t* list) = 0;
148 /* validates the ROI generated for fallback conditions */
149 virtual bool validateAndApplyROI(hwc_context_t *ctx,
150 hwc_display_contents_1_t* list) = 0;
151 /* Trims fbRect calculated against ROI generated */
152 virtual void trimAgainstROI(hwc_context_t *ctx, hwc_rect_t& fbRect) = 0;
153
Jeykumar Sankaran1e156112014-04-30 11:03:23 -0700154 /* set/reset flags for MDPComp */
155 void setMDPCompLayerFlags(hwc_context_t *ctx,
156 hwc_display_contents_1_t* list);
Saurabh Shahdf4741d2013-12-12 16:40:28 -0800157 void setRedraw(hwc_context_t *ctx,
158 hwc_display_contents_1_t* list);
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800159 /* checks for conditions where mdpcomp is not possible */
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800160 bool isFrameDoable(hwc_context_t *ctx);
161 /* checks for conditions where RGB layers cannot be bypassed */
Saurabh Shahdf4741d2013-12-12 16:40:28 -0800162 bool tryFullFrame(hwc_context_t *ctx, hwc_display_contents_1_t* list);
Saurabh Shahaa236822013-04-24 18:07:26 -0700163 /* checks if full MDP comp can be done */
164 bool fullMDPComp(hwc_context_t *ctx, hwc_display_contents_1_t* list);
165 /* check if we can use layer cache to do at least partial MDP comp */
166 bool partialMDPComp(hwc_context_t *ctx, hwc_display_contents_1_t* list);
Saurabh Shah8028e3b2013-10-15 12:27:59 -0700167 /* Partial MDP comp that uses caching to save power as primary goal */
168 bool cacheBasedComp(hwc_context_t *ctx, hwc_display_contents_1_t* list);
Saurabh Shahbe7bd322014-02-20 16:18:45 -0800169 /* Partial MDP comp that balances the load between MDP and GPU such that
170 * MDP is loaded to the max of its capacity. The lower z order layers are
171 * fed to MDP, whereas the upper ones to GPU, because the upper ones have
172 * lower number of pixels and can reduce GPU processing time */
173 bool loadBasedComp(hwc_context_t *ctx, hwc_display_contents_1_t* list);
Saurabh Shah8028e3b2013-10-15 12:27:59 -0700174 /* Checks if its worth doing load based partial comp */
Arun Kumar K.R2aa44c62014-01-21 23:08:28 -0800175 bool isLoadBasedCompDoable(hwc_context_t *ctx);
Saurabh Shahaa236822013-04-24 18:07:26 -0700176 /* checks for conditions where only video can be bypassed */
Saurabh Shahdf4741d2013-12-12 16:40:28 -0800177 bool tryVideoOnly(hwc_context_t *ctx, hwc_display_contents_1_t* list);
178 bool videoOnlyComp(hwc_context_t *ctx, hwc_display_contents_1_t* list,
Saurabh Shah90b7b9b2013-09-12 16:36:08 -0700179 bool secureOnly);
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800180 /* checks for conditions where YUV layers cannot be bypassed */
181 bool isYUVDoable(hwc_context_t* ctx, hwc_layer_1_t* layer);
Prabhanjan Kandula21918db2013-11-26 15:51:58 +0530182 /* checks if MDP/MDSS can process current list w.r.to HW limitations
183 * All peculiar HW limitations should go here */
184 bool hwLimitationsCheck(hwc_context_t* ctx, hwc_display_contents_1_t* list);
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800185 /* Is debug enabled */
186 static bool isDebug() { return sDebugLogs ? true : false; };
187 /* Is feature enabled */
188 static bool isEnabled() { return sEnabled; };
Sravan Kumar D.V.Nad5d9292013-04-24 14:23:04 +0530189 /* checks for mdp comp dimension limitation */
190 bool isValidDimension(hwc_context_t *ctx, hwc_layer_1_t *layer);
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800191 /* tracks non updating layers*/
192 void updateLayerCache(hwc_context_t* ctx, hwc_display_contents_1_t* list);
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800193 /* optimize layers for mdp comp*/
Prabhanjan Kandula9bd5f642013-09-25 17:00:36 +0530194 bool markLayersForCaching(hwc_context_t* ctx,
195 hwc_display_contents_1_t* list);
196 int getBatch(hwc_display_contents_1_t* list,
197 int& maxBatchStart, int& maxBatchEnd,
198 int& maxBatchCount);
199 bool canPushBatchToTop(const hwc_display_contents_1_t* list,
200 int fromIndex, int toIndex);
201 bool intersectingUpdatingLayers(const hwc_display_contents_1_t* list,
202 int fromIndex, int toIndex, int targetLayerIndex);
203
204 /* updates cache map with YUV info */
Saurabh Shah90b7b9b2013-09-12 16:36:08 -0700205 void updateYUV(hwc_context_t* ctx, hwc_display_contents_1_t* list,
206 bool secureOnly);
Saurabh Shahdf4741d2013-12-12 16:40:28 -0800207 /* Validates if the GPU/MDP layer split chosen by a strategy is supported
208 * by MDP.
209 * Sets up MDP comp data structures to reflect covnversion from layers to
210 * overlay pipes.
211 * Configures overlay.
212 * Configures if GPU should redraw.
213 */
214 bool postHeuristicsHandling(hwc_context_t *ctx,
215 hwc_display_contents_1_t* list);
216 void reset(hwc_context_t *ctx);
Saurabh Shahe9bc60f2013-08-29 12:58:06 -0700217 bool isSupportedForMDPComp(hwc_context_t *ctx, hwc_layer_1_t* layer);
Praveena Pachipulusud9443c72014-02-17 10:42:28 +0530218 bool resourceCheck();
Jeykumar Sankaran6c7eeac2013-11-18 11:19:45 -0800219 hwc_rect_t getUpdatingFBRect(hwc_context_t *ctx,
220 hwc_display_contents_1_t* list);
221 /* checks for conditions to enable partial udpate */
222 bool canPartialUpdate(hwc_context_t *ctx, hwc_display_contents_1_t* list);
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800223
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800224 int mDpy;
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800225 static bool sEnabled;
Jeykumar Sankaran24c199d2013-05-24 09:40:36 -0700226 static bool sEnableMixedMode;
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800227 static bool sDebugLogs;
228 static bool sIdleFallBack;
Ramkumar Radhakrishnan92abb4f2014-02-06 21:31:29 -0800229 /* Handles the timeout event from kernel, if the value is set to true */
230 static bool sHandleTimeout;
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800231 static int sMaxPipesPerMixer;
Manoj Kumar AVM8cbbf7c2014-03-11 01:15:31 -0700232 static bool sSrcSplitEnabled;
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800233 static IdleInvalidator *idleInvalidator;
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800234 struct FrameInfo mCurrentFrame;
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800235 struct LayerCache mCachedFrame;
radhakrishnac9a67412013-09-25 17:40:42 +0530236 //Enable 4kx2k yuv layer split
237 static bool sEnable4k2kYUVSplit;
Arun Kumar K.R2aa44c62014-01-21 23:08:28 -0800238 bool allocSplitVGPipesfor4k2k(hwc_context_t *ctx, int index);
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800239};
240
Saurabh Shah88e4d272013-09-03 13:31:29 -0700241class MDPCompNonSplit : public MDPComp {
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800242public:
Saurabh Shah88e4d272013-09-03 13:31:29 -0700243 explicit MDPCompNonSplit(int dpy):MDPComp(dpy){};
244 virtual ~MDPCompNonSplit(){};
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800245 virtual bool draw(hwc_context_t *ctx, hwc_display_contents_1_t *list);
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800246
247private:
Saurabh Shah88e4d272013-09-03 13:31:29 -0700248 struct MdpPipeInfoNonSplit : public MdpPipeInfo {
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800249 ovutils::eDest index;
Saurabh Shah88e4d272013-09-03 13:31:29 -0700250 virtual ~MdpPipeInfoNonSplit() {};
Naseer Ahmed7c958d42012-07-31 18:57:03 -0700251 };
252
Naseer Ahmed7c958d42012-07-31 18:57:03 -0700253 /* configure's overlay pipes for the frame */
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800254 virtual int configure(hwc_context_t *ctx, hwc_layer_1_t *layer,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800255 PipeLayerPair& pipeLayerPair);
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800256
Naseer Ahmed7c958d42012-07-31 18:57:03 -0700257 /* allocates pipes to selected candidates */
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800258 virtual bool allocLayerPipes(hwc_context_t *ctx,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800259 hwc_display_contents_1_t* list);
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800260
Saurabh Shah3d4b8042013-12-10 15:19:17 -0800261 /* Increments mdpCount if 4k2k yuv layer split is enabled.
262 * updates framebuffer z order if fb lies above source-split layer */
263 virtual void adjustForSourceSplit(hwc_context_t *ctx,
Arun Kumar K.R2aa44c62014-01-21 23:08:28 -0800264 hwc_display_contents_1_t* list);
radhakrishnac9a67412013-09-25 17:40:42 +0530265
266 /* configures 4kx2k yuv layer to 2 VG pipes*/
267 virtual int configure4k2kYuv(hwc_context_t *ctx, hwc_layer_1_t *layer,
268 PipeLayerPair& PipeLayerPair);
Jeykumar Sankaran6c7eeac2013-11-18 11:19:45 -0800269 /* generates ROI based on the modified area of the frame */
270 virtual void generateROI(hwc_context_t *ctx,
271 hwc_display_contents_1_t* list);
272 /* validates the ROI generated for fallback conditions */
273 virtual bool validateAndApplyROI(hwc_context_t *ctx,
274 hwc_display_contents_1_t* list);
275 /* Trims fbRect calculated against ROI generated */
276 virtual void trimAgainstROI(hwc_context_t *ctx, hwc_rect_t& fbRect);
Naseer Ahmed7c958d42012-07-31 18:57:03 -0700277};
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800278
Saurabh Shah88e4d272013-09-03 13:31:29 -0700279class MDPCompSplit : public MDPComp {
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800280public:
Saurabh Shah88e4d272013-09-03 13:31:29 -0700281 explicit MDPCompSplit(int dpy):MDPComp(dpy){};
282 virtual ~MDPCompSplit(){};
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800283 virtual bool draw(hwc_context_t *ctx, hwc_display_contents_1_t *list);
Saurabh Shahab47c692014-02-12 18:45:57 -0800284
285protected:
Saurabh Shah88e4d272013-09-03 13:31:29 -0700286 struct MdpPipeInfoSplit : public MdpPipeInfo {
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800287 ovutils::eDest lIndex;
288 ovutils::eDest rIndex;
Saurabh Shah88e4d272013-09-03 13:31:29 -0700289 virtual ~MdpPipeInfoSplit() {};
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800290 };
Saurabh Shahcbf7ccc2012-12-19 16:45:51 -0800291
Saurabh Shahab47c692014-02-12 18:45:57 -0800292 virtual bool acquireMDPPipes(hwc_context_t *ctx, hwc_layer_1_t* layer,
Saurabh Shahc62f3982014-03-05 14:28:26 -0800293 MdpPipeInfoSplit& pipe_info);
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800294
295 /* configure's overlay pipes for the frame */
296 virtual int configure(hwc_context_t *ctx, hwc_layer_1_t *layer,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800297 PipeLayerPair& pipeLayerPair);
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800298
299 /* allocates pipes to selected candidates */
300 virtual bool allocLayerPipes(hwc_context_t *ctx,
Jeykumar Sankaran85977e32013-02-25 17:06:08 -0800301 hwc_display_contents_1_t* list);
Saurabh Shahab47c692014-02-12 18:45:57 -0800302private:
Saurabh Shah3d4b8042013-12-10 15:19:17 -0800303 /* Increments mdpCount if 4k2k yuv layer split is enabled.
304 * updates framebuffer z order if fb lies above source-split layer */
305 virtual void adjustForSourceSplit(hwc_context_t *ctx,
radhakrishnac9a67412013-09-25 17:40:42 +0530306 hwc_display_contents_1_t* list);
307
308 /* configures 4kx2k yuv layer*/
309 virtual int configure4k2kYuv(hwc_context_t *ctx, hwc_layer_1_t *layer,
310 PipeLayerPair& PipeLayerPair);
Jeykumar Sankaran6c7eeac2013-11-18 11:19:45 -0800311 /* generates ROI based on the modified area of the frame */
312 virtual void generateROI(hwc_context_t *ctx,
313 hwc_display_contents_1_t* list);
314 /* validates the ROI generated for fallback conditions */
315 virtual bool validateAndApplyROI(hwc_context_t *ctx,
316 hwc_display_contents_1_t* list);
317 /* Trims fbRect calculated against ROI generated */
318 virtual void trimAgainstROI(hwc_context_t *ctx, hwc_rect_t& fbRect);
Jeykumar Sankaranb551ce42013-01-10 16:26:48 -0800319};
Saurabh Shah2a4eb1b2013-07-22 16:33:23 -0700320
Saurabh Shahab47c692014-02-12 18:45:57 -0800321class MDPCompSrcSplit : public MDPCompSplit {
322public:
323 explicit MDPCompSrcSplit(int dpy) : MDPCompSplit(dpy){};
324 virtual ~MDPCompSrcSplit(){};
325private:
326 virtual bool acquireMDPPipes(hwc_context_t *ctx, hwc_layer_1_t* layer,
Saurabh Shahc62f3982014-03-05 14:28:26 -0800327 MdpPipeInfoSplit& pipe_info);
Saurabh Shahab47c692014-02-12 18:45:57 -0800328
Saurabh Shahab47c692014-02-12 18:45:57 -0800329 virtual int configure(hwc_context_t *ctx, hwc_layer_1_t *layer,
330 PipeLayerPair& pipeLayerPair);
331};
332
Naseer Ahmed7c958d42012-07-31 18:57:03 -0700333}; //namespace
334#endif