fixes the black screen when external display is connected
during bypass and when video is paused.
(cherry picked from commit 2ffc188a6cad26a347e565211564640173f340ac)
Change-Id: I6caeda8bbc744a45164e2ae139345ba4aab55dab
CRs-fixed: 346284
In video playback through overlay, it is observed that, during
suspend/resume, genlock TIMEOUT errors are seen at the component
level.
drawLayerUsingOverlay() function locks buffers, but doesn't unlock
them, before going to suspend, making the genlock_lock_buffer calls
from video component to fail.
Unlock any overlay buffers before going to suspend.
CRs-fixed: 342878
(cherry picked from commit 4ffcd156710184fe492294fd55beea7d5f412116)
Change-Id: Id0165f370d05d9b4bdf71ddaea15cf00caa65896
Copybit module has a limited stretch to up/down scale.
Hence we need to do a intermediate stretch before going
to final stretch.
CRs-fixed: 341196
Change-Id: Ic547fdb8e88072f9f89032f047d04a7a26bddf71
(cherry picked from commit 256bde19b8f912388e19390570e5ea36f0208cfe)
register_proc in HWC is used by SurfaceFlinger to register
callback functions with HWC. This can be used by HWC to invoke
SurfaceFlinger functions. Currently invalidate is the only function
registerd and can be used by HWC to trigger a screen re-draw.
CRs-Fixed: 342060
(cherry picked from commit 03a5cf4b9c52da2bfbd9706e85fddae63110ee9b)
Change-Id: I464370ebf63b93e0ce238395b5c165647d777575
libhwcomposer: Donot mark the 3D layer below HWC_SKIP_LAYER
for GPU composition. In these cases, let the layer be
composed through composition type decided in hwc_prepare.
This helps us in avoiding the cases where 3D videos
cannot be composed through GPU.
CRs-Fixed: 346973
(cherry picked from commit 0331f07ed4b5a3cf5a2e358c8417ac9e8103bc07)
Change-Id: I9f6c53cc2da35109fe789074a9d1accc11372dd8
* Some hardware cannot handle cropping during bypass, or reports
invalid rects during orientation change. If the invalid rect is
cropped, MDP gets into a weird broken state where layers turn
transparent, display blinks, etc.
* Also use the VG pipe for 2 layers instead of just 1 in this case, it
eliminates flicker when unlocking the device.
Change-Id: Ia5cb1a368bcc8949ba224a8510f577450449f22e
Fix heap corruption in overlay clients, caused by missing
compilation flags. All libraries using overlayLib.h should
have flags used for conditional member declaration in overlay.
CRs-fixed: 342959
(cherry picked from commit 42120b29500560ebedbd897e2e7adf7369eb0a21)
Change-Id: Idf613861c4dc67e96ecadf7ce7e37472cb4e4daf
Set flag to ensure HWComposer::invalidate() does not draw with
bypass still enabled. Also, log comp bypass transition due to
idle-timeout.
Change-Id: I3343d092a92c9677d0b9d50ced094c96d229474a
(cherry picked from commit f27aebd66249d165c0a3342abf4064a5dc350a6d)
Background: On MDP compositon, MDP keeps reading contents from the
pipes even on Idle Screen i.e. even when HWC is not queueing any new
buffers to MDP. Above data traffic leads to high power consumption.
Implementation: This change introduces a timer in HWC which will
timeout if there are no updates in bypass composition path for
the period specified via debug.bypass.idletime. Also SurfaceFlinger
will be notified to redraw the current frame which will be composed
into FB.
Conflicts:
libhwcomposer/hwcomposer.cpp
Change-Id: Ic3a467596068fa553271b5cd8c2831e544e3211d
(cherry picked from commit ad1d9a019234ab03dbc79b1ddb73c86e560e3e74)
Conflicts:
libhwcomposer/hwcomposer.cpp
- Add external_display_type to differentiate WFD and HDMI
- based on the display type, handle wifi display and HDMI
concurrency
Change-Id: I2bf928dcd232f2ea39c4fa8dca812a26112076b2
(cherry picked from commit 8e7490026832d8df6758f4aa615039f91ac0f5ff)
(cherry picked from commit 7c6b7979bf2d7ab12ff528be75b5e008405acbda)
-Introduce utils folder in qcomUI lib for all Qcom
implemented utility classes.
-Move FPS calculation profiler class into utils
folder.
CRs-Fixed: 342060
(cherry picked from commit e9469022741642cfd8483839de96e809f4d94f1e)
Change-Id: Ie0af0c0cc10b5304814b4f26aed581ea93ce7f5f
Layer buffer handles that fail gralloc validation must be removed
from hwcomposer's register of previous bypass and overlay handles.
(cherry picked from commit 18c7f1951018b6632bd6e1a4957194c01423b6ee)
Change-Id: Idaaf3557b05adb5b3e938e9cd46dac5b104b729e
CRs-Fixed: 347157
-- During animation, if yuv layer is marked skip close overlay channels.
But if HDMI is connected, let them remain open, and send data.
-- During popups on paused video, if the layer above it is skip,
let the video layer be displayed via overlay.
-- Fix MDP pipe closing mechanism for yuv content.
-- Synchronize notification to gralloc with actual video channel status.
CRs-Fixed: 342892
Change-Id: I98f442c12e59e4fcf93af87a251e3d489e624c0b
(cherry picked from commit 752ee11eb0318dbb2bfdc5200c320cd2db972eb9)
- debug.gr.swapinterval is now deprecated. It has been replaced by
debug.egl.swapinterval.
- Do not disable MDP bypass if we have ASYNCHRONOUS layers present
and debug.egl.swapinterval=0.
- Do not lock overlay buffers if debug.egl.swapinterval=0
Conflicts:
liboverlay/overlayLibUI.cpp
Change-Id: I004a437397570ad62b589bb68db2b9815917f551
The flag GRALLOC_USAGE_PRIVATE_UNCACHED can be set in the
usage to allow it to be uncached. If not set, the buffer
will be cached by default.
CRs-fixed: 341196
(cherry picked from commit 6232816aadd311dbb57b714c7c0a4073d3ddc7f7)
Change-Id: Ic10677d105328702972dd69581b919c984d17fe9
- clearing PRIV_FLAGS_NOT_MAPPED if
GRALLOC_USAGE_PRIVATE_DO_NOT_MAP flag is not set
so mmap can be skipped.
Crs-fixed:342782
Change-Id: I01de82dedf08c8c41db179789cc3a9927aa7e221
(cherry picked from commit 67215121cdff9df78d6a80cda442a6bfc7aa27b3)
Incorrect source stride setting for software YUV buffer copy causes
the software converter used by apps like Video Telephony app to
crash. Correct the source stride setting passed to YUV buffer memcpy.
CRs-Fixed: 346928
(cherry picked from commit db92bedc081365e447233bbdd6e070e88a5cbc19)
Change-Id: I5edf7ff4d38e8b55eece9e856adeeab972e80fa0
Premultiplied alpha is now supported on MDP3.x.
Enable it from userspace.
Also make flags as int since values are exceeding 255(uint8_t).
CRs-fixed: 347803
(cherry picked from commit 3dcbcb1f8672067f85e2f53e6321c27df6d6fbe6)
Change-Id: I865379b368726e95cab7aa669fbf27d5207240c5
Log a frame-by-frame succession of HWComposer layers' data and write
their buffers, if any, into raw or png files based on system property
values.
CRs-fixed: 339748
Change-Id: I171a9891a0867548b34d45c0561f25f66cf0580c
(cherry picked from commit 8166b062df4765af0b0d9f95d55fa14dd4b75b8d)
Use copybit composition only for those frames where we
have maximum 2 full screen sized layers for composition.
Change-Id: Id34975f85dce11ba9365714655c994c6f3b0cabd
(cherry picked from commit 2f2c75f3c8d6700dcf981f980e817c813ed3e389)
Since SF wont compose when device is on suspend mode, MDP_UNSET can
be called to close all allocated bypass pipes.
Change-Id: Ia4610c34e6d89028f8b3400af023296c459dd8d1
(cherry picked from commit 32a9e25b699d7abde661f3ad947ed58a09a1b132)
Unused bypass pipes need to be closed after unlocking their
buffer handles.This change makes sure the pipes are closed even
if client releases the buffers(invalid buffer handle) before
this function gets called.
CRs-Fixed: 344765
(cherry picked from commit d8761a761f7d2eddcec12841f4d9afd4261ee79e)
Change-Id: I449d0dce4ec458e19446fcc26316a3794a15f909
MDP color formats have been changed to match the actual input format.
Also rotator will now provide the dst format instead of maintaining
local mapping.
CRs-fixed: 339114,337040
(cherry picked from commit f8c2fe0c78d27f9292e5bb9948db11c72446dc55)
Change-Id: Ic76a4fd96c5aa4c82d6dbdef650752934d761ac0
this brings us inline with cafs ics_chocolate branch
per: f696608c9d9e3b6b60a92423338f08d59d19d746
Change-Id: Ibaff05220e7d7f0ddd1b4d7507626a38d717340c
The current composition bypass implementation prevents the app frame rate from
being decoupled with vsync. As a result when a graphics application requests
EGL swap interval zero it is still limited by vsync. This change disables
composition bypass if any layers being composited for the frame are in
asynchronous mode.
CRs-Fixed: 335498
(cherry picked from commit 8e1a74ffff6a07ac9ef649347b7ac23be143f2ea)
Change-Id: Ia0b6b14fbc953b04616667a494d98fcca99932f9
- a NULL list parameter or a numHwLayers of zero indicates that the
entire composition will be handled by SurfaceFlinger with OpenGL ES.
- a NULL list parameter or a numHwLayers of zero indicates that the
entire composition has been handled by SurfaceFlinger with OpenGL ES.
In this case, (*set)() behaves just like eglSwapBuffers().
- dpy, sur, and list are set to NULL to indicate that the screen is
turning off. This happens WITHOUT prepare() being called first.
(cherry picked from commit 5047cf7b17c8546f33c432d67b3510a540a74391)
CRs-fixed: 336520
Conflicts:
libhwcomposer/hwcomposer.cpp
Change-Id: I1eaa4b2360aea164ce389a9803bc1630b8fdf01c
Add support for external-only display. Layer buffers
marked with GRALLOC_USAGE_EXTERNAL_ONLY will be
displayed on external panel only, if available.
In addition if the layer buffer also has the flag
GRALLOC_USAGE_EXTERNAL_BLOCK then only that layer
will be displayed on external (During suspend).
When this mode is on, the default mirror mode for
external is stopped.
Conflicts:
libhwcomposer/hwcomposer.cpp
Change-Id: I8ea2920384c5b68311ee3fe00707d01ab6568b52
If we have a single layer for composition which goes via the overlay,
we can disable disable the framebuffer fetch thereby saving power.
CRs-Fixed: 338777
(cherry picked from commit c40d887d714d14182e867e5eb7942160b3feb197)
Change-Id: I361f5d8a60fb478a675b47163b7524c79e66624a
This change fixes destination rect calculation for negative coordinates
Change-Id: I0174ae3b9643f74d60d559e84bc36bd9ec1d0caa
(cherry picked from commit 3620e365fe9ffcc8d3ec21691707d46e11bdb9ae)
This change allows 3 or less layer use cases to get bypassed completely via MDP pipes.
If more than 3 layers, all of them gets composited on FB.
Intended FB fallback cases:
1) 4 or more layers
2) Any MDP pipe is in use
3) Any layer needs rotation
4) Any layer is allocated from non-pmem
Change-Id: Ieb2b30b8ab9893fd68c7fc61ec889ac9a01cb7dd
(cherry picked from commit 001ffcfef1d63948926b1be67c4977d13ae1b159)
Conflicts:
libhwcomposer/hwcomposer.cpp
The post processing library header has been included in the target output
now; thus, liboverlay should use the new location in the 'out' directory.
Change-Id: I53fad5503456fbb821c7eb8fb0092f6a762f4c3a
(cherry picked from commit b338d9e7a9c182a654de1a86418f5b1f27e7f308)
- During video playback, when the external display is connected,
start the overlay channel on the right framebuffer.
- set the correct position for the new external display channel
- fix minor bug in the function getAspectRatioPosition for external
display
CRs-fixed: 336674
(cherry picked from commit 6afc95ee1197718332461c8f0ddf9cf5f94cc7aa)
Change-Id: Ifa30dfea349c2a0f133790ab2dc91527d53152f8
Setup both the overlay and rotator for every geometry change event.
The mNoRot flag decides if the rotator needs to be setup for that
particular channel. SetTranform takes care of enabling/disabling the
rotator and correcting the params when the rotation changes.
CRs-fixed: 336037 336346
(cherry picked from commit 84c7068f405189542658529cc43a3d54b49b11ca)
Change-Id: I4c4c747bf365c50c48037c657c653d4903ec7e76
For secure content the MM heap should never be
mapped in userspace. Add a flag to avoid
doing this for rotator which does not need
userspace mapping.
(cherry picked from commit 8d9f2fa336564d5a021dd932f5619b5f389d5fad)
Change-Id: I17d1faa40859e261518d928089f2ce86084d31fd
CRs-fixed: 332402
- Add an interface to class Overlay to clean up the overlay
channels. This interface will query the framebuffer device, and
will free(UNSET) them if they are in use
- hwcomposer hal will call this API during initialization
(cherry picked from commit 0d03b1b823bbf36f7adb16bb4344fc46d8748c6a)
Conflicts:
libhwcomposer/hwcomposer.cpp
Change-Id: I4a4bedfdc409913ef31c1d5f5a869db730528096
Check if the rotator memory was allocated before attempting to free it.
CRs-fixed: 334607
(cherry picked from commit 4feb43e3a964878b2c708e7417df8d116e1d17ef)
Change-Id: Iac5d957ce7286848443e3d05f1c8d9c32b258b72