Commit Graph

53483 Commits

Author SHA1 Message Date
Prashant Malani
a777e8b70f inputflinger: Add support for scaling and true value reporting
am: ee03865fe5

* commit 'ee03865fe5fc6ffe9deda0e0870a18206027cfaf':
  inputflinger: Add support for scaling and true value reporting
2016-01-13 05:33:57 +00:00
Prashant Malani
ee03865fe5 inputflinger: Add support for scaling and true value reporting
-1/+1 somewhat simplifies the values that can be generated by rotary
encoders, and rules out the possibility of batching and more nuanced
movement reporting.

So, we modify the device configuration to allow values other than -1 and
1 to be supported. In order to give the developer a sense of what these
values map to in terms of angular displacement, we also parse a
resolution configuration from the devices IDC file.

This will be specified as:

device.res = xxxx

of type float. If a value is not provided, a default res value of 0.0f
is used.

This patch also adds a per device scaling factor, which is used to
suitably modify the values reported (as well as the resolution) to tune
the input events generated and resulting UI according to the hardware.
This can be specified in the IDC file as:

device.scalingFactor = xxxx

of type float. If a scaling factor is not provided, a default of 1.0f
is used.

Bug: 22836852
Bug: 18707397
Change-Id: I13686f64de1b52d3f6c97b2587ae41e52d1db6e2
2016-01-11 17:37:38 -08:00
Robert Shih
d06421fd37 IGraphicBufferProducer: fix QUEUE_BUFFER info leak
Bug: 26338109
Change-Id: I8a979469bfe1e317ebdefa43685e19f9302baea8
2016-01-11 16:33:17 -08:00
Robert Shih
dded8fdbb7 IGraphicBufferConsumer: fix ATTACH_BUFFER info leak
Bug: 26338113
Change-Id: I019c4df2c6adbc944122df96968ddd11a02ebe33
2016-01-11 11:47:42 -08:00
Abhisek Devkota
8af4e664d9 Revert "Revert "gui: only support tertiary display if QTI_BSP is defined""
This reverts commit fd95bb1c24.

Change-Id: I0acbd3a8ba91f33e1ad60b14093101811683e04f
2016-01-09 17:50:43 -08:00
Arun Kumar K.R
c86c815f74 SurfaceFlinger: Move Extended SF classes to same repository
Move the ExSurfaceFlinger, ExLayer, etc., classes to this
repository, to avoid dependency accross projects with static
linking

The following commits are included in this:
commit 04f501b31f627e47ae540b5160b2f86b7adbd921
Author: Baldev Sahu <bsahu@codeaurora.org>
Date:   Wed Nov 25 18:05:51 2015 +0530

display-fw: Properly initialise mIsGPUAllowedForProtected flag

- This flag need to be initialize to false when layer is
  created.

Change-Id: Ie3df40ffc4240c33883f19ecbef6428f7c539b07
CRs-fixed: 942102

commit 09032188751356db295bc5467133ec484dc536cd
Author: Arun Kumar K.R <akumarkr@codeaurora.org>
Date:   Tue Oct 20 10:22:51 2015 -0700

display-fw: Enable checking for INTERNAL_ONLY private flag

Check for INTERNAL_ONLY private flag and return correct values
from the function isIntOnly

Change-Id: I61b44f636412e0ad93e1b3ff18e4accdf90eeafe
CRs-fixed: 927880

commit f687ac25b3482b92da3c252d29b65e850cca3ce1
Author: Arun Kumar K.R <akumarkr@codeaurora.org>
Date:   Thu Oct 15 16:37:11 2015 -0700

display-frameworks: Include libqdutils
only for target builds

Featurize including libqdutils for targets which uses QCOM_BSP,
helps in resolving compilation for emulator builds

Change-Id: I39639c3100eb20dd24d2a875bb0e9bc82d2b2d1f

commit 4ec765e01be506a8083980fc746a1737bbac4bf2
Author: Arun Kumar K.R <akumarkr@codeaurora.org>
Date:   Wed Oct 7 18:33:34 2015 -0700

display-fw: Disable rotation animation on secondary displays

- Set the animating flag on layer during animation which is used
  as hint to disable rotation animation on secondary displays.
- Set sys.disable_ext_animation to enable the feature
- Remove unused definitions in the extended hwc header

Change-Id: I7b72c7b605930ea189e047fec17ed18b17d46fdf
CRs-fixed: 922304

commit 6998bbdfd7af3126b64897b16b6961e84952601b
Author: Baldev Sahu <bsahu@codeaurora.org>
Date:   Thu Jul 30 16:01:15 2015 +0530

display-frameworks: Extend support for MDP3

- Add support for HWC_BLIT
- Allow GPU to compose widevine level 3

Change-Id:I11e03ccd0842d019e85d0c29bc5b7be559fccbaa

commit 2fa7aa1684c0162b8226c4327c86c6eaf6b76101
Author: Manoj Kumar <manoj@codeaurora.org>
Date:   Thu Aug 20 13:52:15 2015 -0700

display-frameworks: Override mOutputUsage with sink Usage flags

mOutputUsage flags contain default usage flags and doesnt reflect
sink usage flags. Override mOutputUsage with sink usage flags.

This change is needed to support WFD Secure usecase.

Change-Id: I14d8812049f635a8ebe6a944783e0ec7f8f80b1f

commit 09da768794c8c6acd786d73239ed5a739695b8cb
Author: Raj Kamal <rkamal@codeaurora.org>
Date:   Mon Jul 20 10:46:27 2015 +0530

display-frameworks: Extend the classes defined in SF

Add support for custom classes ExSurfaceFlinger,
ExLayer, ExHWComposer and ExVirtualDisplaySurface

Change-Id: Iab8c4835faaad9b436bbd34d38702741eb0cf12d

Change-Id: Ie400c94ccc77fc379ffa256af03a9e42ba5decaa
2016-01-08 21:01:02 -08:00
Tatenda Chipeperekwa
cda438d95e sf: Change log message in layer query method from ALOGE to ALOGW
This error can be seen for the following use case

1. Connect HDMI display
2. Dump the SurfaceFlinger state

The problem here is that HWComposer would have processed the display
connection event via the hotplug mechanism and considers that the
external display is connected. However, SurfaceFlinger has not
updated its internal state (mDisplays) since it will be waiting for
the mStateLock to be release by the dump function. As a result, when
the dump function invokes the getLayerSortedByZForHwcDisplay for the
external display, we will end up seeing the error log message because
SurfaceFlingers internal state has not yet been updated.

We can move this to ALOGW since it is a non-fatal/recoverable state.

CRs-Fixed: 914173
Change-Id: Ib0ba359ecd894dd463417ba57ba1f72c07b5833e
2016-01-08 21:01:02 -08:00
Abhisek Devkota
fd95bb1c24 Revert "gui: only support tertiary display if QTI_BSP is defined"
This reverts commit cbd3e07921.

Change-Id: I2a0f130dc64a9ebcbcaef36cfe973c759824cf8b
2016-01-07 21:29:13 -08:00
Matt Filetto
b17c928090 sensor: Skip additional permission request checks
* Some legacy Samsung HALs supporting BODY_SENSOR types are
  incompatible with the new permission checks added in M.
  Extend the NO_SENSOR_PERMISSION_CHECK flags to cover more
  of the actual checks.

Change-Id: Id2b9b57d8151b0998d9233e0a6541e8c88e06af7
2015-12-21 08:54:18 -08:00
Abhisek Devkota
cbd3e07921 gui: only support tertiary display if QTI_BSP is defined
Non-caf display HALs crap out with this

Change-Id: I9db8a74e262e674335cd993a5365e05d3715d1e8
2015-12-20 17:22:49 -08:00
Christopher N. Hesse
8befd14c4a sensor: Allow devices to skip the permission request
This is needed by Samsung devices with pre-M sensor
blobs which have support for SENSOR_TYPE_HEART_RATE
or body sensors in general.
These HALs somehow segfault on the flagged code.

Change-Id: I698f4129e71b683f6f063f00da79f32a5f521149
2015-12-18 15:21:53 -08:00
Mark Salyzyn
03d61d95fa dumpstate: increase logcat timeout to 40 seconds (DO NOT MERGE)
- temporary measure until root issues can be resolved.

Bug: 23685592
Change-Id: Ia33f4e3928a457c3dcd730ad2c2c57d13fbf133d
2015-12-18 10:18:58 -08:00
Christian Poetzsch
31ab17fb0c Fix the execution point of onFrameAvailable/onFrameReplaced callbacks
In a4650a5 the concept of a maximum frame number allowance for the consumer was
introduced. A call to acquireBuffers will only return buffers when their frame
number is less-than-or-equal-to this maximum frame number. When SurfaceFlinger
is the consumer, this maximum  frame number is calculated in the
onFrameAvailable/onFrameReplaced callbacks. These callbacks are called when a
new buffer is dequeued by the application. The problem is that these callbacks
are called _after_ the fence wait which is used to throttle the frame
production of client apps. When the previous frame needs a long time to draw,
those waits can potentially be a long time. As a result SurfaceFlinger won't do
any composition with the new frame until the wait is over.

Normally this isn't a big problem because there is a queue of buffers for
SurfaceFlinger to work with. However, this changes massively when a client app
is using a swap interval of zero. In this case, a new frame will instantly
replace the previous queued frame. However, SurfaceFlinger doesn't know this
until the onFrameReplaced callback gets called - which is delayed by the fence
wait. If the timing is bad, SurfaceFlinger never gets a chance to pick up a new
frame to do the composition with.

We see this behaviour on our TC development system (slow GPU) with legacy
on-screen benchmarks. Such apps are using a swap interval of zero and sometimes
frames don't get updated for several seconds. This behaviour can be also seen
on a Nexus5, although it isn't as obvious as on our TC.

The fix in this cl is to move the EGL throttling to the end of the queueBuffers
function. This ensures that if a frame gets replaced in the queue, all
consumers who installed the callbacks, get called in a timely fashion.

Change-Id: I36e9ecda162150f41e97d4fb7437963a3d86b371
Signed-off-by: Christian Poetzsch <christian.potzsch@imgtec.com>
2015-12-16 18:46:53 -08:00
radhakrishna
5934c292ab SF: Fix invalid reduction of transparent region from a layer.
Reduce transparent region from a layer only if the transparent
region has valid intersection with the layer. Otherwise, reducing
a transparent region lying completely outside of the layer leads to
invalid sourcecrop values for the layer.

Change-Id: Iee9ba53a8072c21c9ba8a6d58cb14ca30f8600ba
CRs-Fixed: 620973
2015-12-16 00:16:12 -05:00
Ramakant Singh
bea57f312d sf : Fix vertices & texture coordinates computation.
Compute crop and display frame for GPU composition also
in the same way it's done for HWC and compute vertices
and texture coordinates for GPU composition. This avoids
pixel shifts in output of GPU composition & overlays.

Change-Id: I0d31b1e4a81049fff72109d1a210e7cbd945cfe9
2015-12-16 00:16:04 -05:00
forkbomb
7cacf26abb libbinder: allow devices to disable ashmem size tracking
The addition of ashmem size tracking can lead to parcel objects
overwriting other values on the stack in old binary blobs.

Change-Id: Ife8514be1ba639c4061de38b59794c46bcc2d7f8
2015-12-10 10:15:49 +11:00
james.zhang
d40a35f61d bug#460672 framebuffer surface can't keep triple buffer if define NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
[root cause  ] framebuffer surface is in the same process of surface flinger
[changes     ] call IGraphicBufferProducer::allocateBuffers on producer inside the DisplayDevice constructor to force-allocate all three buffers.
[side effects] none
[self test   ]<tshark, enter and exit mainmenu>: ok
[reviewers   ] zhongjun.chen
[change_type ] AOB --> google_original
[tag_product ] common

Change-Id: Ideb75d3aa1ed23b2fa4d263a120ea3ca39d01361
2015-12-08 01:13:54 -08:00
Baldev Sahu
21145beae7 SurfaceFlinger: Add support for MDP3
This change is porting of below commits related to MDP3

In MDP3 we are using the widevine level3 for secure content
display. And this should applicable only for primary display
not for screen shot or screen recording
- CRs-Fixed: 595469
- Change-Id: I99be2d81287ab746d5c4a2375c3106c59e61a8fc

Change-Id: Ie7ac95e1c03eb7ad6f71098ecf09a1e25e69760f
2015-12-08 01:13:54 -08:00
Prashant Malani
e50ab08fd6 Merge "inputflinger: Initial support for rotary encoders." into cw-e-dev
am: 68fca5a176

* commit '68fca5a1763203164a19a9aa983895242a671387':
  inputflinger: Initial support for rotary encoders.
2015-12-08 01:30:53 +00:00
Prashant Malani
68fca5a176 Merge "inputflinger: Initial support for rotary encoders." into cw-e-dev 2015-12-08 01:27:17 +00:00
Steve Kondik
4951bcc16e Android 6.0.1 release 3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iEYEABECAAYFAlZmBAkACgkQ6K0/gZqxDnhgbQCdFLtubCHWtlKUuIEKAVwzv2M3
 2jMAoI4UhN3nLb2Nf6BizcMSF3xo1pKO
 =NS5T
 -----END PGP SIGNATURE-----

Merge tag 'android-6.0.1_r3' of https://android.googlesource.com/platform/frameworks/native into cm-13.0

Android 6.0.1 release 3

Change-Id: I437aaf148d440a8144afe1454948980fc3b40cca
2015-12-07 17:07:16 -08:00
Martijn Coenen
e902acb2ec Merge "DO NOT MERGE: add support for new sched tracepoint" into mnc-dr1.5-dev 2015-12-04 09:31:34 +00:00
forkbomb
53602ffde5 libbinder: allow devices to disable ashmem size tracking
The addition of ashmem size tracking can lead to parcel objects
overwriting other values on the stack in old binary blobs.

Change-Id: Ida52cec851a6f9d5a57c8f9130a5875c03dcb094
2015-12-04 15:42:51 +11:00
Ben Fennema
da3af0896f Revert "DO NOT MERGE ANYWHERE Add new interface for sensor physical data"
am: 8c3e55f414  -s ours

* commit '8c3e55f4149deda3ec7c7a67fda81216d5f9af25':
  Revert "DO NOT MERGE ANYWHERE Add new interface for sensor physical data"
2015-12-02 01:11:29 +00:00
Ben Fennema
8c3e55f414 Revert "DO NOT MERGE ANYWHERE Add new interface for sensor physical data"
This reverts commit d4db70a7b8.

Change-Id: Ifb52d5595970a5178e12c2a90da4aac0e38f5942
2015-12-02 01:04:40 +00:00
Jani Suonpera
37f1300ffc DO NOT MERGE ANYWHERE Add new interface for sensor physical data
am: d4db70a7b8  -s ours

* commit 'd4db70a7b8b2d136c46c50f89b276f8150be5fc2':
  DO NOT MERGE ANYWHERE Add new interface for sensor physical data
2015-12-02 00:25:47 +00:00
Jani Suonpera
d4db70a7b8 DO NOT MERGE ANYWHERE Add new interface for sensor physical data
This is special solution only for emerald branch.

Changes including new const char* value/interface for sensor physical data. Sensor service and manager does not take care of content, structure or other
details of string. Sensor HAL is taking care of parsing data from string and setting values to Sensor HW.

Change-Id: I3abc3ddc7c6adc4b32a40b9a43f2a94c5af7b2b0
Signed-off-by: Ben Fennema <fennema@google.com>
2015-11-30 21:27:27 -08:00
Sharvil Nanavati
7126caa17f Increase raft timeout to 10min so we get complete logs from older devices.
am: 804339a59e

* commit '804339a59e4abcbcf5a50a60ff0543e6b404e572':
  Increase raft timeout to 10min so we get complete logs from older devices.
2015-11-30 21:07:46 +00:00
Tim Murray
bd65161021 DO NOT MERGE: add support for new sched tracepoint
This tracepoint gives systrace the means to display the reason
for uninterruptible sleep.

bug 23350688

Change-Id: I9ee5b6904c27bcb5bd67c86fda66d45d0a3c0999
2015-11-30 10:59:55 -08:00
Sharvil Nanavati
804339a59e Increase raft timeout to 10min so we get complete logs from older devices.
Devices like dory get slammed when bugreports are taken and can't
compress all the raft logs in the current 5min timeout. Our dogfooders
spend their precious time getting us bugreports and then we can't act
on them because we have broken raft logs. :(

This change bumps up the timeout in the hopes that we can get complete
logs from even our slowest devices.

Change-Id: I10741a6185b39544f4c0531f0ee74864d74a1aa4
2015-11-27 21:04:11 -08:00
Caio Schnepper
8c39282e31 libgui: Don't assign handle to NULL after free is common
Reportedly Mali and PowerVR GPUs are crashing when setting handle to NULL
So we will set a flag for the devices that might need this aswell

Set BOARD_EGL_NEEDS_HANDLE_VALUE=true in BoardConfig.mk to use

Change-Id: I6c967f62dc6adced7583d7b2045d11cf5b25fc80
2015-11-25 17:51:30 -02:00
Caio Schnepper
eed845539a libgui: Don't assign handle to NULL after free
This reverts c784dfc39f for exynos4 devices
with Mali 400 GPUs, which causes a fatal signal (SIGSEGV) and death of
the graphics subsystem

Change-Id: I6dbf8f8664fca01baf63fece7c64016609fe3e1c
2015-11-23 18:39:58 -02:00
Tim Murray
392db573b3 Set cpuset from surfaceflinger.
SurfaceFlinger shouldn't be limited to little cores exclusively, as the
binder threads should be placed on big cores when they are in the
critical path for a RenderThread.

bug 25745866

Change-Id: I9fb65f6d951733f91b4735ff27018411b58b2bfb
2015-11-18 19:58:04 +00:00
Steve Kondik
05e03ad508 Merge branch 'LA.BF64.1.2.2_rb4.7' of git://codeaurora.org/platform/frameworks/native into cm-13.0
Change-Id: Ib29f744a0f7baac5d5ad8a7e9c5c14303b6aeec1
2015-11-16 14:36:34 -08:00
Ramakant Singh
2bb57a8bc3 sf : Apply user defined panel orientation to blur layer
Blur layer need to capture screen shot to create to blur
effect. Hence need to take care any user defined orientation
as well.

Change-Id: I1c0478810d12661edf2586293bbed342a5b4dc7e
2015-11-16 14:00:25 -08:00
Lajos Molnar
bc9bc0e0fc Merge "OMX: clarify EOS signaling for tunneled decoders" into mnc-dev am: f1de4547c1 am: 37b8c1f77c
am: 8abb053a2e

* commit '8abb053a2ea021c649e481813e45860add946e36':
  OMX: clarify EOS signaling for tunneled decoders
2015-11-13 00:16:41 +00:00
Lajos Molnar
8abb053a2e Merge "OMX: clarify EOS signaling for tunneled decoders" into mnc-dev am: f1de4547c1
am: 37b8c1f77c

* commit '37b8c1f77cab3ee9809bcbad81d765ec5bddedce':
  OMX: clarify EOS signaling for tunneled decoders
2015-11-13 00:11:57 +00:00
Lajos Molnar
37b8c1f77c Merge "OMX: clarify EOS signaling for tunneled decoders" into mnc-dev
am: f1de4547c1

* commit 'f1de4547c14467c03b00187efde5381dd1fb265c':
  OMX: clarify EOS signaling for tunneled decoders
2015-11-13 00:07:04 +00:00
Lajos Molnar
f1de4547c1 Merge "OMX: clarify EOS signaling for tunneled decoders" into mnc-dev 2015-11-13 00:00:19 +00:00
Steve Kondik
af9298115c Revert "surfaceflinger: Consolidate display orientation compensation hooks"
* This is completely breaking graphics.

This reverts commit f8e2372ad7.

Change-Id: I1d694f4228199891a191ce3fb924cec71a6100f0
2015-11-10 23:58:46 +01:00
Ricardo Cerqueira
f8e2372ad7 surfaceflinger: Consolidate display orientation compensation hooks
Dedupe rotation calculation code and make rotation a statically
available property in the DisplayDevice

Change-Id: Ic517ab0d2c05026cd6fa46d664aab7926be17b62
2015-11-10 10:56:31 -08:00
Hashcode
3904525bce surfaceflinger: odd hw rotation (90/270) patch for swapping width/height
This patch works in addition to the following commit
re-implementing ro.sf.hwrotation:
7d283431ef

When using values of 90 and 270 for ro.sf.hwrotation the
LCD width and height also need to be swapped to display properly.

Change-Id: I2874fdb8f8d8b855df6d62d338c9a22360491973
NOTE: This patch does not fix the initial startup of bootanimation
2015-11-10 10:55:55 -08:00
Byunghun Jeon
987034b563 SurfaceFlinger: Native changes to add blur effect
Native changes to add blur-behind and blur mask effect

Change-Id: I54faf82d750e8299de6d261f6a893ab26d08df84

SurfaceFlinger: Adding template for LayerBlur files

Change-Id: I444009113b7bdd6c5284863fd1f56358e67d9fe6

SurfaceFlinger: Featurize libuiblur module for OSS build

Change-Id: Ifdc176e699434125d17b111c044b8ba954cf717c
2015-11-08 01:07:13 -08:00
Ethan Chen
b53d92c3eb sensorservice: Don't replace HAL orientation sensor
* Previously HAL orientation sensor would always be replaced if the HAL
  did not provide a rotation vector sensor as well. Practically no HAL
  does, so the virtual sensor would always replace it.
* Add the virtual sensor only if the HAL does not provide it.

Change-Id: I50ad2cd6c60b53eddc4c6854997ec2e3dbff0d1a
2015-11-07 19:17:27 -08:00
Steve Kondik
911c7f3338 installd: Consider bundled app dir as a valid apk path
Change-Id: I92db56f21bf91e0816b63faffcfbb270ca2d8fca
2015-11-07 17:54:10 -08:00
Arne Coucheron
4cf9742078 sensorservice: Register orientation sensor if HAL doesn't provide it
* In KitKat and on most Samsung devices, the orientation sensor is
   not getting registered, and makes the compass non-working in a lot
   of apps. This patch enables the sensor for such devices.

Change-Id: I0ebba72ec4aa2cfa02c21a6daff0c356c6793fd0
(cherry picked from commit 98fa6f1152da759ef3eaf36cb16e0aaf2013376a)
2015-11-07 13:49:06 -08:00
Ricardo Cerqueira
c77679141d sensorservice: Fix init sequence for pre-1.1 API sensor HALs
The sensors API introduced a new flush() method that older binaries
won't have. For those, replace the firstFlush invocation with a
setDelay call since a lot of implementations interpreted that as
the initialization step.
We also don't want any kind of call to flush() to happen when it
isn't there, since it'll either hit a random OEM extension or
a memory address we really don't want to execute.

Change-Id: I26ce923fe385751fed7d1c483a53c074249f0620

sensorservice: Set the rate for pre-1.1 HALs _after_ activation

We want to be sure these are applied in the same sequence they
used to be...

Change-Id: Ied2ba08ed3c4bed3a80bac6ab5471fcea9ba2c09
2015-11-07 13:48:42 -08:00
Clyde Tan
5b6a10373e Fix boot animation rotation problem when ro.sf.hwrotation is set to 90 or 270
Change-Id: I7ad3c83e23ce38280818ec5283d173d50c889531
2015-11-07 13:45:41 -08:00
Ricardo Cerqueira
94d724071d surfaceflinger: Reimplement hwrotation
Change-Id: Ia26bb36b5b6de132af49c272c4472ad2703afbda
2015-11-07 13:45:19 -08:00
Naseer Ahmed
b9127bdbe3 surfaceflinger: Set max acquired buffer count
If triple framebuffers are enabled, the number of acquired
buffers isn't increased by default. Set the count to one less
than the max buffers to make sure all three buffers come into
play.

Change-Id: I8fae1b5564fbea598e415a86b0a21c3449c92d87
2015-11-07 01:21:36 -08:00