Commit Graph

280 Commits

Author SHA1 Message Date
Sushil Chauhan
defd352e10 hwc: Full MDP Composition mode with overlap region removal
MDP bandwidth limitations can be avoided, if the overlapping region
covered by the smallest layer at a higher z-order, can be composed
on a render buffer using Copybit, and then it can be queued to MDP
along with other layers. It helps to improve performace by avoiding
GPU Composition in use cases like Home Screen pan. To enable this
feature, set system prop "persist.hwc.ptor.enable" to "true" or '1'
and enable Copybit HAL compilation.

Change-Id: Ib719d3dd42477837519518cc427f1b95356c28f7
2014-05-30 13:59:16 -07:00
Ramakant Singh
467759fb28 hwc : Add support for ABC in MDP3
In display list if one layer has same parameters
as framebuffer on index '0'. Use this layer
as FB and blit other layer(s) on top of it.

Change-Id: If38712781f24a2e27686d2b370643f51a9b05358
2014-05-26 13:59:22 +05:30
Ramakant Singh
0def28c653 hwc : Add support for single layer Bypass in MDP3
If the display list contains single layer and that layer
has same properties as Frame Buffer, avoid BLIT on Frame buffer
and pass it directly to display.

Change-Id: I24decaca4788432a55b550caa2a1354a670cd6fa
2014-05-26 13:56:36 +05:30
Jeykumar Sankaran
71e597c7e8 hwc: Map dirtyRect to layer destination before using.
DirtyRect for a layer is generated w.r.t to its buffer
coordinates. It needs to be mapped for layer destination
(display) coordinates before using it to calculate the frame's
ROI.

Change-Id: Id86f495b2016da2cfd5aed4d86bff6d3035abf10
2014-05-15 09:28:08 -07:00
Jeykumar Sankaran
6c7eeac178 hwc: Extend partial frame update for split displays
Extends partial frame update support for split displays by calculating
changing region(ROI) independently for each half of the screen. In case of
only one half updating, display driver shuts down the DSI/MDP mixer control
of the non updating half.

Maintains two ROI's for each display. In case of Non-split
displays, only left ROI is updated.

Change-Id: I8a67fe40aac665a48b6f8a46beffb9f8027851b2
2014-05-14 17:45:24 -07:00
Saurabh Shah
25c04d3869 hwc: Fix tearing with RGB layer rotation
Pass the acquire fence count to driver on a buffer sync ioctl call
for the rotator. The count is always 1 since the ioctl is called
once per rotator session. This also means that the rotator has to
wait for only 1 layer always.

The earlier assumption that in the presence of a session id, the
acquire count would be NOP, does not seem to hold with the driver.

Change-Id: I986a436194c66e8ce2a2afb363627f72dc6e20cd
2014-05-06 11:19:25 -07:00
Linux Build Service Account
fc7340b821 Merge "HWC: Update DisplayFrame of all layers properly in Dynamic FB" 2014-04-30 22:03:41 -07:00
Linux Build Service Account
64e1ce83b7 Merge "hwc: Add target specific checks in hwcomposer" 2014-04-28 22:26:59 -07:00
Dileep Kumar Reddi
e351d84ca0 HWC: Update DisplayFrame of all layers properly in Dynamic FB
Use change in HWC_GEOMETRY_CHANGED flag appropriately to avoid
redundant and unintentional overwrites of DisplayFrame values,
which may result fall back to GPU.

Change-Id: Ifb0f8dc5d356c965b6e80644f32392c460fb1ae7
2014-04-25 17:48:51 +05:30
Raj Kamal
068f4575f6 hwc: Add target specific checks in hwcomposer
* Mdss driver supports DMA-Multiplexing on wb interface
for certain targets. Add overlay get function to query
this info during pipe allocation for wb.

* UI Scaling on external is not supported on certain
targets due to the lack of availability of pipes with
scalars. Add overlay get function to query this info
to disable action-safe calcs, DRC and others which
require downscaling.

Change-Id: I1726caa4634f72d781561e797078648524ea2eef
2014-04-25 14:18:32 +05:30
Jeykumar Sankaran
7c85238f0c hwc: Use layer dirty rect to calculate frame's updating ROI
Use layer dirty rect instead of display frame to calculate frame's ROI.

Change-Id: If5fe93da7815efdf9b44ed683a4d80b397921cf1
2014-04-24 10:43:02 -07:00
Linux Build Service Account
597c23c216 Merge "HWC/Copybit :: Add swap rect feature in HAL for MDP3" 2014-04-22 06:37:15 -07:00
Linux Build Service Account
202d15e854 Merge "hwc: Set DMA state at the start of composition" 2014-04-21 18:32:33 -07:00
Raj Kamal
794c36f370 hwc: Set DMA state at the start of composition
* Set DMA state at the start of the composition cycle
based on the following.

Set it to LINE_MODE if the number of active rotator
sessions are 0.

Set it to BLOCK_MODE if
** A yuv-layer for any display-device requires rotation
** (or) mExtOrientation is set
** (or) mBufferMirrorMode is set

* Separate out the reset helper function into more
modular ones

Change-Id: I6a22ac4379565cd1fd2d875a7a417f4ed3ee0f1e
2014-04-21 13:37:55 +05:30
Ramakant Singh
21cec725af HWC/Copybit :: Add swap rect feature in HAL for MDP3
We brings all swap rect level checks in HAL from surfaceflinger
for MDP3.
swap rect kicks in case of
1 Only one layer is updating.
2 No overlaypping layers.
3.Both src and dst has same value.(no scaling)
4.No video layer

Change-Id: I881958994e80b53d4969beaaf51518b727a8de78
2014-04-19 19:04:41 +05:30
Linux Build Service Account
38ef977bad Merge "Display and wfd synchronization during teardown" 2014-04-17 03:52:54 -07:00
Raj kamal
59fea567e1 Display and wfd synchronization during teardown
* Provide a binder interface call for wfd module
to inform display about the start/stop/pause/resume
of wfd session.

* This is needed for wfd-hdmi synchronization in
case of v4l2 wfd solution. If hdmi is plugged
in during v4l2 wfd session, display-hal waits in
uevent thread for wfd teardown notification from
wfd module, before going ahead with configuring
external display.

* For VDS WFD solution, display-hal waits in uevent
thread for wfd-teardown to be signalled from
the composition thread.

Change-Id: I9514cb5bc7ff81de0b5dd4cdf66d8286a64ba094
2014-04-15 14:15:59 +05:30
Linux Build Service Account
8118d4b5b9 Merge "hwc: Display view frame needs to be set before using it." 2014-04-10 19:52:32 -07:00
Sushil Chauhan
f68d0dfdbf hwc: Display view frame needs to be set before using it.
The display view frame needs to be set before calling trimLayer api
because it uses view frame to find the scissor for display, which is
used to clip crop for out-of-bounds display frame sent by framework.
If mViewFrame is not set, scissor will be empty rect, which leads to
wrong source crop calculation.

Change-Id: I52ad4eb9037d34aff24c30fe65e3793684445264
2014-04-09 10:17:18 -07:00
Saurabh Shah
74eff4debf hwc: featurize using QCOM_BSP
- Use QCOM_BSP for HWC_BLIT and GPUHint features
- These are not avaliable on all platforms

Change-Id: Ied0c60246093c868ac708f2f8897f08cec1e8878
2014-04-09 10:08:09 -07:00
Saurabh Shah
39240c9124 hwc: Add rotator obj to layer-rot-map if acquired
Add rotator obj to the layer-rot-map soon after its successfully
acquired. This makes sure that any object allocated is accounted
for, irrespective of whether rotator configuration succeeds or not.

Change-Id: I94102d9c607cf61b2eccdf7f2445bb07d309d35c
2014-03-31 10:31:42 -07:00
Linux Build Service Account
d36d04a2dc Merge "hwc: Use proper typecasts" 2014-03-28 23:49:57 -07:00
Linux Build Service Account
a6582e76af Merge "h/q/d: Invoke padding when DMA is not availble for ext rotator" 2014-03-28 14:09:15 -07:00
Praveena Pachipulusu
d9443c7e81 hwc: Use proper typecasts
- Remove compiler warnings
- Use proper typecasts

Change-Id: I7391f32ae31283239f5cebb93b02f3ce3a5c99f3
2014-03-28 09:17:43 +05:30
Linux Build Service Account
0bee628a02 Merge "hwc: Color layer always has zero transform." 2014-03-27 18:11:08 -07:00
Ramkumar Radhakrishnan
f69f13580b hwc: Fix for HDMI video playback out of boundary in portrait.
Fix for out of boundary video playback issue on HDMI where HDMI
resolution is lower than primary resolution.

Change-Id: I4271471cda87e1e3d3805ace8b8723a91979a160
2014-03-25 15:00:19 -07:00
Jeykumar Sankaran
d1fe20757d h/q/d: Invoke padding when DMA is not availble for ext rotator
This change invokes padding round when DMA is used in line mode
and rotator is needed for external display.

Change-Id: I1fef1a988d96695748d79d23b7927844eea237fe
CRs-Fixed: 632069
2014-03-21 15:14:05 -07:00
Ramkumar Radhakrishnan
fb822910e1 hwc: Set GPU performance hint.
1. Set the GPU hint flag to high for MIXED/GPU composition only for
   first frame after MDP to GPU/MIXED mode transition.
2. Set the GPU hint to default if the current composition type is GPU
   due to idle fallback or MDP composition.

Change-Id: I208a778017435a5a4620142da9d9fb3c50e09155
2014-03-20 21:16:09 -07:00
Sushil Chauhan
fda00fc87f hwc: Color layer always has zero transform.
Color layer always has zero transform because framework uses the
transform member of hwc layer to pass the color value to HAL.

Change-Id: I79fe204c558d1b6e1dd69ba635ba0bd87140b1b1
2014-03-20 11:20:52 -07:00
Naseer Ahmed
330a2820c2 display: Remove VPU related code
Targets in which VPU interacts with display through HWC are no
longer supported.

Change-Id: I65a5348a375ad0c193a8659d0cdfb37c2db6f38e
2014-03-15 13:54:07 -07:00
Linux Build Service Account
f11a6a8ed3 Merge "HWC: Use proper typecast to avoid scaling issues" 2014-03-11 19:29:23 -07:00
Linux Build Service Account
2f11754664 Merge "hwc: Move aspect ratio helper function to qdutils" 2014-03-11 15:35:05 -07:00
Linux Build Service Account
d8de629030 Merge "hwc: Disable Actionsafe for 8974 target and non-HDMI display." 2014-03-08 07:11:14 -08:00
Linux Build Service Account
de8c2e476e Merge "hwc: Enable downscale feature through system property" 2014-03-08 07:10:40 -08:00
Dileep Kumar Reddi
39e79bf632 HWC: Use proper typecast to avoid scaling issues
Multiplying double with integer may scale up/down original value.

Change-Id: I2aa002a434d287df69d34de7e4fea3d56bcfbfaa
2014-03-07 15:03:07 +05:30
Tatenda Chipeperekwa
a7dd23cc7e hwc: Move aspect ratio helper function to qdutils
Move aspect ratio helper function to qdutils so it can be used
as a utility function in libvirtual and libexternal without
introducing a circular dependency.

Change-Id: Ib295c1d9f78bc8898b1aac9a443cdacf53150551
2014-03-05 19:16:25 -08:00
Linux Build Service Account
29ff05dd05 Merge "hwc: Fix external display position calculation" 2014-03-05 03:45:58 -08:00
Ramkumar Radhakrishnan
a61a0da1f8 hwc: Disable Actionsafe for 8974 target and non-HDMI display.
1. Disable Action safe for 8974 due to HW limitation while downscaling
   layers with overlapped region
2. Disable Actionsafe for non HDMI displays.

Change-Id: If974cf2bb2259ee6051645698ba641791b1425ce
2014-03-04 15:35:28 -08:00
Tatenda Chipeperekwa
5d14c718ee hwc: Enable downscale feature through system property
Add support to turn the MDP downscale feature ON through the
use of a system property. 'sys.hwc.mdp_downscale_enabled' shall be
set to 'true' in build.prop file to enable this functionality.

This is required for OEMs that might have privacy concerns over panel
size information being exposed.

Change-Id: I354b25b1fdabe5786aed7552f2afccda35412467
2014-02-27 14:52:50 -08:00
Ramkumar Radhakrishnan
8ab3f5d4b0 hwc: Fix external display position calculation
YUV layer display positions are mapped to primary resolution
[e.g. 1920x1080] when MDP downscale is enabled, that needs to be
transformed to the original external resoltion [e.g. 1280x720].
This transformation is not taken care for 4kx2k YUV use case.

Change-Id: Ifa60773bf9fcd18676a3f05cd72a603beb165733
2014-02-21 16:29:06 -08:00
Linux Build Service Account
736a9d93e7 Merge "hwc: Derive view frame for external display." 2014-02-19 19:55:55 -08:00
Linux Build Service Account
9620560b02 Merge "display: Remove klockwork warnings and errors." 2014-02-19 19:55:51 -08:00
Ramkumar Radhakrishnan
36bd527bc8 display: Remove klockwork warnings and errors.
Remove all klockwork warnings and errors for libgralloc,
libhwcomposer, liboverlay, libqdutils, libqservice, libvirtual,
libexternal libraries to avoid buffer overflow and memory leaks.

Change-Id: I078143bcbcf5e4b342156bd8305a644566f7cc4b
2014-02-18 12:39:21 -08:00
Ramkumar Radhakrishnan
773e188683 hwc: Derive view frame for external display.
Derive viewframe rectangle for external display from primary
resolution and primary device orientation.

Change-Id: I1885b660cd6343e41e4b574e358fd063cd47a54d
2014-02-13 19:13:03 -08:00
Linux Build Service Account
8e6c7bc4b9 Merge "Invoke a padding round in certain use-cases." 2014-02-11 23:48:44 -08:00
Linux Build Service Account
4525f0e53c Merge "hwc: hwc_sync - populate correct fences for BLIT" 2014-02-09 19:08:31 -08:00
Raj Kamal
9ed3d6b35e Invoke a padding round in certain use-cases.
* In some use-cases, it is possible that there are
no AppBuffer layers on the external/virtual layer-list
during which all the pipes will be allocated to the
primary. When layers do comeup on external/virtual
layer-list, subsequent overlay sets fail.

* This change ensures that in such cases, we invoke a
padding round on all the displays to free up the
hw resources which can be used in subsequent cycles.

Change-Id: Ifac0b8f51a8719eb55b11010d05b8d11352db054
2014-02-07 16:20:10 +05:30
Balamurugan Thanikachalam
f558c863d4 hwc: hwc_sync - populate correct fences for BLIT
Previously, the acquire and release fences for BLIT
composition were populated using same logic as Overlay,
but BLIT composition consists of separate BLIT step
before screen refresh, and app buffers are no longer
required after BLIT. So holding the buffers for both
the steps is unnecessary and impacts performance.

This change adds condition for BLIT in fence population
logic in hwc_sync and populates the right fences for the
App Buffers and Display Refresh during BLIT composition.

Change-Id: I9998a7052c0375acb32a174bdf0469d2a88f79e8
2014-02-05 14:18:59 +05:30
Arun Kumar K.R
2aa44c66fa hwc: resolve compiler warnings
- remove unused variables.
- fix incorrect castings.

Change-Id: I7661edb4539a3ffc7d4aedbb9f633bc5ba1dc149
2014-02-03 09:20:36 -08:00
Zohaib Alam
1bb656178e hwc: vpuclient: vpuClient implementation
Vpuclient is the client side for VFM in hwc. It follows the
similar pattern of prepare and draw. It has 2 step prepare
including: setVpuSession and prepare. The setVpuSession function
passes all the layers from the SF list to VFM, which marks
the layers that it can support. After this, the layer
allocation/configuration is done, and finally in prepare the
allocated pipes are passed down to VFM. The draw function
passes the handle to the VFM to draw the video layer.

Change-Id: I5d8795de35ed98716f7fa4cd48506b488cb3cb5d
2014-01-31 14:59:19 -05:00