Commit Graph

51924 Commits

Author SHA1 Message Date
John Reck
9c8efe6dfd am dd749506: Merge "Fix async_stop"
* commit 'dd7495068b9af549d2bb1e3c4f3d91a9a929d3f0':
  Fix async_stop
2015-06-29 14:28:45 +00:00
John Reck
dd7495068b Merge "Fix async_stop" 2015-06-29 14:17:43 +00:00
John Reck
4ba2b63bff Fix async_stop
Change-Id: I68a258cf71cfcd999bbd568ab3c96255c11bec41
(cherry picked from commit 2c237ee1d5)
2015-06-29 23:16:19 +09:00
Mark Salyzyn
3a6a953ccc am 2ab05fc5: Merge "dumpstate: modify logcat timeout to compensate for storage speed"
* commit '2ab05fc551f8ee8442b05484cce0350c1b523678':
  dumpstate: modify logcat timeout to compensate for storage speed
2015-06-15 14:35:49 +00:00
Mark Salyzyn
2ab05fc551 Merge "dumpstate: modify logcat timeout to compensate for storage speed" 2015-06-15 14:27:11 +00:00
Mark Salyzyn
f989162bb8 dumpstate: modify logcat timeout to compensate for storage speed
Discover the logcat buffer size, divide by the worst storage
speed in kb/s, and multiply by ten to estimate the timeout in
ms for each named buffer. If that value is less than 20 seconds,
then select 20 seconds. Apply this to each logcat request.

Bug: 21555259
Change-Id: Id36aebff83cb06e94350e4a84fa266b66a8444fc
2015-06-12 13:19:04 -07:00
Dan Stoza
0501cdbc04 am 2b5b55e7: Merge "sf: Fix incorrect state reporting in dumpsys"
* commit '2b5b55e73c79658b9a0ae3fdf347f6dbe65e3c68':
  sf: Fix incorrect state reporting in dumpsys
2015-06-12 17:00:44 +00:00
Dan Stoza
2b5b55e73c Merge "sf: Fix incorrect state reporting in dumpsys" 2015-06-12 16:47:21 +00:00
Manoj Kumar AVM
e54506b81a sf: Fix incorrect state reporting in dumpsys
Dumpsys utility accesses layer compositionType variable
with out proper protection. These variables are modified
during hwc_prepare call. Existing HAL lock protection is not
sufficient to address this issue. Failure to do this will
result in incorrect state reporting in dumpsys.

A new displayLock mutex in HWComposer will be used in both
dumpsys and draw calls to ensure correct state is accessed.

Change-Id: I8a57de59525adc0e089b3bed95c067c01e42b666
2015-06-11 18:21:18 -04:00
Dan Stoza
25a83393e6 am 85e271d0: Merge "sf: Add a NULL check in getDisplayConfigs"
* commit '85e271d051770fdd5bb1bb017255f735cbd45459':
  sf: Add a NULL check in getDisplayConfigs
2015-06-11 19:40:31 +00:00
Dan Stoza
85e271d051 Merge "sf: Add a NULL check in getDisplayConfigs" 2015-06-11 19:31:44 +00:00
Tatenda Chipeperekwa
40da48bfdf sf: Add a NULL check in getDisplayConfigs
Validate the display binder by adding a NULL check in getDisplayConfigs.
This will prevent a false match if the caller queries the display
configs for an inactive display (whose binder is NULL by default).

Without this change we might end up attempting to index the display
config array, which is unpopulated for inactive displays, and this will
result in a crash. (See getDisplayInfo in SurfaceComposerClient.cpp for
an example of this scenario)

Change-Id: Ib32a7dc8378d3438df0dba1ecd608bbcfc837717
2015-06-11 12:28:41 -07:00
Dan Stoza
35710ab014 am ffe3e96a: Merge "GLConsumer: Fix crop math"
* commit 'ffe3e96afe99e94904ca0c8f458a3eb708d78066':
  GLConsumer: Fix crop math
2015-06-11 17:47:58 +00:00
Dan Stoza
ffe3e96afe Merge "GLConsumer: Fix crop math" 2015-06-11 17:34:15 +00:00
Dan Stoza
68efa84e7e GLConsumer: Fix crop math
When we have excess pixels that need to be removed from (for example)
the left and right sides, we currently do something like:

  left += excess / 2;
  right -= excess / 2;

If excess is odd, however, this removes 1 too few pixels since the odd
pixel gets rounded down twice. This changes the math to effectively:

  left += excess / 2;
  right -= (excess - excess / 2);

Which removes the correct total number of pixels.

Bug: 19611086
Change-Id: I8d1ad9fe7ba67c149794c148663d12acbccccef0
(cherry picked from commit ec4cb38750)
2015-06-11 10:20:23 -07:00
Dan Stoza
430f5f5a62 am 127cf2ef: Merge "SF: Swap w/h when capturing rotated screenshots"
* commit '127cf2eff638a98c5318ba8b3edaf3ca651c4090':
  SF: Swap w/h when capturing rotated screenshots
2015-06-10 18:21:55 +00:00
Dan Stoza
127cf2eff6 Merge "SF: Swap w/h when capturing rotated screenshots" 2015-06-10 18:10:07 +00:00
Dan Stoza
65dc7eeff0 SF: Swap w/h when capturing rotated screenshots
Swaps width and height when capturing a screenshot that is rotated by
90 or 270 degrees.

Bug: 8433742
Change-Id: Ibf0b604f541e3cc271e56fe0ad04dc366beb5d79
(cherry picked from commit 3502416204)
2015-06-10 10:33:21 -07:00
Dan Stoza
558f55c798 am 5ab3ba1e: Merge "SF: Don\'t crop surface damage against viewport"
* commit '5ab3ba1e43e609c7a77cc780c888f666d153a4c9':
  SF: Don't crop surface damage against viewport
2015-06-09 20:40:48 +00:00
Dan Stoza
5ab3ba1e43 Merge "SF: Don't crop surface damage against viewport" 2015-06-09 20:28:59 +00:00
Dan Stoza
074a13a3cb SF: Don't crop surface damage against viewport
Apply the display transform to surface damage, but don't intersect it
with the viewport.

Bug: 21486007
Change-Id: I94e697cea52096a960385d5f3b89609fdcf30a02
(cherry picked from commit 17833a1b0d)
2015-06-09 13:27:45 -07:00
Dan Stoza
837b9fb87b am 816c9e0e: Merge "libgui/SurfaceFlinger: Add getConsumerName"
* commit '816c9e0eab939322360da972569506ba19fafc74':
  libgui/SurfaceFlinger: Add getConsumerName
2015-06-09 18:37:09 +00:00
Dan Stoza
9a9bedc815 am b169b49a: Merge "libgui: Add generation numbers to BufferQueue"
* commit 'b169b49aecdbf3424f334ac2b22c36a2988a8338':
  libgui: Add generation numbers to BufferQueue
2015-06-09 18:37:08 +00:00
Dan Stoza
816c9e0eab Merge "libgui/SurfaceFlinger: Add getConsumerName" 2015-06-09 18:34:11 +00:00
Dan Stoza
53a2e97a78 libgui/SurfaceFlinger: Add getConsumerName
Adds a getConsumerName method to IGraphicBufferProducer and Surface.
Currently, the name is cached inside of IGBP and is update on connect
and dequeueBuffer, which should be good enough for most uses.

Bug: 6667401
Change-Id: I22c7881d778e495cf8276de7bbcd769e52429915
(cherry picked from commit c6f30bdee1)
2015-06-09 11:28:37 -07:00
Dan Stoza
b169b49aec Merge "libgui: Add generation numbers to BufferQueue" 2015-06-09 18:23:48 +00:00
Dan Stoza
993772a60a libgui: Add generation numbers to BufferQueue
This change allows producers to set a generation number on a
BufferQueue. This number will be embedded in any new GraphicBuffers
created in that BufferQueue, and attempts to attach buffers which have
a different generation number will fail.

It also plumbs the setGenerationNumber method through Surface, with the
additional effect that any buffers attached to the Surface after
setting a new generation number will automatically be updated with the
new number (as opposed to failing, as would happen on through IGBP).

Bug: 20923096
Change-Id: I32bf726b035f99c3e5834beaf76afb9f01adcbc2
(cherry picked from commit 812ed0644f)
2015-06-08 11:18:16 -07:00
Nick Kralevich
1170bbe56a am c19fdee3: Merge "Call selinux_status_open() prior to use of selinux_status_updated()."
* commit 'c19fdee38a4715b0d642fc8673687715766307cc':
  Call selinux_status_open() prior to use of selinux_status_updated().
2015-06-03 13:41:53 +00:00
Nick Kralevich
c19fdee38a Merge "Call selinux_status_open() prior to use of selinux_status_updated()." 2015-06-03 13:33:37 +00:00
Stephen Smalley
bea0746b24 Call selinux_status_open() prior to use of selinux_status_updated().
The selinux_status_*() interfaces require calling selinux_status_open()
first.  Since this was not being called by servicemanager, the
selinux_status_updated() call was always failing and servicemanager
was not reloading service_contexts upon a policy reload.

Change-Id: I6ac62e114bbca99c5f0999feb918fcde15009274
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-06-03 09:27:08 -04:00
Dan Stoza
ae892959e4 am 8980e0cc: Merge "libgui: Propagate error by clearing sp<GB>"
* commit '8980e0ccd4608adbef0d7c80ead97cec995e269c':
  libgui: Propagate error by clearing sp<GB>
2015-06-01 22:09:30 +00:00
Dan Stoza
8980e0ccd4 Merge "libgui: Propagate error by clearing sp<GB>" 2015-06-01 21:59:20 +00:00
Dan Stoza
3d6022a43e libgui: Propagate error by clearing sp<GB>
Clears the sp<GraphicBuffer> returned by createGraphicBuffer when there
is an error during unflattening.

Bug: 21498231
Change-Id: I886da4474fc06853cc59188d62044b7d7549126b
(cherry picked from commit 6a04e5fcf6)
2015-06-01 14:58:35 -07:00
Dan Stoza
67ff12d952 am cf1edb3f: Merge "Fix libgui crop matrix test."
* commit 'cf1edb3f3ece597dcf9c3f4ae018374550e8b561':
  Fix libgui crop matrix test.
2015-06-01 18:42:31 +00:00
Dan Stoza
958e9bbdc6 am 75145aa2: Merge "SF: Reduce resync samples without present"
* commit '75145aa2b77c348bce43c432c17b70f6dcb31c91':
  SF: Reduce resync samples without present
2015-06-01 18:31:20 +00:00
Dan Stoza
cf1edb3f3e Merge "Fix libgui crop matrix test." 2015-06-01 18:31:19 +00:00
Dan Stoza
2daeb12481 am edcfe7c5: Merge "libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc"
* commit 'edcfe7c513a111890b7bd245cf10fa105e910277':
  libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc
2015-06-01 18:31:19 +00:00
Dan Stoza
04bb7a9a41 am c76683f5: Merge "Check that width and height parameters are small."
* commit 'c76683f51f6ad1f5493d9af43bf868601f474060':
  Check that width and height parameters are small.
2015-06-01 18:31:17 +00:00
Michael Lentine
34228137cc Fix libgui crop matrix test.
On devices that have the crop image extension the crop is not applied to the
transform matrix so we have to expect different results in this case.

Change-Id: If62dec1111fb77c9fa2c4332d121665960ce0216
(cherry picked from commit 04b00cea67)
2015-06-01 11:30:15 -07:00
Dan Stoza
75145aa2b7 Merge "SF: Reduce resync samples without present" 2015-06-01 18:27:35 +00:00
Dan Stoza
ef78916d86 SF: Reduce resync samples without present
Reduces the number of resync samples that DispSync will attempt to
collect without an intervening present from 12 to 4. The former value
was causing excessive power draw for some vendors' implementations, and
reducing it doesn't seem to harm anything.

Bug: 20724456
Change-Id: Ifd6e0490be67756ed001d509a38e8a36953b4618
(cherry picked from commit 9c64757f65)
2015-06-01 11:26:34 -07:00
Dan Stoza
edcfe7c513 Merge "libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc" 2015-06-01 18:25:50 +00:00
Dan Stoza
24fa67f62a libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc
Applies GRALLOC_USAGE_ALLOC_MASK to the incoming usage bits before
calling alloc on the gralloc module. This filters out the new flag
GRALLOC_USAGE_FOREIGN_BUFFERS, which is used to send a hint to the
producer, but which does not affect the allocation of buffers.

Bug: 19801661
Change-Id: Ia37a3eddba2e97598e50ac3e10877430adfa9247
(cherry picked from commit b8efdc4003)
2015-06-01 11:21:56 -07:00
Dan Stoza
c76683f51f Merge "Check that width and height parameters are small." 2015-06-01 18:18:42 +00:00
Michael Lentine
9530388b26 Check that width and height parameters are small.
The product of width and height should be less than UINT32_MAX (in practice
smaller). Adding the checks prevents overflows when allocating buffers.

Bug: 20726612
Change-Id: I9769edf0688a9bfe69906d49fa0540cadf4c49b0
(cherry picked from commit 1c4537e2e8)
2015-06-01 11:12:28 -07:00
Dan Stoza
2a185c2476 am a8702c47: Merge "SurfaceFlinger: Tweak whitespace in DdmConnection"
* commit 'a8702c4765993f31a70243e4f89c251fe9911cde':
  SurfaceFlinger: Tweak whitespace in DdmConnection
2015-05-28 21:40:29 +00:00
Dan Stoza
adb3aff05c am 5566d9db: Merge "Bypass surface flinger permission check for calls from system."
* commit '5566d9db26e656a53ee9a5e87c0af997bb1a10d5':
  Bypass surface flinger permission check for calls from system.
2015-05-28 21:40:28 +00:00
Dan Stoza
84a507aeea am 13c04c27: Merge "surfaceflinger: Fix range check for getFormat"
* commit '13c04c27622c7be474e9368211795bcec052dedb':
  surfaceflinger: Fix range check for getFormat
2015-05-28 21:40:27 +00:00
Dan Stoza
a8702c4765 Merge "SurfaceFlinger: Tweak whitespace in DdmConnection" 2015-05-28 21:25:11 +00:00
Dan Stoza
42ace4b5c6 SurfaceFlinger: Tweak whitespace in DdmConnection
Change-Id: I99e7b09e4bc3611ffb790eddfbb9b3c8b9bc5d4c
2015-05-28 14:23:54 -07:00