Commit Graph

212 Commits

Author SHA1 Message Date
Manoj Kumar AVM
fb472b0553 hqd: Do not process WFD teardown as part of HDMI connection
WFD teardown was required when HDMI is connected on V4L2
architecture. This is because WFD connection is using HDMI
piggyback connection. Since SurfaceFlinger can honour only
one active external display, we have to teardown WFD
connection to process HDMI connection.

This is no longer applicable on VDS architecture. WFD connection
is established using Virtual Display adapter.
WFD Stack listen to HDMI broadcast event and initiate wfd teardown.

Change-Id: Iaca249f4f45193f02d32ac0ab56d68ce85e8c9a3
2014-08-27 13:45:14 -07:00
Ramkumar Radhakrishnan
3d863777c5 hwc: Remove external only feature related code
External only feature is completely handled in surfaceflinger, remove
unwanted code churn related to external only feature from display HAL.

Change-Id: If4f4f3fa8e91a5b8387e426b9e190abd2b06d793
2014-08-13 15:13:50 -07:00
Saurabh Shah
c46cf9d26b overlay: Add support for rotator downscale
Add support for rotator downscale. This is enabled from 8994 onwards
Constraints:
--Downscale should be a power of 2, max upto 32
--Both directions should have equal downscale
--{src_w, src_h} mod downscale = 0
--No BWC
--No Interlaced video support

The rotator's destination rect is modified to reflect the presence of
downscale. Any downscale calcs should be done only after adjusting
crop to meet rotator's requirements.

Smaller downscale is used if we need to chop off any more than 1
line or pixel.

Change-Id: Id07d62fefa3213035f16cca49497800716484a95
2014-08-08 10:19:18 -07:00
Linux Build Service Account
995d0a8ac9 Merge "display: remove compiler warnings" 2014-06-20 18:39:25 -07:00
Shalaj Jain
a70b435d10 display: remove compiler warnings
Use correct typecasts and format specifiers and resolve
compiler warnings

Change-Id: I51b12ecb78a9a496cf1f76c3d32892a203f70c43
2014-06-19 15:44:51 -07:00
Ramkumar Radhakrishnan
9d20b39e4a hwc: Rotate RGB layer using MDP Rotator
1. Use MDP rotator to rotate RGB layers which are rendered by software
2. Restrict total number of rotator sessions to 4 for all displays
3. Disable RGB layer rotation for all MDP versions < MDP5

Change-Id: Ie93111082dff9a16b614e9768df5d8ce83ff9e25
2014-06-16 12:10:40 -07:00
Raj Kamal
4393eaa6d3 hwc: Avoid MDP draw if prepare is not successful.
If #AppLayers are 0 or exceed MAX_NUM_APP_LAYERS
return early from MDP draw.

Change-Id: I834c7b04a295fbd9b98374cade880992d995ad1f
2014-06-06 14:42:45 +05:30
Linux Build Service Account
8a81e76fa2 Merge "hwc: Full MDP Composition mode with overlap region removal" 2014-06-02 16:52:47 -07:00
Linux Build Service Account
a3041b1762 Merge "hwc: Allow WB to be active during VDS pause state." 2014-06-02 00:55:05 -07:00
Linux Build Service Account
3da907e6fa Merge "hwc: Add display ROI in HWC dumpsys" 2014-06-01 18:10:19 -07:00
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
Raj Kamal
e012e0e3cd hwc: Allow WB to be active during VDS pause state.
* Revert commit 7a495b3caa
"hwc: Call blank IOCTL on virtual as well if it is connected."

* On issuing suspend when WFD is connected, display-hal
receives both pause and blank calls. Calling StopTerminate
ioctls on WB(WB is not active on VDS pause) once blank
is issued on Primay(i.e when iommu is detached) doesn't free
up the buffer nodes resulting in orphaned memory blocks.

* To avoid this, allow WB to be active even during
VDS pause state so that when StopTerminate calls are made as
part of VDS teardown, display will be in unblanked state and
iommu would have been reattached, thus freeing up the buffer
nodes.

* Doing this doesn't clear all references to WB fb node during
VDS pause. Call display commit to unset the pipes rather than
relying on the refcount

Change-Id: I6f89c2ca56ea8a0133e66f3928f6e35ca94d9b52
2014-05-29 04:56:18 -07:00
Jeykumar Sankaran
6850ac64c5 hwc: Add display ROI in HWC dumpsys
Add ROI generated for each display in their dumpsys data.

Change-Id: I41fb79af9d42abc11ff147d18a600fd4ad60ab6c
2014-05-27 10:50:37 -07:00
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
Linux Build Service Account
b0f6b4cc49 Merge "hwc: Fix compiler warning" 2014-05-25 05:44:47 -07:00
Linux Build Service Account
386f201efd Merge "hwc: Call blank IOCTL on virtual as well if it is connected." 2014-05-21 00:13:19 -07:00
Jeykumar Sankaran
54a8018c6f hwc: Fix compiler warning
Fix compiler warning messages due to narrowed conversions.

Change-Id: Ifa770683fa9af7d5280c9117520276e04100302c
2014-05-20 10:05:46 -07:00
radhakrishna
7a495b3caa hwc: Call blank IOCTL on virtual as well if it is connected.
- If virtual display is connected, call blank IOCTL on it as well
- Clear writeback object on blank, as pause/resume functionality
implemented in VDS takes care of sending black frame on suspend.

Change-Id: Ibce682beaf6e58200fc963202aa5b1905fcf1257
CRs-Fixed: 661438
2014-05-19 16:35:00 +05:30
Linux Build Service Account
3cc3fa5dff Merge "hwc: Extend partial frame update for split displays" 2014-05-19 01:02:05 -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
Prabhanjan Kandula
958ffa9693 overlay : Rely on 8x16 pipe strategy for 8x39.
Since both has same number of pipes with similar
features like scaling capabilities, for now rely on 8x16.

Change-Id: Ief51bb5c70d8aef7dca3d791f8b4d62a4c5392ff
2014-05-13 18:08:38 +05:30
Ramkumar Radhakrishnan
2b9b245107 hwc: Use layerIndex while populating hw layers
Use layerIndex instead of dpy while populating layers from the layer
list of each display.

Change-Id: I6bb4401482afc859447b58fcb6c5daa11a23fcd8
2014-05-01 12:05:28 -07:00
Linux Build Service Account
e4eae8c893 Merge "Revert "hwc: Do not re-program H/W, if the frame geometry has not changed"" 2014-05-01 00:16:04 -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
Jeykumar Sankaran
1e15611ed4 Revert "hwc: Do not re-program H/W, if the frame geometry has not changed"
This reverts commit 5e268fcf56.

Reason: Breaking cache based composition strategy and partial
update feature.

Change-Id: I0c881c8e2bc6be2a0b3dc0d5e7d22a388179f8d8
2014-04-30 12:18:23 -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
Linux Build Service Account
d9b409dc23 Merge "hwc: Clear overlay and layer-rot map from caller" 2014-04-24 16:08:50 -07:00
Saurabh Shah
ef19fe3224 hwc: Clear overlay and layer-rot map from caller
Clear overlay and layer-rot map from the top level caller of
composition, rather than from the place of actual intermediate
failure. This makes sure, even in cases of GPU comp failure,
overlay and layer-rot maps are cleared and eventually pipes unset.

Change-Id: Ibf1152a0e8ca66d87bcc6b87009c4b09e451099d
2014-04-22 15:31:58 -07:00
Sushil Chauhan
5e268fcf56 hwc: Do not re-program H/W, if the frame geometry has not changed
There is no need to re-program the H/W, if the frame geometry of all
active displays, has not changed. It will help to improve performance
by avoiding re-configuration of HAL and driver, if it is not needed.

Change-Id: Ie01dce33be89afc7308a8103128d27b4b9fb5c4b
2014-04-22 11:29:31 -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
Praveena Pachipulusu
d9443c7e81 hwc: Use proper typecasts
- Remove compiler warnings
- Use proper typecasts

Change-Id: I7391f32ae31283239f5cebb93b02f3ce3a5c99f3
2014-03-28 09:17:43 +05:30
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
Linux Build Service Account
4232357fa8 Merge "display: Remove VPU related code" 2014-03-19 18:59:51 -07:00
radhakrishna
2e792f9884 h/q/d: Add utility function for 8x16 and read RGB scalar capability
- Add utility function for 8x16
 - Add internal function to identify if RGB doesn't
   support scaling that is read from capabilities node.
 - If UI layer needs scaling and RGB pipe doesn't
   support scalar, request a VG pipe
 - On 8x16, request DMA pipe for WFD

Change-Id: I94e8e0371bb10fcad53fddd2b7c45bc9b2594a4d
2014-03-17 12:56:16 +05:30
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
d323f729eb Merge "hwc : Skip panel reset sequence if panel is already off" 2014-03-03 04:28:13 -08:00
Neti Ravi Kumar
8f470d8435 hwc : Skip panel reset sequence if panel is already off
Do not proceed with panel recovery sequence if panel is already off.
Proceeding with reset sequence, if panel is already off, results in
race conditions.

One e.g., there is race condition between early suspend triggered
by pressing power key and panel recovery triggeredby ESD uevent.
If pressing power key happens exactly at kernel DSI driver is
reporting ESD uevent, it's likely that panel will be unexpectedly
on by ESD uevent after having blanked the screen by early suspend.

This change avoids unintentional panel recovery in the case above.

Change-Id: I19022691ec3c178f62f392913435ddc032ee1ab2
CRs-Fixed: 613155
2014-02-26 11:44:43 +05:30
Linux Build Service Account
819d3b8f05 Merge "Revert "hwc: Add support to query max. supported WriteBack width"" 2014-02-22 04:29:28 -08:00
Linux Build Service Account
9620560b02 Merge "display: Remove klockwork warnings and errors." 2014-02-19 19:55:51 -08:00
Tatenda Chipeperekwa
b5cb26f907 Revert "hwc: Add support to query max. supported WriteBack width"
This reverts commit 744cc693f9.

Change-Id: I7a37059323d0a071765dce8d865cdfa0198a64de
2014-02-19 17:33:11 -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
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
f7ddf674fc Merge "hwc: Add support to query max. supported WriteBack width" 2014-02-11 05:19:09 -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
Linux Build Service Account
325d49b658 Merge "hwc: vds: Add support for black frame generation on PWR suspend" 2014-02-06 06:20:37 -08:00
Linux Build Service Account
67b60bee6d Merge "hwc/overlay: validate and prepare frame" 2014-02-05 14:02:39 -08:00
Tatenda Chipeperekwa
744cc693f9 hwc: Add support to query max. supported WriteBack width
Adds a query to provide maximum supported WriteBack width.

Change-Id: I2f3f2ca1f7783394bd05e860e846dab504dbe071
2014-02-03 15:16:15 -08:00
Saurabh Shah
a36be92d30 hwc/overlay: validate and prepare frame
Send the entire frame (array of overlays) to driver, so that it would
check pipes params and the whole frame wrt bandwidth and SMP.

Now, the overlay's commit API just prepares an overlay object but
makes no ioctl calls.

If the driver finds the frame, as a whole, to be not ok, the
validation fails and overlay/hwc return silently.

If a certain overlay object is mis-configured or pipes are
unavailable, the driver sets the number of objects it processed.
Overlay uses this to dump the incorrect config.

Change-Id: Ifb2b7fadc6bd6d9d94a35ba3908fbd832f41447f
2014-02-03 12:58:46 -08:00