blob: 487ec776ad7b088a6f84d0cd450f49a9e1fdc46a [file] [log] [blame]
Saurabh Shah86c17292013-02-08 15:24:13 -08001/*
Arun Kumar K.Rc62935a2013-12-03 16:47:47 -08002 * Copyright (c) 2013-14, The Linux Foundation. All rights reserved.
Saurabh Shah86c17292013-02-08 15:24:13 -08003 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above
10 * copyright notice, this list of conditions and the following
11 * disclaimer in the documentation and/or other materials provided
12 * with the distribution.
13 * * Neither the name of The Linux Foundation nor the names of its
14 * contributors may be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR CLIENTS; LOSS OF USE, DATA, OR PROFITS; OR
24 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30#include <hwc_qclient.h>
31#include <IQService.h>
32#include <hwc_utils.h>
Zohaib Alam1bb65612013-09-28 03:38:20 -040033#include <mdp_version.h>
Naseer Ahmed35a268c2014-06-24 19:07:13 -040034#include <hwc_mdpcomp.h>
Tatenda Chipeperekwa06af9cb2014-08-26 14:51:05 -070035#include <hwc_virtual.h>
Saurabh Shah24eec8a2014-08-22 15:07:25 -070036#include <overlay.h>
Raj Kamal0d53fc62014-11-25 17:36:36 +053037#include <display_config.h>
Naseer Ahmed6bbd0a12015-01-23 11:57:10 -050038#include <hdmi.h>
39#include <video/msm_hdmi_modes.h>
Saurabh Shah86c17292013-02-08 15:24:13 -080040
41#define QCLIENT_DEBUG 0
42
43using namespace android;
44using namespace qService;
Arun Kumar K.Rc62935a2013-12-03 16:47:47 -080045using namespace qhwc;
Saurabh Shah24eec8a2014-08-22 15:07:25 -070046using namespace overlay;
Saurabh Shahcd018352014-11-11 13:54:19 -080047using namespace qdutils;
Saurabh Shah86c17292013-02-08 15:24:13 -080048
49namespace qClient {
50
51// ----------------------------------------------------------------------------
Saurabh Shah7128e502013-02-20 13:24:48 -080052QClient::QClient(hwc_context_t *ctx) : mHwcContext(ctx),
53 mMPDeathNotifier(new MPDeathNotifier(ctx))
Saurabh Shah86c17292013-02-08 15:24:13 -080054{
55 ALOGD_IF(QCLIENT_DEBUG, "QClient Constructor invoked");
56}
57
58QClient::~QClient()
59{
60 ALOGD_IF(QCLIENT_DEBUG,"QClient Destructor invoked");
61}
62
Naseer Ahmed4957c522013-11-12 18:07:15 -050063static void securing(hwc_context_t *ctx, uint32_t startEnd) {
Saurabh Shahc2125772013-03-15 16:49:50 -070064 //The only way to make this class in this process subscribe to media
65 //player's death.
66 IMediaDeathNotifier::getMediaPlayerService();
67
Raj Kamal58b31a02014-12-16 15:53:53 +053068 ctx->mDrawLock.lock();
Naseer Ahmed4957c522013-11-12 18:07:15 -050069 ctx->mSecuring = startEnd;
Saurabh Shah86c17292013-02-08 15:24:13 -080070 //We're done securing
71 if(startEnd == IQService::END)
Naseer Ahmed4957c522013-11-12 18:07:15 -050072 ctx->mSecureMode = true;
Raj Kamal58b31a02014-12-16 15:53:53 +053073 ctx->mDrawLock.unlock();
74
Naseer Ahmed4957c522013-11-12 18:07:15 -050075 if(ctx->proc)
76 ctx->proc->invalidate(ctx->proc);
Saurabh Shah86c17292013-02-08 15:24:13 -080077}
78
Naseer Ahmed4957c522013-11-12 18:07:15 -050079static void unsecuring(hwc_context_t *ctx, uint32_t startEnd) {
Raj Kamal58b31a02014-12-16 15:53:53 +053080 ctx->mDrawLock.lock();
Naseer Ahmed4957c522013-11-12 18:07:15 -050081 ctx->mSecuring = startEnd;
Saurabh Shah86c17292013-02-08 15:24:13 -080082 //We're done unsecuring
83 if(startEnd == IQService::END)
Naseer Ahmed4957c522013-11-12 18:07:15 -050084 ctx->mSecureMode = false;
Raj Kamal58b31a02014-12-16 15:53:53 +053085 ctx->mDrawLock.unlock();
86
Naseer Ahmed4957c522013-11-12 18:07:15 -050087 if(ctx->proc)
88 ctx->proc->invalidate(ctx->proc);
Saurabh Shah86c17292013-02-08 15:24:13 -080089}
90
Saurabh Shah7128e502013-02-20 13:24:48 -080091void QClient::MPDeathNotifier::died() {
Raj Kamal58b31a02014-12-16 15:53:53 +053092 mHwcContext->mDrawLock.lock();
Saurabh Shah7128e502013-02-20 13:24:48 -080093 ALOGD_IF(QCLIENT_DEBUG, "Media Player died");
94 mHwcContext->mSecuring = false;
95 mHwcContext->mSecureMode = false;
Raj Kamal58b31a02014-12-16 15:53:53 +053096 mHwcContext->mDrawLock.unlock();
Saurabh Shah7128e502013-02-20 13:24:48 -080097 if(mHwcContext->proc)
98 mHwcContext->proc->invalidate(mHwcContext->proc);
99}
100
Naseer Ahmed4957c522013-11-12 18:07:15 -0500101static android::status_t screenRefresh(hwc_context_t *ctx) {
Jeykumar Sankaran9f59a762013-02-28 10:45:56 -0800102 status_t result = NO_INIT;
Naseer Ahmed4957c522013-11-12 18:07:15 -0500103 if(ctx->proc) {
104 ctx->proc->invalidate(ctx->proc);
Jeykumar Sankaran9f59a762013-02-28 10:45:56 -0800105 result = NO_ERROR;
106 }
Jeykumar Sankaran9f59a762013-02-28 10:45:56 -0800107 return result;
108}
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700109
Naseer Ahmed4957c522013-11-12 18:07:15 -0500110static void setExtOrientation(hwc_context_t *ctx, uint32_t orientation) {
111 ctx->mExtOrientation = orientation;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -0700112}
113
Naseer Ahmed78c952e2013-11-25 18:12:23 -0500114static void isExternalConnected(hwc_context_t* ctx, Parcel* outParcel) {
115 int connected;
116 connected = ctx->dpyAttr[HWC_DISPLAY_EXTERNAL].connected ? 1 : 0;
117 outParcel->writeInt32(connected);
118}
119
120static void getDisplayAttributes(hwc_context_t* ctx, const Parcel* inParcel,
121 Parcel* outParcel) {
122 int dpy = inParcel->readInt32();
123 outParcel->writeInt32(ctx->dpyAttr[dpy].vsync_period);
Dileep Kumar Reddie351d842014-03-25 10:39:21 +0530124 if (ctx->dpyAttr[dpy].customFBSize) {
125 outParcel->writeInt32(ctx->dpyAttr[dpy].xres_new);
126 outParcel->writeInt32(ctx->dpyAttr[dpy].yres_new);
127 } else {
128 outParcel->writeInt32(ctx->dpyAttr[dpy].xres);
129 outParcel->writeInt32(ctx->dpyAttr[dpy].yres);
130 }
Naseer Ahmed78c952e2013-11-25 18:12:23 -0500131 outParcel->writeFloat(ctx->dpyAttr[dpy].xdpi);
132 outParcel->writeFloat(ctx->dpyAttr[dpy].ydpi);
133 //XXX: Need to check what to return for HDMI
134 outParcel->writeInt32(ctx->mMDP.panel);
135}
Arun Kumar K.R2aa44c62014-01-21 23:08:28 -0800136static void setHSIC(const Parcel* inParcel) {
Naseer Ahmed78c952e2013-11-25 18:12:23 -0500137 int dpy = inParcel->readInt32();
Arun Kumar K.R2aa44c62014-01-21 23:08:28 -0800138 ALOGD_IF(0, "In %s: dpy = %d", __FUNCTION__, dpy);
Naseer Ahmed78c952e2013-11-25 18:12:23 -0500139 HSICData_t hsic_data;
140 hsic_data.hue = inParcel->readInt32();
141 hsic_data.saturation = inParcel->readFloat();
142 hsic_data.intensity = inParcel->readInt32();
143 hsic_data.contrast = inParcel->readFloat();
144 //XXX: Actually set the HSIC data through ABL lib
145}
146
147
Naseer Ahmed4957c522013-11-12 18:07:15 -0500148static void setBufferMirrorMode(hwc_context_t *ctx, uint32_t enable) {
149 ctx->mBufferMirrorMode = enable;
Arun Kumar K.Rfb5bfa62013-07-25 03:10:51 -0700150}
151
Arun Kumar K.R8e7a62f2013-12-06 18:55:41 -0800152static status_t getDisplayVisibleRegion(hwc_context_t* ctx, int dpy,
153 Parcel* outParcel) {
154 // Get the info only if the dpy is valid
155 if(dpy >= HWC_DISPLAY_PRIMARY && dpy <= HWC_DISPLAY_VIRTUAL) {
156 Locker::Autolock _sl(ctx->mDrawLock);
157 if(dpy && (ctx->mExtOrientation || ctx->mBufferMirrorMode)) {
158 // Return the destRect on external, if external orienation
159 // is enabled
160 outParcel->writeInt32(ctx->dpyAttr[dpy].mDstRect.left);
161 outParcel->writeInt32(ctx->dpyAttr[dpy].mDstRect.top);
162 outParcel->writeInt32(ctx->dpyAttr[dpy].mDstRect.right);
163 outParcel->writeInt32(ctx->dpyAttr[dpy].mDstRect.bottom);
164 } else {
165 outParcel->writeInt32(ctx->mViewFrame[dpy].left);
166 outParcel->writeInt32(ctx->mViewFrame[dpy].top);
167 outParcel->writeInt32(ctx->mViewFrame[dpy].right);
168 outParcel->writeInt32(ctx->mViewFrame[dpy].bottom);
169 }
170 return NO_ERROR;
171 } else {
172 ALOGE("In %s: invalid dpy index %d", __FUNCTION__, dpy);
173 return BAD_VALUE;
174 }
175}
176
Arun Kumar K.R33888f52014-10-09 15:56:33 -0700177// USed for setting the secondary(hdmi/wfd) status
178static void setSecondaryDisplayStatus(hwc_context_t *ctx,
179 const Parcel* inParcel) {
180 uint32_t dpy = inParcel->readInt32();
181 uint32_t status = inParcel->readInt32();
182 ALOGD_IF(QCLIENT_DEBUG, "%s: dpy = %d status = %s", __FUNCTION__,
183 dpy, getExternalDisplayState(status));
184
185 if(dpy > HWC_DISPLAY_PRIMARY && dpy <= HWC_DISPLAY_VIRTUAL) {
Raj Kamal0d53fc62014-11-25 17:36:36 +0530186 if(dpy == HWC_DISPLAY_VIRTUAL && status == qdutils::EXTERNAL_OFFLINE) {
Arun Kumar K.R33888f52014-10-09 15:56:33 -0700187 ctx->mWfdSyncLock.lock();
188 ctx->mWfdSyncLock.signal();
189 ctx->mWfdSyncLock.unlock();
Raj Kamal0d53fc62014-11-25 17:36:36 +0530190 } else if(status == qdutils::EXTERNAL_PAUSE) {
Arun Kumar K.R33888f52014-10-09 15:56:33 -0700191 handle_pause(ctx, dpy);
Raj Kamal0d53fc62014-11-25 17:36:36 +0530192 } else if(status == qdutils::EXTERNAL_RESUME) {
Arun Kumar K.R33888f52014-10-09 15:56:33 -0700193 handle_resume(ctx, dpy);
194 }
Arun Kumar K.Rc62935a2013-12-03 16:47:47 -0800195 } else {
Ramakant Singh8595cca2014-11-06 16:17:08 +0530196 ALOGE("%s: Invalid dpy %d", __FUNCTION__, dpy);
Arun Kumar K.R33888f52014-10-09 15:56:33 -0700197 return;
Raj kamal59fea562014-04-01 16:52:19 +0530198 }
199}
200
Ramkumar Radhakrishnan0a021a82014-05-19 19:53:56 -0700201
202static status_t setViewFrame(hwc_context_t* ctx, const Parcel* inParcel) {
203 int dpy = inParcel->readInt32();
204 if(dpy >= HWC_DISPLAY_PRIMARY && dpy <= HWC_DISPLAY_VIRTUAL) {
205 Locker::Autolock _sl(ctx->mDrawLock);
206 ctx->mViewFrame[dpy].left = inParcel->readInt32();
207 ctx->mViewFrame[dpy].top = inParcel->readInt32();
208 ctx->mViewFrame[dpy].right = inParcel->readInt32();
209 ctx->mViewFrame[dpy].bottom = inParcel->readInt32();
210 ALOGD_IF(QCLIENT_DEBUG, "%s: mViewFrame[%d] = [%d %d %d %d]",
211 __FUNCTION__, dpy,
212 ctx->mViewFrame[dpy].left, ctx->mViewFrame[dpy].top,
213 ctx->mViewFrame[dpy].right, ctx->mViewFrame[dpy].bottom);
214 return NO_ERROR;
215 } else {
216 ALOGE("In %s: invalid dpy index %d", __FUNCTION__, dpy);
217 return BAD_VALUE;
218 }
219}
220
Naseer Ahmed35a268c2014-06-24 19:07:13 -0400221static void toggleDynamicDebug(hwc_context_t* ctx, const Parcel* inParcel) {
222 int debug_type = inParcel->readInt32();
223 bool enable = !!inParcel->readInt32();
224 ALOGD("%s: debug_type: %d enable:%d",
225 __FUNCTION__, debug_type, enable);
226 Locker::Autolock _sl(ctx->mDrawLock);
227 switch (debug_type) {
228 //break is ignored for DEBUG_ALL to toggle all of them at once
229 case IQService::DEBUG_ALL:
230 case IQService::DEBUG_MDPCOMP:
231 qhwc::MDPComp::dynamicDebug(enable);
232 if (debug_type != IQService::DEBUG_ALL)
233 break;
234 case IQService::DEBUG_VSYNC:
235 ctx->vstate.debug = enable;
236 if (debug_type != IQService::DEBUG_ALL)
237 break;
Tatenda Chipeperekwa06af9cb2014-08-26 14:51:05 -0700238 case IQService::DEBUG_VD:
Manoj Kumar AVM9591a5e2014-08-21 22:50:21 -0700239 HWCVirtualVDS::dynamicDebug(enable);
Tatenda Chipeperekwa06af9cb2014-08-26 14:51:05 -0700240 if (debug_type != IQService::DEBUG_ALL)
241 break;
Saurabh Shah24eec8a2014-08-22 15:07:25 -0700242 case IQService::DEBUG_PIPE_LIFECYCLE:
243 Overlay::debugPipeLifecycle(enable);
244 if (debug_type != IQService::DEBUG_ALL)
245 break;
Naseer Ahmed35a268c2014-06-24 19:07:13 -0400246 }
247}
248
Saurabh Shah59562ff2014-09-30 16:13:12 -0700249static void setIdleTimeout(hwc_context_t* ctx, const Parcel* inParcel) {
250 uint32_t timeout = (uint32_t)inParcel->readInt32();
251 ALOGD("%s :%u ms", __FUNCTION__, timeout);
252 Locker::Autolock _sl(ctx->mDrawLock);
253 MDPComp::setIdleTimeout(timeout);
254}
255
Jeykumar Sankaranbe93e272014-06-19 18:15:57 -0700256static void setMaxPipesPerMixer(hwc_context_t* ctx, const Parcel* inParcel) {
257 uint32_t value = (uint32_t)inParcel->readInt32();
258 ALOGD("%s : setting MaxPipesPerMixer: %d ", __FUNCTION__, value);
259 Locker::Autolock _sl(ctx->mDrawLock);
260 MDPComp::setMaxPipesPerMixer(value);
261}
262
Saurabh Shahcd018352014-11-11 13:54:19 -0800263static void toggleBWC(hwc_context_t* ctx, const Parcel* inParcel) {
264 uint32_t enable = (uint32_t)inParcel->readInt32();
265 if(MDPVersion::getInstance().supportsBWC()) {
266 Locker::Autolock _sl(ctx->mDrawLock);
267 ctx->mBWCEnabled = (bool) enable;
268 ALOGI("%s: Set BWC to %d", __FUNCTION__, enable);
269 } else {
270 ALOGI("%s: Target doesn't support BWC", __FUNCTION__);
271 }
272}
273
Raj Kamal0d53fc62014-11-25 17:36:36 +0530274static void configureDynRefreshRate(hwc_context_t* ctx,
275 const Parcel* inParcel) {
276 uint32_t op = (uint32_t)inParcel->readInt32();
277 uint32_t refresh_rate = (uint32_t)inParcel->readInt32();
278 MDPVersion& mdpHw = MDPVersion::getInstance();
279 uint32_t dpy = HWC_DISPLAY_PRIMARY;
280
281 if(mdpHw.isDynFpsSupported()) {
282 Locker::Autolock _sl(ctx->mDrawLock);
283
284 switch (op) {
285 case DISABLE_METADATA_DYN_REFRESH_RATE:
286 ctx->mUseMetaDataRefreshRate = false;
287 setRefreshRate(ctx, dpy, ctx->dpyAttr[dpy].refreshRate);
288 break;
289 case ENABLE_METADATA_DYN_REFRESH_RATE:
290 ctx->mUseMetaDataRefreshRate = true;
291 setRefreshRate(ctx, dpy, ctx->dpyAttr[dpy].refreshRate);
292 break;
293 case SET_BINDER_DYN_REFRESH_RATE:
294 if(ctx->mUseMetaDataRefreshRate)
295 ALOGW("%s: Ignoring binder request to change refresh-rate",
296 __FUNCTION__);
297 else {
298 uint32_t rate = roundOff(refresh_rate);
299 if((rate >= mdpHw.getMinFpsSupported() &&
300 rate <= mdpHw.getMaxFpsSupported())) {
301 setRefreshRate(ctx, dpy, rate);
302 } else {
303 ALOGE("%s: Requested refresh-rate should be between \
304 (%d) and (%d). Given (%d)", __FUNCTION__,
305 mdpHw.getMinFpsSupported(),
306 mdpHw.getMaxFpsSupported(), rate);
307 }
308 }
309 break;
310 default:
311 ALOGE("%s: Invalid op %d",__FUNCTION__,op);
312 }
313 }
314}
315
Jeykumar Sankaran53b05f22014-08-05 11:27:03 -0700316static status_t setPartialUpdatePref(hwc_context_t *ctx, uint32_t enable) {
317 ALOGD("%s: enable: %d", __FUNCTION__, enable);
318 if(qhwc::MDPComp::setPartialUpdatePref(ctx, (bool)enable) < 0)
319 return NO_INIT;
320 return NO_ERROR;
321}
322
Naseer Ahmed78951b22014-12-10 18:19:21 -0500323static void toggleScreenUpdate(hwc_context_t* ctx, uint32_t on) {
324 ALOGD("%s: toggle update: %d", __FUNCTION__, on);
Naseer Ahmed78951b22014-12-10 18:19:21 -0500325 if (on == 0) {
Raj Kamal58b31a02014-12-16 15:53:53 +0530326 ctx->mDrawLock.lock();
Naseer Ahmed78951b22014-12-10 18:19:21 -0500327 ctx->dpyAttr[HWC_DISPLAY_PRIMARY].isPause = true;
328 ctx->mOverlay->configBegin();
329 ctx->mOverlay->configDone();
330 ctx->mRotMgr->clear();
331 if(!Overlay::displayCommit(ctx->dpyAttr[0].fd)) {
332 ALOGE("%s: Display commit failed", __FUNCTION__);
333 }
Raj Kamal58b31a02014-12-16 15:53:53 +0530334 ctx->mDrawLock.unlock();
Naseer Ahmed78951b22014-12-10 18:19:21 -0500335 } else {
Raj Kamal58b31a02014-12-16 15:53:53 +0530336 ctx->mDrawLock.lock();
Naseer Ahmed78951b22014-12-10 18:19:21 -0500337 ctx->dpyAttr[HWC_DISPLAY_PRIMARY].isPause = false;
Raj Kamal58b31a02014-12-16 15:53:53 +0530338 ctx->mDrawLock.unlock();
Naseer Ahmed78951b22014-12-10 18:19:21 -0500339 ctx->proc->invalidate(ctx->proc);
340 }
341}
342
Naseer Ahmed6bbd0a12015-01-23 11:57:10 -0500343static void setS3DMode(hwc_context_t* ctx, int mode) {
344 if (ctx->mHDMIDisplay) {
345 if(ctx->mHDMIDisplay->isS3DModeSupported(mode)) {
346 ALOGD("%s: Force S3D mode to %d", __FUNCTION__, mode);
347 Locker::Autolock _sl(ctx->mDrawLock);
348 ctx->dpyAttr[HWC_DISPLAY_EXTERNAL].s3dModeForced = true;
349 setup3DMode(ctx, HWC_DISPLAY_EXTERNAL, mode);
350 } else {
351 ALOGD("%s: mode %d is not supported", __FUNCTION__, mode);
352 }
353 } else {
354 ALOGE("%s: No HDMI Display detected", __FUNCTION__);
355 }
356}
357
Naseer Ahmed4957c522013-11-12 18:07:15 -0500358status_t QClient::notifyCallback(uint32_t command, const Parcel* inParcel,
359 Parcel* outParcel) {
Arun Kumar K.R8e7a62f2013-12-06 18:55:41 -0800360 status_t ret = NO_ERROR;
Naseer Ahmed4957c522013-11-12 18:07:15 -0500361
Naseer Ahmed4957c522013-11-12 18:07:15 -0500362 switch(command) {
363 case IQService::SECURING:
364 securing(mHwcContext, inParcel->readInt32());
365 break;
366 case IQService::UNSECURING:
367 unsecuring(mHwcContext, inParcel->readInt32());
368 break;
369 case IQService::SCREEN_REFRESH:
370 return screenRefresh(mHwcContext);
371 break;
372 case IQService::EXTERNAL_ORIENTATION:
373 setExtOrientation(mHwcContext, inParcel->readInt32());
374 break;
375 case IQService::BUFFER_MIRRORMODE:
376 setBufferMirrorMode(mHwcContext, inParcel->readInt32());
377 break;
Arun Kumar K.R8e7a62f2013-12-06 18:55:41 -0800378 case IQService::GET_DISPLAY_VISIBLE_REGION:
379 ret = getDisplayVisibleRegion(mHwcContext, inParcel->readInt32(),
380 outParcel);
381 break;
Naseer Ahmed78c952e2013-11-25 18:12:23 -0500382 case IQService::CHECK_EXTERNAL_STATUS:
383 isExternalConnected(mHwcContext, outParcel);
384 break;
385 case IQService::GET_DISPLAY_ATTRIBUTES:
386 getDisplayAttributes(mHwcContext, inParcel, outParcel);
387 break;
388 case IQService::SET_HSIC_DATA:
Arun Kumar K.R2aa44c62014-01-21 23:08:28 -0800389 setHSIC(inParcel);
Raj kamal59fea562014-04-01 16:52:19 +0530390 break;
Arun Kumar K.R33888f52014-10-09 15:56:33 -0700391 case IQService::SET_SECONDARY_DISPLAY_STATUS:
392 setSecondaryDisplayStatus(mHwcContext, inParcel);
Raj kamal59fea562014-04-01 16:52:19 +0530393 break;
Ramkumar Radhakrishnan0a021a82014-05-19 19:53:56 -0700394 case IQService::SET_VIEW_FRAME:
395 setViewFrame(mHwcContext, inParcel);
396 break;
Naseer Ahmed35a268c2014-06-24 19:07:13 -0400397 case IQService::DYNAMIC_DEBUG:
398 toggleDynamicDebug(mHwcContext, inParcel);
399 break;
Saurabh Shah59562ff2014-09-30 16:13:12 -0700400 case IQService::SET_IDLE_TIMEOUT:
401 setIdleTimeout(mHwcContext, inParcel);
402 break;
Jeykumar Sankaranbe93e272014-06-19 18:15:57 -0700403 case IQService::SET_MAX_PIPES_PER_MIXER:
404 setMaxPipesPerMixer(mHwcContext, inParcel);
Jeykumar Sankaran85ddc0c2014-12-17 14:39:26 -0800405 break;
Jeykumar Sankaran53b05f22014-08-05 11:27:03 -0700406 case IQService::SET_PARTIAL_UPDATE:
407 ret = setPartialUpdatePref(mHwcContext, inParcel->readInt32());
Jeykumar Sankaranbe93e272014-06-19 18:15:57 -0700408 break;
Saurabh Shahcd018352014-11-11 13:54:19 -0800409 case IQService::TOGGLE_BWC:
410 toggleBWC(mHwcContext, inParcel);
411 break;
Raj Kamal0d53fc62014-11-25 17:36:36 +0530412 case IQService::CONFIGURE_DYN_REFRESH_RATE:
413 configureDynRefreshRate(mHwcContext, inParcel);
414 break;
Naseer Ahmed78951b22014-12-10 18:19:21 -0500415 case IQService::TOGGLE_SCREEN_UPDATE:
416 toggleScreenUpdate(mHwcContext, inParcel->readInt32());
417 break;
Naseer Ahmed6bbd0a12015-01-23 11:57:10 -0500418 case IQService::SET_S3D_MODE:
419 setS3DMode(mHwcContext, inParcel->readInt32());
420 break;
Naseer Ahmed4957c522013-11-12 18:07:15 -0500421 default:
Arun Kumar K.R8e7a62f2013-12-06 18:55:41 -0800422 ret = NO_ERROR;
Naseer Ahmed4957c522013-11-12 18:07:15 -0500423 }
Arun Kumar K.R8e7a62f2013-12-06 18:55:41 -0800424 return ret;
Naseer Ahmed4957c522013-11-12 18:07:15 -0500425}
426
Saurabh Shah86c17292013-02-08 15:24:13 -0800427}