OSDN Git Service

Use the HWC caching mechanism to avoid stalls in the ion driver.
authorCorey Tabaka <eieio@google.com>
Thu, 28 Sep 2017 18:15:50 +0000 (11:15 -0700)
committerCorey Tabaka <eieio@google.com>
Thu, 28 Sep 2017 20:51:21 +0000 (13:51 -0700)
commit0d07cdd593f982e5f6e75706c7f9a99a3c5a9264
tree91629517717eb13c52be63aa8f3bf508f0462b9e
parent55f8883bb5b93c6b88350eeb6052a3f145496fdd
Use the HWC caching mechanism to avoid stalls in the ion driver.

HWC supports caching buffers for layers using "slot" assignments.
Use this in VrFlinger to avoid importing a buffer handle every
frame. The avoids periodic stalls we observe in the ion driver
when mapping a buffer into the HWC address space.

Bug: 66459419
Test: Observe systraces no longer have MapBuffer in HWC in steady
      state; system does not drop frames.

Change-Id: Iba4161b33561322bfbccbfafe600b432a6fa7c44
libs/vr/libvrflinger/acquired_buffer.cpp
libs/vr/libvrflinger/acquired_buffer.h
libs/vr/libvrflinger/display_surface.cpp
libs/vr/libvrflinger/hardware_composer.cpp
libs/vr/libvrflinger/hardware_composer.h