Commit Graph

222 Commits

Author SHA1 Message Date
Linux Build Service Account
99c968ec87 Merge "hwc: Common Display HAL to support VDS & V4L2 WFD solutions" 2014-01-26 22:59:21 -08:00
Arun Kumar K.R
518351814c hwc: Get the retire fence from the MDP driver
Get the retire fence separately instead of duplicating the
release fence.

Bug: 9319776
Change-Id: Iacb773c2d94f635e27a7b355d399cb2e36dac2a5
2014-01-24 16:37:10 -08:00
Ramkumar Radhakrishnan
8bb48d3314 hwc: Common Display HAL to support VDS & V4L2 WFD solutions
1. Define classes for VDS and V4L2 based WFD solutions.
2. Overload the functionalities for VDS and V4L2 WFD solutions.
3. Instantiate VDS object or V4L2 object during hwc init based on the
   property persist.hwc.enable_vds set by the user.
4. VDS solution is not verified as it requires some dependent changes.

Change-Id: I74bf944d532da138c850d4ec0c20b4a881489efa
2014-01-21 18:41:04 -08:00
Linux Build Service Account
b39e078630 Merge "h/q/d: Optimize layer rects on sourceCropf" 2014-01-17 16:41:47 -08:00
Linux Build Service Account
b6b9bde81e Merge "hwc: Add support for Macro Tile feature" 2014-01-16 13:27:11 -08:00
Jeykumar Sankaran
071468b819 h/q/d: Optimize layer rects on sourceCropf
This change optimizes layer dest rects  and updates its
corresponding source crop value on sourceCropf.

Change-Id: Ie921908aa23ae029d2cd3add61795f71a6e5294e
2014-01-14 17:27:35 -08:00
Manoj Kumar AVM
8a22081e49 hwc: Add support for Macro Tile feature
Macro tile is enabled only if all the conditions are met:
  1. GPU hardware should support Macro Tiling.
  2. MDSS hardware should support Macro Tiling.
  3. USAGE flags shouldnt contain GRALLOC_USAGE_SW_READ_OFTEN and
     GRALLOC_USAGE_SW_WRITE_OFTEN.
  4. RGB 16bit and 32bit formats.
  5. persist.hwc.macro_tile_enable flag should be enabled.

PRIV_FLAGS_TILE_RENDERED flag is added to indicate whether the layer
is rendered/composited in Macro Tiling or Linear format.

Change-Id: Ie3139839c84d76c5d1a2300f33910a09eb7336f4
2014-01-14 13:32:31 -08:00
Linux Build Service Account
a7ff923aa4 Merge "hwc: Disable MDPComp for external UI layers if scaling is present." 2014-01-09 06:23:22 -08:00
Arun Kumar K.R
9fc8997eb1 hwc: Instantiate the copybit object when needed
- Initialize copybit object only when its used for composition, as it
  was causing on unnecessary dup of the releaseFence in hwc_sync
- Its used only in case of MDP copybit
- Remove unused copybit object for external display

Change-Id: I876b7b8c5754e469613761789193bda321134c9f
2014-01-07 18:42:33 -08:00
Ramkumar Radhakrishnan
4af1ef0935 hwc: Disable MDPComp for external UI layers if scaling is present.
Fallback to GPU composition for the external UI layers if Actionsafe
or WFD/HDMI downscale mode is enabled that requires scaling.

Change-Id: Ie03da35e1c2e78434de00f92ad6c2e5073fc33b8
2014-01-06 12:20:03 -08:00
Linux Build Service Account
e5e29c86a1 Merge "hwc/overlay: Set MDP_SOLID_FILL flag for Color layer." 2013-12-23 21:20:45 -08:00
Linux Build Service Account
412fbbe323 Merge "hwc: Remove need for intermediate for mdp3 composition" 2013-12-20 09:44:20 -08:00
Sushil Chauhan
f10c523a41 hwc/overlay: Set MDP_SOLID_FILL flag for Color layer.
Set MDP_SOLID_FILL flag while configuring MDP pipe for Color layer.

Change-Id: Ia48e6e3e759ae026510544cad8a6c1a6256d82e7
2013-12-19 10:35:54 -08:00
Linux Build Service Account
21b6ff0923 Merge "hwc: Compute external display position for UI layers." 2013-12-17 18:25:23 -08:00
Linux Build Service Account
c25d39f9e9 Merge "hwc: Refactor disable animation on external" 2013-12-17 18:25:23 -08:00
Terence Hampson
c67b03798c hwc: Remove need for intermediate for mdp3 composition
8x10 has a product line that is suppose to use 256MB. The
intermediate buffers allocated are not needed when we can
compose onto fb frame.

Change-Id: I13fd2deb328a3ef4b6738cfe7030fe67ea7bd6c6
2013-12-17 14:55:47 -05:00
Saurabh Shah
7a606847a6 hwc: Update rotator object handling in error cases
Earlier, on configuration errors, we simply drained the fences held
by current rotator objects and went to GPU comp. The rotator objects
were deleted in the subsequent rounds, if they remained unused.

If we don't use GPU comp on failure but use other strategies, then we
need to mark the rotator objects for a display for reuse, so that
other strategies can use them.

Also any failure resets on overlay or rotator need to happen from
functions that call configuration helpers rather than the helper
themselves. Leaving cleanup to black-box helpers is not desirable.

Change-Id: I59b5b1bb774b82ee85a037e934c9d2d023db30af
2013-12-13 11:49:55 -08:00
Ramkumar Radhakrishnan
d855948502 hwc: Restrict scissor rect to view frame rect
Restrict scissor rect within view frame boundary to avoid displaying
the layer content out of view frame boundary.

Change-Id: Iea19a4c4880a0c495d2f215e6cfd0eb41b65b785
2013-12-12 15:08:05 -08:00
Ramkumar Radhakrishnan
debfc5addd hwc: Use viewframe to compute display position and crop.
1. Use viewframe of external display to compute Aspect ratio position
   for external.
2. Use viewframe to find the crop rectangle of the frame buffer to
   configure rotator for external orientation usecase.

Change-Id: I564c70f202176c8b1f707cbafc08cbbb2abde383
2013-12-12 15:07:47 -08:00
Ramkumar Radhakrishnan
939a9e7242 hwc: Compute external display position for UI layers.
Do external display position calculation for UI layers.

Change-Id: I55c36f3d44ae59b506d6d2ebff791d22f2529b6e
2013-12-12 15:07:14 -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
Linux Build Service Account
3bfb8caac1 Merge "HWC: Fix for use int reference in function call" 2013-12-12 00:09:18 -08:00
Linux Build Service Account
23c77c865e Merge "hwc : Add hw limitation checks for MDP compposition." 2013-12-11 20:40:13 -08:00
Linux Build Service Account
b42f70f3d0 Merge "hwc: Crop source rect for the optimized destination" 2013-12-11 05:06:45 -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
Arpita Banerjee
b28b309ae7 HWC: Fix for use int reference in function call
To use the integer reference, declared integer
variable to get value directly in that variable.

Change-Id: I1fd1a45580be99dd95ccbc3495e28455a4c7de23
2013-12-09 16:55:45 -08:00
Linux Build Service Account
f81272988c Merge "hwc: Reset layer-to-rotator map and fences on configuration failure" 2013-12-08 13:29:58 -08:00
Saurabh Shah
220a30c282 hwc: Do not use fb handle in hwc_prepare
Do not use fb handle in prepare. Use displayFrame for dimensions,
align them and hardcode format

Change-Id: I5c494a74a807d3a52a1c88257494b58c583700f5
2013-12-06 16:04:17 -08:00
Linux Build Service Account
9f1f44a743 Merge "hwc: allow DMA pipe in BLOCK mode for virtual dpy" 2013-12-05 22:28:54 -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
Jeykumar Sankaran
1b3da407b3 hwc: Crop source rect for the optimized destination
If a layer destination can be optimized, its source rect
needs to be cropped for the optimized destination rect.

Change-Id: If9a9891200d9cea52b58b253299b4007197cd9e5
2013-12-04 16:22:34 -08:00
Raj Kamal
a8c065f55d hwc: allow DMA pipe in BLOCK mode for virtual dpy
For portrait videos case on WFD, driver supports multiplexing
of DMA pipe in LINE and BLOCK mode.
Loosen the requirements to allow DMA pipe in block mode for
portrait case of virtual display.

Change-Id: I5821501f89b17bb2d29c425aee0a6c16b2a4783b
2013-12-03 09:54:06 +05:30
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
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
Arun Kumar K.R
91090c7487 hwc: use sourceCropF instead of sourceCrop from hwc_layer_t
- Always use sourceCropF instead of sourceCrop.
- Change it to sourceCropF at places where sourceCrop
  used
Change-Id: Ia64050a41a174f3f038c9b88d527d70c2240f2d9
2013-11-11 16:31:12 -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
Linux Build Service Account
b05ea6feb5 Merge "hwc: always enable BWC for primary" 2013-11-06 10:41:31 -08:00
Arun Kumar KR
7b7f401049 hwc: handle actionsafe with downscale on ext enabled
during actionsafe calculations, if downscale on ext is enabled, we need
to consider the physical display attributes.

Change-Id: Ia07218b0b8e47b91b0bf575c66478ebaeab2e2a4
CRs-fixed: 569152
2013-10-31 11:26:48 -07:00
Linux Build Service Account
a0eab66c6a Merge "hwc: Add support to smooth streaming feature." 2013-10-29 15:25:39 -07:00
Tatenda Chipeperekwa
8856270bd7 hwc: always enable BWC for primary
BWC is always enabled on primary for yuv use cases. This is a
workaround for issues surrounding transitioning from non-BWC
to BWC when HDMI/WFD is disconnected.

Change-Id: I6952ef5572f925ce59cbb91c85609c1ad3172703
2013-10-25 13:51:01 -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