Commit Graph

255 Commits

Author SHA1 Message Date
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
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
Linux Build Service Account
ac06730570 Merge "hwc: Dynamic Resolution support on Primary" 2014-01-31 05:11:59 -08:00
Linux Build Service Account
1debdc35f4 Merge "hwc: vpu: Added a new flag to indicate VPU pipe" 2014-01-30 21:20:16 -08:00
Linux Build Service Account
90dbb20f26 Merge "Set priority among various display devices" 2014-01-30 07:20:51 -08:00
Dileep Kumar Reddi
bf2678bf8a hwc: Dynamic Resolution support on Primary
* Useful to estimate GPU/MDP performance for different resolutions.
    * MDP:
      Every layer is downscaled/upscaled to primary panel resolution.
    * GPU:
      All layers will be composed in required resolution to FB.
      FB is downscaled/upscaled to primary panel resolution.
    * Steps to follow:
          step 1: adb root
          step 2: adb shell setprop debug.hwc.fbsize XRESxYRES
          step 3: adb shell stop
          step 4: adb shell start

Change-Id: I82a032df87c91549c49a9cdbd981ff02f105ff2e
2014-01-29 16:39:03 +05:30
Linux Build Service Account
3171a571c4 Merge "hwc: Add type casting to aspect ratio calculations" 2014-01-28 23:37:54 -08:00
Zohaib Alam
c9d00cd1e8 hwc: vpu: Added a new flag to indicate VPU pipe
Added a new layer flag: HWC_VPU_PIPE to indicate that the layer
will be drawn by VPU. There is a corresponding MDP pipe
flag: MDP_VPU_PIPE, which should be set for the VPU layers to
indicate the layer will be drawn by VPU, so that MDP driver does
the appropriate settings to allow this process.

Change-Id: I61270aca633bb831bf34d413877bf925a3d2ac37
2014-01-28 19:49:09 -05:00
Raj Kamal
52b4fdbdbd Set priority among various display devices
* When a non-WFD virtual display device (SSD/
screenrecord) is active along with
non-hybrid WFD solution(WFD faked on
external), give preference to non-hybrid WFD
device over non-WFD virtual display device.

* This is needed only in cases when WFD is
enabled via v4l2 rather than using VDS api's.

Change-Id: I63e53baa214bdcdac19430ca30b939cdd7416cbb
2014-01-28 16:26:23 +05:30
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
Tatenda Chipeperekwa
7dfeecf8bb hwc: Add type casting to aspect ratio calculations
Type casting to float prevents rounding off errors which could
result in invalid or unexpected results when doing calculations
with integers.

Change-Id: I6d5c233c013322c4e9c7f7db61b5c604f915643c
2014-01-23 17:51:16 -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