Commit Graph

49443 Commits

Author SHA1 Message Date
Jesse Hall
f7a675837b Provide virtual display output buffer to HWC in prepare
We were already making sure the HWComposer class had the handle before
prepare, but it wasn't passing the handle along to HWC as intended.

Partial fix for bug: 11430248
Change-Id: I25f672c4fdfaa6a81fe0acb24d9ad05153ee17dc
2013-11-05 16:27:14 -08:00
Jamie Gennis
39c5ea2caa am ee874caa: Merge "DispSync: remove delay when enabling vsync events" into klp-dev
* commit 'ee874caa81ad48d6d0ee34509d3050ca9c046676':
  DispSync: remove delay when enabling vsync events
2013-11-04 21:55:09 -08:00
Jesse Hall
497ba0e085 Don't use implementation-defined format with CPU consumers
If the virtual display surface is being consumed by the CPU, it can't
be allowed with HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED since there is
no way for the CPU consumer to find out what format gralloc chose. So
for CPU-consumer surfaces, just use the BufferQueue's default format,
which can be set by the consumer.

A better but more invasive change would be to let the consumer require
a certain format (or set of formats?), and disallow the producer from
requesting a different format.

Bug: 11479817
Change-Id: I5b20ee6ac1146550e8799b806e14661d279670c0
2013-11-04 16:43:03 -08:00
Jamie Gennis
ee874caa81 Merge "DispSync: remove delay when enabling vsync events" into klp-dev 2013-11-04 22:47:31 +00:00
Jamie Gennis
41c3c496ff DispSync: remove delay when enabling vsync events
This change fixes a bug that caused an extra frame of latency when enabling
vsync event callbacks in DispSync.  The bug was related to the logic that
prevents the two events from firing with very little time between them due to
updates to the vsync model.

Bug: 11479720
Change-Id: Ie7eaff9e92ffb7b7b6cb4d3d4402c96cbd29af7e
2013-11-01 13:58:56 -07:00
Jesse Hall
18f94b1e6c resolved conflicts for merge of 51b27e82 to klp-dev-plus-aosp
File was moved to system/core.git. Change will be applied there.

Change-Id: Ic2027b7f3f1f1fb4b896a219a8c1b4ab545d9723
2013-10-30 23:21:24 -07:00
Jesse Hall
51b27e8233 Merge "fix corruption in Vector<> when malloc falied" 2013-10-31 04:02:24 +00:00
Igor Murashkin
bb3b524959 am 40da5283: Merge "EGL: rename CallStack::dump into CallStack::log" into klp-dev
* commit '40da5283ebc6b5cf1e3820740dc274c47cc55f6d':
  EGL: rename CallStack::dump into CallStack::log
2013-10-30 14:16:19 -07:00
Igor Murashkin
40da5283eb Merge "EGL: rename CallStack::dump into CallStack::log" into klp-dev 2013-10-30 21:09:40 +00:00
Aravind Akella
245c43395b am 46417b84: Merge "Bug fixes for SensorService" into klp-dev
* commit '46417b845a257d6725adf048a3cfad6306218e9b':
  Bug fixes for SensorService
2013-10-25 18:10:55 -07:00
Igor Murashkin
1f8363329c EGL: rename CallStack::dump into CallStack::log
Bug: 11324229
Change-Id: Ibac1be182c336e7aa5ac098f08d18b3c188964b4
2013-10-25 17:13:57 -07:00
Aravind Akella
46417b845a Merge "Bug fixes for SensorService" into klp-dev 2013-10-25 23:16:59 +00:00
Marco Nelissen
fddab47617 am 708cc794: Native counterpart of new power manager method
* commit '708cc794f6ccd4d31e0a00a23b289272c665adc1':
  Native counterpart of new power manager method
2013-10-25 15:01:29 -07:00
Aravind Akella
b4099e77ec Bug fixes for SensorService
i) Emulate Flush for AOSP Fusion Sesnsors on newer HALs that support batching.
ii) Early return if there are no events for the current SensorEventConnection.

Bug: 11325707, 11376538

Change-Id: Idb856302463649a99d3d5d0c965bb06ba06b8e1d
2013-10-25 13:58:58 -07:00
Marco Nelissen
708cc794f6 Native counterpart of new power manager method
Cherrypicked from master.

b/9464621

Change-Id: I54c0ed50a57ac870da91db8589a73a2c792dbd8d
2013-10-25 12:50:04 -07:00
Jesse Hall
96002be4bd am c354effe: Fix handling of undefined TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS
* commit 'c354effe97be26638618e3bc0da81a3f8b384b20':
  Fix handling of undefined TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS
2013-10-25 10:52:37 -07:00
Jesse Hall
c354effe97 Fix handling of undefined TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS
related to b/8316155 - Implement HWComposer 1.3 w/ virtual display support
Change-Id: I2dc8d65a74174aa833cc491264f97f1f2df49307
2013-10-25 17:48:09 +00:00
Jesse Hall
a54a8b63d1 am 93fcb823: Merge "Add a boardconfig to force HWC composition of virtual displays" into klp-dev
* commit '93fcb82361a1cd5ceb138f8331ad9cf11fc77c95':
  Add a boardconfig to force HWC composition of virtual displays
2013-10-23 15:17:29 -07:00
Jesse Hall
487753868a am c5807f90: Merge "Use implementation-defined format when HWC writes to output buffer" into klp-dev
* commit 'c5807f90f8e05227e6396f30b3ed91fc01392d9a':
  Use implementation-defined format when HWC writes to output buffer
2013-10-23 15:17:29 -07:00
Jesse Hall
93fcb82361 Merge "Add a boardconfig to force HWC composition of virtual displays" into klp-dev 2013-10-23 22:12:54 +00:00
Jesse Hall
c5807f90f8 Merge "Use implementation-defined format when HWC writes to output buffer" into klp-dev 2013-10-23 22:12:37 +00:00
Shuo Gao
0a885309aa fix corruption in Vector<> when malloc falied
1. When alloc or realloc failed in the function SharedBuffer::editResize,
it would return a NULL pointer, then mStorage would update to be 1 by
SharedBuffer::data() if no pointer check here, which is an obviously
wrong address, and would cause corruption when used it e.g. in capacity().

So add the pointer check here for the return value of SharedBuffer::editResize,
if it's NULL do not use it to update mStorage, to avoid the value of mStorage
polluted.

2. when alloc or realloc falied in _grow & _shrink function, mStorage keep
the original value, so mCount should not be updated here.

Otherwise, mStorage might be 0 but mCount>0, so a corruption would happend
when it try to delete items from the Vector since mCount>0.

Change-Id: I7c3814e843c459834ca5eed392e8d63d1cb7d2d8
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 139626
2013-10-22 22:36:46 -07:00
Michael Wright
47f0b9894b am 3223217a: Only consume touches up until the frame time
* commit '3223217aed6dcfa55b5b952cd6be71f70e41ba63':
  Only consume touches up until the frame time
2013-10-21 17:23:55 -07:00
Michael Wright
3223217aed Only consume touches up until the frame time
When resampling is disabled, it's currently possible to consume
touches after the current frame time. This breaks some guarantees and
could cause unexpected behaviors.

Change-Id: I99908a2cac2df9f795dd4a07188b4451213cf3e4
2013-10-21 23:57:17 +00:00
Andy McFadden
251b11c204 am 85075869: Wait for buffers to drain
* commit '8507586903fa803abf535853a169913f2cf2e555':
  Wait for buffers to drain
2013-10-18 16:57:01 -07:00
Andy McFadden
8507586903 Wait for buffers to drain
When a BufferQueue producer disconnects and reconnects, we retain
the previously-queued buffers but empty the slots.  This allows
the number of queued buffers to grow without limit.  The low-memory
killer does not approve.

Bug 11069934

Change-Id: Ia2eaa954c7a3904b54209a3701dba01689e204d8
2013-10-18 23:10:16 +00:00
Naseer Ahmed
6a968462f9 Add a boardconfig to force HWC composition of virtual displays
When this boardconfig is defined, even when all virtual display
composition is done by GLES, the HWC will be forced to copy from the
GLES framebuffer to the output buffer. On some hardware this allows
HWC to do format conversions that would otherwise have to be done by
the consumer, with worse power and/or performance.

Bug: 8316155
Change-Id: If980ecc589f138cef063eafa757f7f748196713e
2013-10-17 13:57:58 -07:00
Jesse Hall
1e27ba234c Use implementation-defined format when HWC writes to output buffer
When GLES isn't writing to the output buffer directly, request an
implementation-defined format with minimal usage flags, leaving the
format choice up to gralloc. On some hardware this allows HWC to do
format conversions during composition that would otherwise need to be
done (with worse power and/or performance) by the consumer.

Bug: 8316155
Change-Id: Iee6ee8404282036f9fd1833067cfe11dbadbf0bf
2013-10-17 11:20:22 -07:00
Ed Heyl
afd0debe4b am dacd4159: merge in klp-release (no-op)
* commit 'dacd4159631865da1a02203fe5fa7c5f1339cda9':
  Change API from flush(handle) to flush(). Call flush on all active sensors in the given SensorEventConnection.
  Eliminate latency when resampling is disabled
  Fix blank / partial screenshots
  Set the outbuf acquire fence after we actually have it.
  only clear FB when asked for the opaque layer
  Treat composition frames with no layers as using GLES composition
  Fix two EGLConfig selection bugs
  fix crashers with wifi/virtual displays
2013-10-16 17:56:33 -07:00
Ed Heyl
dacd415963 merge in klp-release (no-op) 2013-10-16 17:43:06 -07:00
The Android Automerger
993da5c301 merge in klp-release history after reset to klp-dev 2013-10-15 21:14:09 -07:00
Jamie Gennis
bbfbe93c0d am 0a645cc5: SurfaceFlinger: give SF its own vsync phase
* commit '0a645cc5a935e67a8d1effc7679a838160b971d8':
  SurfaceFlinger: give SF its own vsync phase
2013-10-15 16:17:18 -07:00
Jamie Gennis
47c772e8ec am d1700756: SurfaceFlinger: Add EventControlThread
* commit 'd1700756ec9520c3fba22f9a14fd064a6e288810':
  SurfaceFlinger: Add EventControlThread
2013-10-15 16:17:18 -07:00
Jesse Hall
e94d204ab0 am 24742375: Merge "Disable hardware vsync when blanking the screen" into klp-dev
* commit '247423751fd4bfb0b1f87537c985413a28fd04a1':
  Disable hardware vsync when blanking the screen
2013-10-15 16:16:47 -07:00
The Android Automerger
288515bf44 merge in klp-release history after reset to klp-dev 2013-10-15 15:55:41 -07:00
Jamie Gennis
0a645cc5a9 SurfaceFlinger: give SF its own vsync phase
This change allows SurfaceFlinger to run at a different vsync phase offset from
that used by external listeners.

Bug: 11175503
Change-Id: I561c53a5659fa6dc1e3e4ae30340f3c1a6adceb4
2013-10-15 14:31:41 -07:00
Jamie Gennis
d1700756ec SurfaceFlinger: Add EventControlThread
This change adds a new thread for calling HWComposer's eventControl
asynchronously.  The DispSync-based vsync approach ends up enabling and
disabling HWComposer's vsync callbacks at arbitrary times, and some HWComposer
implementations do not have these calls optimized.

Bug: 11175503
Change-Id: I719be82bd200b391c61d40863b991c7b59acdfd6
2013-10-15 14:31:41 -07:00
Jesse Hall
247423751f Merge "Disable hardware vsync when blanking the screen" into klp-dev 2013-10-15 19:53:11 +00:00
Aravind Akella
487c7815d7 am 641a1868: Merge "SensorService Flush API bug fix." into klp-dev
* commit '641a18688bc6b208bbeaffa6083d3cf5f6790e4b':
  SensorService Flush API bug fix.
2013-10-15 10:05:09 -07:00
Aravind Akella
641a18688b Merge "SensorService Flush API bug fix." into klp-dev 2013-10-15 17:01:55 +00:00
The Android Automerger
3bd1b65ffb merge in klp-release history after reset to klp-dev 2013-10-15 06:00:54 -07:00
Jesse Hall
a04fd39cb8 am 8e26b28b: Filter out vsync events from HWC with duplicate timestamps
* commit '8e26b28be62e7c0e093900540db5e5cdcf52a0ff':
  Filter out vsync events from HWC with duplicate timestamps
2013-10-14 20:34:58 -07:00
Aravind Akella
c551eac5b1 SensorService Flush API bug fix.
SensorService is dead locking itself when flush is called on older devices which don't support batching. mConnectionLock is acquired twice.

Change-Id: I5c25585bfb2b396df4b05826a9cba1da7997a3ee
2013-10-14 17:09:19 -07:00
Jesse Hall
948fe0ce74 Disable hardware vsync when blanking the screen
Bug: 11220224
Change-Id: I99d0a42e1a6bb0aaf89706f6d100e9ef2a5deaa4
2013-10-14 16:25:01 -07:00
Jesse Hall
8e26b28be6 Filter out vsync events from HWC with duplicate timestamps
Bug: 11220224
Change-Id: I4efe0b66ea8969bf0ec3c4fcb325d354c8a0c315
2013-10-14 15:34:00 -07:00
The Android Automerger
4fec2900a3 merge in klp-release history after reset to klp-dev 2013-10-13 19:20:31 -07:00
Aravind Akella
055558b257 am 2d344979: Merge "Adding PackageManager feature strings for stepcounter and stepdetector." into klp-dev
* commit '2d344979eb200b7fb8ba4d811a22c80b1d77b564':
  Adding PackageManager feature strings for stepcounter and stepdetector.
2013-10-13 15:51:59 -07:00
Aravind Akella
2d344979eb Merge "Adding PackageManager feature strings for stepcounter and stepdetector." into klp-dev 2013-10-13 22:47:47 +00:00
Aravind Akella
d7a5342828 Adding PackageManager feature strings for stepcounter and stepdetector.
Change-Id: I75ec21900fdc3ea80b61ec12c851a0c5ce9c44e8
2013-10-13 14:53:45 -07:00
Jesse Hall
44b09f8b55 am 44e45cfe: Merge "DispSync: don\'t compensate for wakeup latency" into klp-dev
* commit '44e45cfeb37a04c206730b12ff001525ebe42a7b':
  DispSync: don't compensate for wakeup latency
2013-10-13 13:18:58 -07:00