Commit Graph

70 Commits

Author SHA1 Message Date
Linux Build Service Account
7ed66cf0ac Merge "hwc: set mModeOn flag for fbupdate properly" 2014-04-02 21:45:42 -07:00
Saurabh Shah
dd8237acd1 hwc/overlay: Add support for pipe priorities, 1 pipe config for FB
If using source split to stage 2 pipes on the same mixer stage,
the left pipe needs to be a higher priority than the right.

Add API in overlay to compare pipe priorities and use this in
source split config to stage pipes accordingly.

Add support for 1 pipe config for FB if updating rect is within 2048
pixels.

Change-Id: I8b33d5ebd0f8765ee842bab128d8abd67a110145
2014-04-02 13:22:53 -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
Ramkumar Radhakrishnan
3686b7edf4 hwc: set mModeOn flag for fbupdate properly
Set mModeOn flag for fbupdate to false if validateAndSet function
fails, so that queueBuffer can be avoided for prepare failure.

Change-Id: Ifcc7a16caf8779f13411ae2a9eeeec6e6c846f4c
2014-03-25 12:13:40 -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
Linux Build Service Account
33aa8e7395 Merge "h/q/d: Add support to update framebuffer partially" 2014-03-08 23:37:15 -08:00
Jeykumar Sankaran
c28eb0b3b8 h/q/d: Add support to update framebuffer partially
For dual DSI panels, when enabled partial update AND framebuffer rect
optimization, it is not necessary to update both the halves of
the framebuffer every frame. This channge adds support to update
framebuffer based on the updating region generated.

Change-Id: Ia63a8b9ac0e915c04e06122a16471ee18b5a8272
2014-03-06 14:25:46 -08:00
Saurabh Shah
ab47c69049 hwc: Add support for SourceSplit
Add support for SourceSplit. The mixers are abstracted from hwc.
There would be no translations to mixer understood destinations.

1) If a layer's crop and position are < 2048, only 1 pipe can be used
irrespective of position.
2) Else 2 pipes can be used with the layer equally split, without
regard to position.

Change-Id: I501a53838d147887c1e2299366663e05320d5096
2014-03-03 09:57:12 -08:00
Jeykumar Sankaran
c2d78d8f2c h/q/d: Optimize framebuffer layer update
While doing mixed mode composition, update only the region of the
framebuffer where layer contents are cached or updated. Avoids
MDP fetch for non-visible contents of FB.

Change-Id: I20997d79e02a6bac60d7333c28c6dde134263197
2014-02-20 10:19:53 -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
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
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
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
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
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
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
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
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
f43428a466 Merge "hwcomposer : Fix rotator fence for FB pre rotation." 2013-11-04 18:19:45 -08:00
Prabhanjan Kandula
db202b7016 hwcomposer : Fix rotator fence for FB pre rotation.
Add framebuffer to rotator map data structure if
rotator is used for pre rotating framebuffer.

Change-Id: I496656c22b289b0bb0bf8c49056384a7fad3ac7d
CRs-fixed: 569696
2013-11-01 00:29:10 +05:30
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
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
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
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
Linux Build Service Account
16af3fd8a0 Merge "hwc: Add support for plane alpha" 2013-08-21 16:28:52 -07:00
Naseer Ahmed
522ce66a3e hwc: Add support for plane alpha
HWC 1.2 API passes down the plane alpha and the blending
operation to apply. Pass this information to the MDP.

Change-Id: I7fbd17345d9157aa654e4b1031ac3e26adf87f37
2013-08-20 15:40:42 -07:00
Arun Kumar K.R
027d96511c 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: I1768dbfac239ae663927358ca9b8e5510b683385
2013-08-16 21:06:04 -07:00
Amara Venkata Mastan Manoj Kumar
1291675ee4 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.
  This works only for QCOM WFD proprietary solution.

Change-Id: Ic20e837bf02c0f7b6718946e70b936f3a469fa7c
2013-08-16 20:56:05 -07:00
Arun Kumar K.R
5898c65aab hwc: fix aspect ratio calculations
- Make aspectratio calculations independent of ext dpy w/h
- pass hwc_rect_t to getAspectRatioPosition function instead of
  x, y, w, h
- overload getAspectRatioPosition func to return the upscaled
  or transformed position for a particular display based on the
  values set by SurfaceFlinger

Change-Id: I0be9b2b4b030bdd8e69dc1493dc8cbac31918c27
2013-08-16 12:33:34 -07:00
Saurabh Shah
07a8ca82c8 hwc: split display: Fix left split default value if not published
If the left split is not published by the driver then the default should
be even split. This was missing from the configuration in utils. This is
already taken care of in framebuffer configuration and mdp composition.

Change-Id: I3db44481fd791809146752ddff56420dcbe89fb4
2013-08-07 10:14:52 -07:00
Linux Build Service Account
20216bd11c Merge "hwc/overlay: Prevent pipes from switching mixers" 2013-08-02 15:19:02 -07:00
Saurabh Shah
af5f5971d4 hwc/overlay: Prevent pipes from switching mixers
For split displays, earlier we allowed pipes to switch mixers in
subsequent rounds. This change prevents that and makes sure there
is one composition round where a pipe being transferred to another
mixer of the same display is UNSET

Change-Id: I3c679cc4256363eeb70c5cf8bcaf5047b8a064c2
2013-08-01 11:07:32 -07:00
Saurabh Shah
e25ca77439 hwc: Remove non-wormhole usage from FB config for split display
Remove the non-wormhole calc usage from framebuffer config, since
it was intended for 2D blit which isnt used for split config.
Also the usage leads to incorrect behavior for split displays.

Change-Id: I262b2f7b04f400727bcd97677502239e1080c979
2013-08-01 10:36:59 -07:00
Ramkumar Radhakrishnan
1829d2820d hwc: move fbzorder initialization code to hwc_fbupdate.cpp
move fbzorder initialization for external during display animation
from landscape to portrait from hwc.cpp to hwc_fbupdate.cpp.

Change-Id: I4dbac87fe56f8262356043865b61a982244cd72a
2013-07-25 15:16:46 -07:00
Saurabh Shah
67a38c3565 hwc: Add support for uneven split primary displays
Add support for unevenly split primary displays.
The driver provides info about the split via msm_fb_split sysfs node

For external we assume even split. If driver doesn't specify any split
for primary, we default to even split.

Change-Id: I4d541f41de2d7a5d2b62653fa33cab079a6d5d30
2013-07-01 14:55:06 -07:00
Saurabh Shah
d4e6585258 hwc: 8x26: Composition policy when WFD connected
When WFD is connected to 8x26
1) On Video transition, have 1 padding round if external connected.
Required to shift pipes across mixers.
2) Request DMA pipe always for FB on WFD.
Necessary for rotation + writeback
3) Disable non-worm-hole calcs on external (because of 2)
4) Disable action-safe calcs on external (because of 2)

Change-Id: I63b50b2477db443f9ea1d3fa610b59295c9359b7
2013-06-20 19:33:49 -07:00
Saurabh Shah
c66f54dbad hwc: split display: Allow FB to acquire any pipe
In the high res, partial mdp comp, we may end up using all rgb pipes
before fb is configured. Let fb use TYPE_ANY, so that pipes are
searched for starting with RGB, VG, DMA.

Change-Id: Ie30992f9ad56b83b3411ab4f6bea2bb317bb0ef1
2013-06-12 15:48:58 -07:00
Arun Kumar K.R
82f1d28d5d hwc: Add action safe support for low res panels
Consider action safe values for UI and video while
configuring overlay for low res panels

Change-Id: Ia40c3e2bb21f808ec127df3edb10e484b82cec3f
CRs-fixed: 481442
2013-06-05 14:36:50 -07:00
Linux Build Service Account
69db7afdd5 Merge "hwc: Don't permit rotator use under certain conditions" 2013-05-20 04:21:38 -07:00
Saurabh Shah
e247408f06 hwc: Don't permit rotator use under certain conditions
These include constrained targets, with external connected which could
lead to a scarcity of pipes. Furthermore owing to a scarcity of writeback
interfaces, even if pipes are available, we may not be able to still
use rotator.

Change-Id: Ie2fb4c1726f32addcace89c268a126abe0cddbe0
2013-05-16 17:56:37 -07:00
Ramkumar Radhakrishnan
9d52f4395f display: Remove default arguments for setMdpFlags function.
Remove default arguments from setMDPflags function to get rid of
issues hidden from the developer.

Change-Id: Ic78645675b0aaab284fe2d0de8fffb4b26beabc7
2013-05-14 14:46:59 -07:00
Ramkumar Radhakrishnan
59a110773c hwc: Do not show animation on External display.
- When primary is animating, the animation should not be
  shown on the external display.
- Mark all app layers as HWC_OVERLAY on external during
  animation so that SF wont compose it on FB.

Change-Id: Ic557cabfd9f2518614777c0e993541e36e090850
2013-05-11 18:37:37 -07:00