OSDN Git Service

SurfaceFlinger_hwc1: fix timed out waiting for hw vsync
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 20 Dec 2017 13:09:39 +0000 (21:09 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 20 Dec 2017 13:09:39 +0000 (21:09 +0800)
The commit f4174530 changed DispSync initialization to an init method.
However, the hwc1 version of SurfaceFlinger is not updated to call
this method. As a result, DispSync is not initialized.

services/surfaceflinger/SurfaceFlinger_hwc1.cpp

index 455b020..f58e11e 100644 (file)
@@ -178,6 +178,8 @@ SurfaceFlinger::SurfaceFlinger()
     maxFrameBufferAcquiredBuffers = getInt64< ISurfaceFlingerConfigs,
             &ISurfaceFlingerConfigs::maxFrameBufferAcquiredBuffers>(2);
 
+    mPrimaryDispSync.init(hasSyncFramework, dispSyncPresentTimeOffset);
+
     char value[PROPERTY_VALUE_MAX];
 
     property_get("ro.bq.gpu_to_cpu_unsupported", value, "0");