Commit Graph

81 Commits

Author SHA1 Message Date
Kinjal Bhavsar
5309935986 Overlay: Enable rotator for external displays
(cherry picked from commit 8e12c41fe12a2b1fd21ce89663f4103f82547bc4)

Change-Id: If01d97877bda8d2e81e0e7c13bb334227fa07325
2012-06-03 02:49:06 -05:00
Sushil Chauhan
347121bfd8 Reset to initial state when Overlay startChannel() fails.
When Overlay startChannel fails due to some reason and overlay
channel is not yet up, state needs to be reset to initial value.

Change-Id: Iabc765f350bf999d8362f86a43b900ff7aed1bb3
CRs-Fixed: 354403
2012-06-03 02:49:06 -05:00
Arun Kumar K.R
d8abd6c8dc liboverlay: free rotator memory in a new function
- move freeing roator memory to a new function
- In queueBuffer, updateDataChannel, if memory allocation
  fails for the rotator, free the previous allocated memory

CRs-fixed: 353156

(cherry picked from commit 97de5b6dc39a8706ba90f4e8b191b18418cb0191)

Change-Id: Icc774b67678426ea7ba43520b1186ea148ce1281
2012-06-03 02:49:06 -05:00
Kinjal Bhavsar
7c05f8ce9d display: Fix Overlay state transitions
Trigger overlay state change for S3D format changes.

Close both overlay channels only when transition to/from 3D display
happen.

The closeChannel resets the Overlay state variables. Any changes to
the state variables prior to closechannel are lost. Update state
variables after calling closeChannel.

Remove unused variables.

Change-Id: Ia5aa84d02df1e1874df93530cf3e55298ebc81e3
CRs-fixed: 342350 342987 347382 350326
(cherry picked from commit 6706fd708dace780751a4602d6125e089851789f)
2012-06-02 23:39:24 -05:00
Naseer Ahmed
0371a6cfa9 display: Use a new flag for content protection
The GRALLOC_USAGE_PROTECTED flag that was used
earlier for content protection is also used for
some other use cases such as disabling of
screen captures. Define this new flag that
is explicitly used for allocating secured
buffers for DRM.

Change-Id: Ia33f79fa0dea7f2f16dd320f267203e6173af48e
CRs-fixed: 348454
(cherry picked from commit 440a996f13be732895524412762793f109681c11)
2012-06-02 23:39:24 -05:00
Arun Kumar K.R
9089a0e4ca liboverlay: check for flip when rotating 90 or 270 deg
- In setTransform, when rotating to 90 or 270 deg, also consider
  the case of current flip values(if any)
- This is needed when switching b/w front camera/back camera/
  camcorder

Change-Id: Ieae8f90438dda24006ede4cf925acf46ecec5b32
(cherry picked from commit c5defdb54862490c502f255d7811cf73b8962b8d)
2012-06-02 23:39:24 -05:00
Saurabh Shah
10d91371c2 Fix secure flags value in overlay.
Remove the member "secure" from overlay_buf_info.
This member was used to indicate secure content and this info was
later extracted out into existing flags. Now we use the same flags,
right from hwc to mark secure content.

The member above had junk value, since it wasnt initialized.
This caused, normal videos to fail with IOMMU. Removal of the member and
marking the existing flags fixes this.

Change-Id: Ib5a2439fde7114c20e478fbee5e4d276680c316a
2012-06-02 23:39:24 -05:00
Saurabh Shah
050ef1b611 liboverlay: Call overlay set ioctl, only if input params change.
Change-Id: I753c30be4062be10655d7072c795052ef65f87ae

Conflicts:

	liboverlay/overlayLibUI.cpp
2012-06-02 23:39:24 -05:00
Arun Kumar K.R
0358ea0b84 qcom/display: Add support for video rotation on HDMI
- Enable rotator for HDMI for video
- cleanup updateOverlaySource API, it does not need
  orientation info

Change-Id: Id53a42cbc4265015ea2714d25df1b02af60ee5e4
CRs-fixed: 341691, 330719, 342199, 344308
2012-06-02 23:39:24 -05:00
Sushil Chauhan
8f3c0e6d8c liboverlay: Remove evening-out of layer destination coords.
Evening-out of layer destination coords causes a noticeable up & down
shift in the screen when video layer drawing switches between Overlay
and GPU. This is most easily observed during video playback or pause,
when a UI layer (like Menu) is displayed / hidden. Remove evening-out
of layer destination coords to fix the video layer "twitching" issue.

Change-Id: I3f43b53a7609c9ad8cc983c353fba6dc97460158
CRs-fixed: 348856 350073
2012-06-02 23:39:23 -05:00
Arun Kumar K.R
73b4678d06 liboverlay: set correct flags for external display channel
When external display is connected during video playback, the
flags to overlay was not set properly.
Pass the flags which comes from the hwc, by just changing the
WAIT_FOR_VSYNC(external should not wait for vsync)

(cherry picked from commit 857cfcba2d120d5da4916c7cb4fe119a08d1ce68)

Change-Id: I13100bebd223780eb9c709f384f0e4644e8295dc
2012-06-02 23:39:23 -05:00
Naseer Ahmed
3d3e9400aa overlay: Continue when one of the framebuffer fd's fail to open
Change-Id: I4b1f071ebcf04a189bab612dd0d3def1a660105c
2012-05-22 17:03:46 -05:00
Adrian Salido-Moreno
1d20d0c9d4 liboverlay: fix mdp and rotator color formats
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
2012-03-30 20:32:47 -05:00
Andrew Sutherland
081a89a5ad fixup after huge update
this brings us inline with cafs ics_chocolate branch
per: f696608c9d9e3b6b60a92423338f08d59d19d746

Change-Id: Ibaff05220e7d7f0ddd1b4d7507626a38d717340c
2012-03-16 23:53:44 -05:00
Arun Kumar K.R
eee6309c4f qcom/display: fixes for the external overlay channel
- 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
2012-03-16 23:15:43 -05:00
Naomi Luis
452832bb84 liboverlay: Setup the overlay and rotator if the geometry has changed.
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
2012-03-16 23:15:29 -05:00
Naseer Ahmed
694752d90d display: Add flag to avoid mapping memory in userspace
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
2012-03-16 23:15:06 -05:00
Arun Kumar K.R
4c082b642a qcom/display: clean up overlay channels during initialization
- 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
2012-03-16 23:14:47 -05:00
Arun Kumar K.R
297e73b6a9 qcom/display: Fix aspect ratio calculation for UI on HDMI
- Changed the aspect ratio of UI on HDMI based on the aspect
  ratio of the primary resolution.
- Remove the default values for action safe region.

Change-Id: I596611f8b01e6e1c1007ad7e6c323ea0ea710ec9
CRs-fixed: 323358
(cherry picked from commit b3c2e7f9d68db550f280ed60e37e7f4ee2a73058)

Conflicts:

	liboverlay/overlayLib.h
2012-03-16 23:14:12 -05:00
Naomi Luis
38e11bf7d4 liboverlay: Refactor setting overlay flags.
Modify the overlay APIs to use only one parameter to set the overlay
flags, instead of adding a parameter per required flag.

Change-Id: Ia753e10b9e2c7a5ee1aabfd48f30c9b7583beaa1
(cherry picked from commit 5535a95c8f69891090a81dbd8ccdc11aa889a42c)
2012-03-16 23:14:01 -05:00
Naomi Luis
d8588e1c12 overlay: Close correct channels during state change events.
When there is a state change, open/close only the required channels
instead of blindly closing all the channels. When HDMI is connected,
open the overlay for queueing the frames on the external, and when
hdmi is disconnected, only close the external overlay channel.

CRs-fixed: 333324
(cherry picked from commit a6b5ac4c385e03b3c798bb07d0d3ba6140aebbe8)

Change-Id: I7333a6fe106cd0aa99471542daf3c84c04c5d056
2012-03-16 23:13:48 -05:00
Arun Kumar K.R
37c2692006 qcom/display: Add support for WFD
- HDMI has priority over Wifi display, if HDMI is connected during
  Wifi, close the session for Wifi and start one for HDMI.
- the enableHDMIOutput parameter externaltype - HDMI/WIFI/OFF

Change-Id: If2cd9143fc7a953db49f38a6c166f9425ba5266e

Conflicts:

	libqcomui/qcom_ui.cpp
2012-03-16 23:13:28 -05:00
Prabhanjan Kandula
f7154c6f4c hardware/qcom/display: set the default sharpening settings
set the default sharpening settings for overlay pipes
i.e, sharpening is enabled and sharpening strength to zero.

CRs-fixed: 328472

(cherry picked from commit ba5235a66a4424746a6d785f83333b3543dc2dd1)

Change-Id: I6e18321e96f74df99ca6c4b63d06bc831f9e81ae
2012-03-16 22:50:41 -05:00
Carl Vanderlip
91deade06b setVisualParam Overlay API
Pass visual parameters such as sharpness, brightness, contrast,
hue, and saturation from framework to kernel. Converts floating
point to int8_t to represent visual param values.

Change-Id: I3dfc7c38d305fb05f080efb624f61c76adb5e023
2012-03-16 22:50:27 -05:00
Arun Kumar K.R
ca1d2bab60 qcom/display: add true mirroring support on HDMI
Change-Id: I7e884e5dde2a08048a28610eb88760fcdd24d558

CRs-fixed: 316397
2012-03-16 22:50:16 -05:00
Naseer Ahmed
71e0e80dbd display: Add support for protected heaps
(cherry picked from commit c932690c5a9d0aedfd2580e5c5e9f79e32f54261)

Change-Id: Ibddab4252ecefa1c410430b89f94aba4d3ae1c96
2012-03-16 20:34:50 -05:00
Chetan Kalyan
3679414a77 Overlay: Change rotator format for YV12
Change rotator output for YV12 input from CBCR_H2V2 to CRCB_H2V2.

Change-Id: I5d9711d5006dfbed5fc0b478af43e1fe673988bc
CRs-Fixed: 327956
2012-02-06 23:19:37 -06:00
Naseer Ahmed
ea94363fde Display: Use new ION heaps
Use new ION heaps in gralloc
and use them in rotator

Change-Id: I4ff903fd48a90e19655a64c5a0abaeec35aa34c8
2012-02-06 23:19:37 -06:00
andrew.boren
3ca3cb138b Apply patch for touchpad.
Change-Id: I29b7e653eaa8c861863fb6f304065b4f59d85d9b
2012-01-18 19:51:47 -07:00
Naomi Luis
2987491ac8 liboverlay: Add support for interlaced content in updateOverlaySource.
UpdateOverlay source didn't have any support for interlaced content.
Add the required support. Create a new function to check if the content
is interlaced.

Change-Id: Ie47b7669461f773b55c71cad6978fc1c8cf4e91b
2011-12-09 13:59:03 -08:00
Naomi Luis
e2de425bc4 Display: Set WAIT on primary and NO_WAIT on HDMI
When queuing buffers using the overlay:
- Set the NO_WAIT flag for the HDMI channel.
- Set the WAIT flag for the primary channel.
- Queue the buffer on the HDMI first.
- Queue the buffer on the primary.
- Wait for the HDMI Vsync.

Change-Id: Id24e9551230b7a7134bd21a7b3a9e8658f7de222
2011-11-28 16:10:51 -08:00
Naseer Ahmed
7f94fa6694 Display: Use new APIs for pmem in overlay
Change-Id: I021abfd4500c5cf24891e2b7e4335d65033b8b50
2011-11-22 11:36:49 -08:00
Jeykumar Sankaran
e61c2f0a86 liboverlay: change in overlay due to overlay HAL removal
-- remove overlay.cpp and overlayState.cpp
-- change setParameter to setTransform

Change-Id: I6ec591810cbfe53e51b0c88ef547a2e687ea69b3
2011-11-18 02:04:18 -08:00
Naseer Ahmed
b4684bce38 overlay: Enable ION for rotator
Change-Id: I08f1cd0f8d49812ba8723a137913e386365c946a
2011-11-16 12:46:35 -08:00
Chetan Kalyan
7ab3fc97e0 Overlay: Change MDP format for YV12 buffers
Android uses different alignments for YV12 buffers.
Hence, introduce a new format (MDP_Y_CR_CB_GH2V2) for
such buffers.

Change-Id: I50ba8baf2696252fce513e455d94bfde460b0e51
CRs-fixed: 302752
2011-11-14 14:39:10 -08:00
Naseer Ahmed
724b651320 overlay: Add FB flag for UI mirroring
When the source for rotator is the
framebuffer, the FB flag needs to be set
to identify the type of memory to be used.

Change-Id: I4fc6112832ad42eb7092be5243653b9baf8a241a
2011-11-11 13:57:26 -08:00
Kinjal Bhavsar
6eb041de80 msm7k: Detect display type and mark layers
Mark layers for convert to S3D when playing S3D content on a 3DTV.

Change-Id: I355a73753682134b8ec5544a03d55ae40793e897
2011-10-25 12:23:11 -07:00
Naomi Luis
8afdc162ea Upgrades to the updateOverlay functionality.
Update the overlay when we have a channel up. Previously, we did updates
only when the width and height changed. Now, we always update the overlay
when the channel is open, and not close the channel to update parameters
such as orientation change, flags etc.

Change-Id: I0b2ef8b19bd860d5361c391e040ff497f1023ae3
2011-10-18 13:22:31 -07:00
Naomi Luis
8da83f0059 liboverlay: Use even crop values
The overlay hardware requires the values to be even. Calculate the ROI
to ensure that the crop rectangle is correct after making the
parameters even.

CRs-fixed: 302916
Change-Id: I7316a65efe2b72c5392a3d2adbb95070662dced9
2011-09-25 17:44:35 -07:00
Kinjal Bhavsar
48f7bb38a7 liboverlay: Add support for 3D panel
Detect and use 3D panel for 3D content. Use the virtual framebuffer
for 3D panel. Set position for overlay channels accordingly. Use
3D ioctl for line interleaving.

Add state machine for Overlay.

Change-Id: I28dc7ed99aed7ca2c53c93722c44279d9c7de9fc

Conflicts:

	liboverlay/overlayLib.cpp
2011-09-19 19:16:37 -05:00
Chetan Kalyan
4fc65b100d Overlay: Add debug logs to overlay
In case of failure, print out the values of the failed
overlay structure, to allow easy debugging.

Change-Id: I3e480b8eecc66b54f357b29d02064a751c9ebbfa
2011-09-19 19:16:37 -05:00
Arun Kumar K.R
0f0ea07983 liboverlay: Check if the destination values have changed in setPosition
In setPosition, make an ioctl call only when there is a change
in the destination values.

CRs-fixed: 296400
Change-Id: I9b059e226bf6f6cfd04fb563ac765e2583415157
2011-09-19 19:16:37 -05:00
Naomi Luis
ea1c22ccde liboverlay: Reset rotation information during updates
When updating the overlay source information, reset the rotation
information as this would be set during the setParameter call.
Also ensure that the HDMI doesn't have any orientation set.

Change-Id: I7a8ae96f27046deeed32f968061cc524d57cbfa3
2011-09-19 19:16:36 -05:00
Chetan Kalyan
a9181ba303 OverlayLib: Set format to non-tiled if rotated
Rotator outputs non-tiled formats. Hence, if there is rotation,
tiled format needs to be set to non-tiled and aligned properly.

Change-Id: I88335ad49c2f7446aa5fa71db80f6051c02bb5ff
CRs-fixed: 290428
2011-09-19 19:16:36 -05:00
Naomi Luis
7e2db6e3d0 liboverlay: Add YV12 support
Add support in the overlay for the YV12 color format.

(cherry picked from commit 0f9a27cc39b6d4202b54059bc7c64eea9efcf3f1)

Change-Id: I4b57eb383ca8f728243bd7e397696932e26c8889
2011-09-19 19:16:36 -05:00
Naomi Luis
49dbd79cf7 Add overlay_buffer_info structure to hold the buffer geometry
The overlay_buffer_info buffer geometry and size. When calling the
overlay from the gralloc or hardware composer, populate this structure
with the information from the gralloc handle.

(cherry picked from commit 128adc3b8177ef72f2bf21f4022d7ef06ed9281b)

Change-Id: I2f60f691ac01e67f150c753f168be754b14f94e6
2011-09-19 19:16:36 -05:00
Naomi Luis
3a6d435d35 liboverlay: Set the correct FLIP information
Android expects the flip to be done before the rotation. The rotator
however performs the rotate operation first followed by flip operations.
Set the flip information to take this into account.

Change-Id: Ib59a08e72fad522b0cf70c2ac2c434e19683c356
CRs-fixed: 289118
2011-09-19 19:16:36 -05:00
Omprakash Dhyade
dac6f95b56 liboverlay: comp. bypass changes.
This change addresses following:
1. Add new classes for comp. bypass.
2. Remove comp. bypas specific code from exisiting flow.

Change-Id: Id9424b42a9a113cfbb18ceac8d59bbe07ea8e773
2011-09-19 19:16:36 -05:00
Saurabh Shah
3ce61a332f Set Position for HDMI in setPosition
This is necessary to adjust aspect ratio based on the crop, since
src values are modified in crop.

Change-Id: Icfb20df5b6ac4e93dfa85b73c4f74b738a4d3e59
CRs-fixed: 290069
2011-09-19 19:16:36 -05:00
Saurabh Shah
58c70bc3e5 Fix positioning of small videos.
Small videos (width < 128) have their stride as 128. For HDMI
destination position was set only once, before the actual width was
supplied through crop. Now the position is set during a setPosition
API call.

Change-Id: If49ac23b9294951aaf4ad9d5432653082b4a7802
CRs-fixed: 286953
2011-09-19 19:16:36 -05:00