Commit Graph

139 Commits

Author SHA1 Message Date
Arun Kumar K.R
8e7a62fc97 hwc: Add binder interface to get the visibleRegion
- This binder interface can be used by clients to know the
  active visible region for a display(pri/ext/virt)
- When external orientation is used, return the destFrame of
  the FrameBuffer layer, as its the viewFrame

Change-Id: I7cfd149c76c16b9a3031103c89b1932d44bcbecd
2013-12-19 18:45:18 -08:00
Linux Build Service Account
c25d39f9e9 Merge "hwc: Refactor disable animation on external" 2013-12-17 18:25:23 -08:00
Ramkumar Radhakrishnan
a70981abfa hwc: Refactor disable animation on external
Fall back to GPU for one cycle at the start of animation and display
the frame buffer for the subsequent cycle till animation ends.

Change-Id: I6c651cebaf4694f326d6e32ae485e014f391577c
2013-12-12 14:42:14 -08:00
Linux Build Service Account
dde6252243 Merge "hwc: Calculate viewframe from layers display frame information." 2013-12-12 08:48:41 -08:00
Prabhanjan Kandula
21918db5d1 hwc : Add hw limitation checks for MDP compposition.
Add hw limitation checks for MDP composition once
we identify actual layers for MDP. This should be generic
way for all basic hw limitations of underlying MDP/MDSS.
Current limitations:
- a-family : MDP can not handle alpha scaling.
- 8226 & 8974 : Can not handle if multiple layers need
  downscaling and blending

Change-Id: Ia944802d798f2d0e9cd4515d7e9854c7314cac78
CRs-fixed: 538803
2013-12-11 15:41:38 +05:30
Ramkumar Radhakrishnan
dd38b8210c hwc: Calculate viewframe from layers display frame information.
Calculate view frame of each display from the displayframe of all
the application layers.

Change-Id: I9ba4076b7b4419bd3559417fad28b4e1de6acff3
2013-12-10 22:16:15 -08:00
Saurabh Shah
da5b3ce3eb hwc: Reset layer-to-rotator map and fences on configuration failure
When a rotator or mdp configuration for a display fails, reset the
layer-to-rotator mappings for that display and reset the release
fences for the rotator objects used for that display.

Note: The rotator itself is offline and not tied to any mixer. It is
from the mappings that we deduce which rotator object was used for
layers of which display. Also we don't delete rotator objects held
for a specific display, since during stability runs, failures could
repeat each round and we end up allocating and deallocating memory
unnecessarily. The rotator objects will be deleted automatically
when not required anymore.

Change-Id: I9a67f02574be30be3b96b3575f60530cb1c89e10
2013-12-05 10:57:43 -08:00
Linux Build Service Account
c258d31430 Merge "HWC: Use 2 VG pipes for YUV layer with width > 2048" 2013-12-04 19:31:07 -08:00
Linux Build Service Account
3b689fb79c Merge "hwc/overlay: Add Color layer support in MDP Composition." 2013-12-02 02:43:48 -08:00
radhakrishna
c9a6741e15 HWC: Use 2 VG pipes for YUV layer with width > 2048
To minimize usage of decimation when 4K x 2K video is played
on primary, split the yuv layer into 2 halves and configure
each layer to individual VG pipes. With this approach,
decimation can be avoided in some 4K x 2K video use cases,
thereby improving performance.

Change-Id: I7cddfab787c50f6ff132eaa7f5a3d9cfd636c282
2013-11-27 18:35:24 +05:30
Sushil Chauhan
897a9c3ff9 hwc/overlay: Add Color layer support in MDP Composition.
1. Color layer has a destination rectangle, RGBA color and plane
   alpha. There is no gralloc buffer. Layer flag "HWC_COLOR_FILL"
   denotes a Color layer.
2. There is no color member in HWC layer, so RGBA color value
   is passed via the "tranform" member from framework to HAL.

Change-Id: I8769fd3f5febcaf952a1456de0a4262679c9a0e4
2013-11-20 17:04:29 -08:00
Saurabh Shah
d9ff30b3a5 hwc: Trim out of screen layers once only
Instead of trimming out of screen layer dimensions for various
operations repetitively, trim and store.
Will also prevent accidentally missing out on trimming.

Change-Id: I8800586070ec433aa1fcbb3aad73ec29c9c9111e
2013-11-20 09:27:49 -08:00
Linux Build Service Account
1260859d9d Merge "hwc: Add deduction operation to Rect utils" 2013-11-19 05:31:14 -08:00
Jeykumar Sankaran
9394353e9e hwc: Add deduction operation to Rect utils
Seperate out rectangle deduction from the layer cropping. Update
layer sourceCrop and displayFrame after deducting the rect value.
This makes the function generic enough to be used by other
modules.

Change-Id: I587ac951357af823a1bf5e06c15ff47ac6a9c2a0
2013-11-14 15:03:17 -08:00
Sushil Chauhan
943797c361 hwc/copybit: Add Color layer support in MDP Copybit composition.
1. Color layer has a destination rectangle, RGBA color and plane
   alpha. There is no gralloc buffer. Layer flag HWC_COLOR_FILL
   denotes color layer. MDP BLIT happens via MDP_SOLID_FILL mode.
2. There is no color member in HWC layer, so RGBA color value is
   passed via "tranform" member from framework to HAL.
3. Update HWC query to enable framework to query for Color layer
   support in HAL, at run-time.

Change-Id: I2c698007c1689779fe86d549093bb5285432dc5f
2013-11-13 10:13:19 -08:00
Naseer Ahmed
e850a8008c hwc: Punt layers with non integral source crop
The MDP driver cannot handle such layers right now. Investigate
doing this with pixel phase in the future.

Change-Id: Iabbdd0285234160770ae5a799b07a5b912e5fde3
(cherry picked from commit e6aff6414ba478312d9d4af21ab63d586594009f)
2013-11-08 15:23:22 -08:00
Saurabh Shah
62e1d731cd hwc: Bump up version to 1.3
Increment hwc version to 1.3.
Create and use a converter from float source crop to integers.

Change-Id: I5e185195c975b3a9434c5d9dce9ae4757ff98739
(cherry picked from commit 7e5637c850bcdbe21784ca3bfa9668870306adff)
2013-11-08 15:17:33 -08:00
Veera Sankaran
0dadfb3798 hwc: Listen fb0 event for panel status
Listen fb0 status change event for panel status. fb0 will receive
"PANEL_ALIVE=0" when panel is not responding to status call.
Call blank and unblank to reset the panel in next hwc_prepare
call.

Change-Id: I941a501a82d9f3b725660ad09631c1d8602b7325
2013-10-31 13:30:57 -07:00
Linux Build Service Account
a0eab66c6a Merge "hwc: Add support to smooth streaming feature." 2013-10-29 15:25:39 -07:00
Saurabh Shah
8028e3b853 hwc: Add load based partial mdp comp
Add support for load based partial mdp comp.
This is used on geometry changes where a redraw is unavoidable.
We select a batch of layers, that has minimum pixels for FB comp,
the rest go to MDP.

Conflicts:
	libhwcomposer/hwc_utils.cpp
	libhwcomposer/hwc_utils.h

Change-Id: Ifc5eeb4785c75c37de97a2bb89ca81409d324691
2013-10-24 14:34:56 -07:00
Ramkumar Radhakrishnan
92f3abe485 hwc: Add support to smooth streaming feature.
update the source video width and height set by the video decoder
for secure video smooth streaming usecase from metadata.

Change-Id: I73a3804d90557034604142481a232787dbc08f23
2013-10-23 11:59:48 -07:00
Linux Build Service Account
67b7322ea3 Merge "hwc/copybit: Handle "R/B swap" for RGBA and RGBX color formats." 2013-10-22 06:27:25 -07:00
Sushil Chauhan
1f6d68fce6 hwc/copybit: Handle "R/B swap" for RGBA and RGBX color formats.
1.Framework notifies HAL with "HWC_FORMAT_RB_SWAP" layer flag to handle
a limitation where R and B components were swapped in Rendering phase.
2.Add "R/B swap" in hwc query to enable framework to query for support
in display HAL, at run-time.

Change-Id: I3b44d15b51b4f24939048fee9d1bac2b9009c97c
2013-10-18 13:58:16 -07:00
Prabhanjan Kandula
9bd5f64b2b libhwcomposer: Enhance mixed mode composition.
While marking layers for cache, neglect the z-order when
possible, to improve the scope of mixed mode usage.
It is safe to neglect the z-order if a static layer
doesn't have any overlapping region with updating layers
in between static layer & contiguous static layers batch.
- if above layer doesn't have any overlapping with updating
  layer in middle, push it to the batch.
- If above case fails, but layers below(existing batch) does not
  have any overlapping region with the updating layer, bring the
  batch to top and modify fb-zorder accordingly.

Change-Id: I4882a750d0a9a2e11272fcbb146202160673d04f
2013-10-14 23:49:42 +05:30
Ramkumar Radhakrishnan
ba713389c2 hwc: Add support for Secure display
- Identify secure display layer in the hwc_list
- Need to set both SECURE_OVERLAY and SECURE_DISPLAY flags for the secure
  display layer
- Disable idle timeout for secure display usecase, as GPU should not be
  accessing secure display layer

Change-Id: I555910db77c466b5e103b24b4f0ec7f47bb210a5
2013-10-08 16:03:24 -07:00
Jeykumar Sankaran
6a9bb9ebd0 libhwcomposer: MDP partial frame update
This change adds support in HWC for MDP partial update applicable
only for command mode panels. Presence of MDP FB (GRAM) in
command mode panels allows MDP clients to update only the updating region
of the frame as rest of the frame will be cached in the GRAM.

HWC calculates the updating region of a frame (ROI) by deducing
outer bounds of its updating layer destinations. Layers not lying
within the calculated ROI will be dropped from the composition
since its illegal to program MDP pipes for non participating layers.

Change-Id: I890d98ff7960fe888787981803cac62f68471201
2013-10-04 23:34:51 -07:00
Jeykumar Sankaran
6a58579603 libhwcomposer: Make Rect utils generic.
Changes rect utility functions more generic.
Adds more sanity checks.

Change-Id: Ie935302592ac8eb5f7cfaffe03ac49da077a290d
2013-10-04 14:20:15 -07:00
Saurabh Shah
e9bc60f1b2 hwc: Include more cases in partial MDP composition.
When MDP cannot support a layer, we send the whole list of layers to
GPU. If such layers are not updating they can be cached on FB while
allowing the rest to take the MDP route.

Example # 1: Volume bar on video in 90 rotated mode. Since volume bar
is not h/w accelerated, there is no prerotation and we invoke the GPU
for redraws each round. With this change we won't because of caching.

Example # 2: If prerotation is applied to layers on primary, the
secondary layers would show a transform and the whole list is redrawn
with GPU. Now we could make use of caching.

This change also imposes a 1 layer limit on secondary, but now allows
full and partial MDP comp, thus benefiting secondary-only content.

Change-Id: I7eb43ba817f1081f317fefa99fa0c507344060e8
2013-10-01 17:27:37 -07:00
Prabhanjan Kandula
a5dc8e95fa libhwcomposer: Optimize layer crops when possible.
With in hwc list of layers if a layer above is opaque,
deduct the opaque layers crops from all the layers below
in z-order if deduction is possible with out creating
any hole.

Change-Id: I6391a13b0501cb972b134f72b58514cb807c7613
2013-09-27 01:17:37 +05:30
Linux Build Service Account
62fcf27d7e Merge "hwc: Add needsScalingWithSplit for high resolution display." 2013-09-13 20:31:41 -07:00
Naseer Ahmed
58780b987b hwc: Add vpu client
Stub implementation of VPU in HWC.
This commit passes through binder calls from HWC
to the VPU library. It also has stub prepare/draw calls
in the VPU client object which can be used to configure
VPU in the composition cycle.

Change-Id: I2606f2884e870448d29ef26e02faac92e157e2c6
2013-09-12 09:15:44 -07:00
Sushil Chauhan
15a2ea6e2e hwc: Add needsScalingWithSplit for high resolution display.
- needsScaling does not check for scaling required in left & right
  mixers when the crop values are sanitized. So it leads to issue
  if DMA pipes are picked-up as high resolution layer does not need
  scaling but left or right mixer configuration needs scaling after
  the split.
- needsScalingWithSplit takes care of this with checking for the
  sanitized cropped values.

Change-Id: I1f5b1952a59a84f5ccbaef123251b3c8cd46e4dd
2013-09-10 11:49:53 -07:00
Saurabh Shah
88e4d277ad hwc: Add API to find if a display is split
A display could be split if its dimensions exceed 2048 or in case
of primary if we make it so via device tree property.

Add an API to find if a display is split. Use this API instead of
going through a set of conditions in various use cases.
Rename the HighRes, LowRes objects to a more appropriate Split and
NonSplit respectively

Change-Id: Id847c2bf36ea9250e1cdbc0259fdec64bd124537
2013-09-05 09:40:14 -07:00
Ramkumar Radhakrishnan
66f856c188 hwc: Cleanup patch for SideSync and WFD/HDMI downscale feature
Move block of code corresponds to SideSync and WFD/HDMI downscale
    feature to a seperate function.

Change-Id: Ib07cec61abf3a7226bc4dd2ebb9f313519114fd4
2013-08-29 10:55:08 -07:00
Linux Build Service Account
5383b360a4 Merge "display: Add BufferMirrorMode support for External" 2013-08-29 04:40:10 -07:00
Linux Build Service Account
c82dcafc53 Merge "hwc: Perform MDP downscaling for WFD/HDMI Scenario" 2013-08-29 04:40:10 -07:00
Linux Build Service Account
6b44bf5002 Merge "libhwcomposer: align rotator source buffers for tile format." 2013-08-29 01:45:39 -07:00
Prabhanjan Kandula
a1d8301faa libhwcomposer: align rotator source buffers for tile format.
for tile format make the rotator source buffers aligned to 64 X 32.
This avoids rotator hang during source fetch.

Change-Id: I9e42788cc6f538b155c073028ce41bf48e1d9349
CRs-fixed: 473297
2013-08-27 11:32:32 +05:30
Amara Venkata Mastan Manoj Kumar
9d373c0b7e hwc: Add check for block mode for rotated video
Do not allow video if it requires pre-rotation and DMA pipe
  is configured in LINE mode. Fall back to GPU in this usecase.
  This is not applicable for wfd on 8x26 since Driver supports
  both multiplexing of DMA pipe in LINE and BLOCK mode as same
  mixer control block is used for rotation and writeback mode.

Change-Id: I5b99b214619134b1bd67f3c441b14f76051e3d3b
2013-08-26 13:54:15 -07:00
Linux Build Service Account
61f5bc100e Merge "Revert "hwc: Perform MDP downscaling for WFD/HDMI Scenario"" 2013-08-23 17:33:06 -07:00
Linux Build Service Account
1d784e592f Merge "Revert "display: Add BufferMirrorMode support for External"" 2013-08-23 17:33:05 -07:00
Linux Build Service Account
dd07a6ffce Merge "hwc: Fix locking." 2013-08-23 17:32:54 -07:00
Arun Kumar K.R
fb5bfa6ff1 display: Add BufferMirrorMode support for External
- In Buffer mirror mode, the output on the external should be rotated
  based on the primary orientation.
- this is used for the side sync feature.
- buffermirrormode has higher precedence over external orientation
- Add binder interface to enable/disable buffermirror mode

Change-Id: Ibea0af9627d69b4d42453adc868b113d82613437
2013-08-22 15:38:25 -07:00
Amara Venkata Mastan Manoj Kumar
376d8a8c01 hwc: Perform MDP downscaling for WFD/HDMI Scenario
On WFD/HDMI connection, if the configured resolution is less than
  Primary Resolution, Display HAL does the following:

  1. sends hpd notification to SF with primary resolution.
  2. configures MDP pipes with configured Resolution.

  This is done to improve UI quality as MDP has better downscale
  filter options compared to GPU.

Change-Id: I33570c13016a35ed6c5d22d4c34dfe75b2c605a1
2013-08-22 15:34:29 -07:00
Ramkumar Radhakrishnan
31f4c4e7b9 Revert "hwc: Perform MDP downscaling for WFD/HDMI Scenario"
This reverts commit 1291675ee4.
2013-08-22 13:32:18 -07:00
Ramkumar Radhakrishnan
dc4aeb53da Revert "display: Add BufferMirrorMode support for External"
This reverts commit 027d96511c.
2013-08-22 13:31:33 -07:00
Saurabh Shah
b39f8151ab hwc: Fix locking.
Remove the unnecessary blank lock, mdp comp lock, secure lock.
Rename the ext lock to a more appropriate draw lock.

The mdp comp lock is at an incorrect place and causes unwanted
objects to show up in dumpsys, since configDone hasnt cleaned
them up yet.

dump(), blank(), draw() should all acquire a common lock.
draw() includes prepare() and set().

Change-Id: I595547dd5a393a8af6cd8c9297d50793b715e658
2013-08-22 13:15:57 -07:00
Linux Build Service Account
16af3fd8a0 Merge "hwc: Add support for plane alpha" 2013-08-21 16:28:52 -07:00
Linux Build Service Account
e81a2b11b4 Merge "display: Add BufferMirrorMode support for External" 2013-08-21 12:25:21 -07:00
Linux Build Service Account
4a5c2493d1 Merge "hwc: Perform MDP downscaling for WFD/HDMI Scenario" 2013-08-21 12:25:20 -07:00