Merge "hwc: Reset the refresh rate alone to avoid stack corruption."
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index 43a7a1a..8c8eb35 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -2181,7 +2181,8 @@
__FUNCTION__);
mCachedFrame.reset();
#ifdef DYNAMIC_FPS
- setDynRefreshRate(ctx, list);
+ // Reset refresh rate
+ setRefreshRate(ctx, mDpy, ctx->dpyAttr[mDpy].refreshRate);
#endif
freeHwCursor(ctx->dpyAttr[mDpy].fd, mDpy);
return -1;
@@ -2198,7 +2199,8 @@
setMDPCompLayerFlags(ctx, list);
mCachedFrame.updateCounts(mCurrentFrame);
#ifdef DYNAMIC_FPS
- setDynRefreshRate(ctx, list);
+ // Reset refresh rate
+ setRefreshRate(ctx, mDpy, ctx->dpyAttr[mDpy].refreshRate);
#endif
freeHwCursor(ctx->dpyAttr[mDpy].fd, mDpy);
ret = -1;