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
* 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
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
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>
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
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
The addition of ashmem size tracking can lead to parcel objects
overwriting other values on the stack in old binary blobs.
Change-Id: Ife8514be1ba639c4061de38b59794c46bcc2d7f8
[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
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
The addition of ashmem size tracking can lead to parcel objects
overwriting other values on the stack in old binary blobs.
Change-Id: Ida52cec851a6f9d5a57c8f9130a5875c03dcb094
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>
This tracepoint gives systrace the means to display the reason
for uninterruptible sleep.
bug 23350688
Change-Id: I9ee5b6904c27bcb5bd67c86fda66d45d0a3c0999
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
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
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
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
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
Dedupe rotation calculation code and make rotation a statically
available property in the DisplayDevice
Change-Id: Ic517ab0d2c05026cd6fa46d664aab7926be17b62
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
* 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
* 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)
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
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
Adding ambient temperature & relative humidity hardware sensor
features as they are missing and causing CTS failures.
Change-Id: I4f07db8e77cb77c5b2c1bb7ed80a26f68c91c23e