Commit Graph

143 Commits

Author SHA1 Message Date
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
Jeykumar Sankaran
27dee264f7 display: External display refactor
- cleans up external library
- add separate library for virtual display
- process virtual updates in its separate path
  in hwc.
- Acquire blank mutex lock for one complete drawing
  cycle

Change-Id: Ib984c578464a131ecdb27ee48960f58d68b7a5a7
2013-08-14 13:19:37 -07:00
Linux Build Service Account
1e67338868 Merge "hwc: Add assertive display support." 2013-08-14 01:08:09 -07:00
Saurabh Shah
a9da08f5af hwc: Add assertive display support.
Add assertive display support to hwc. This feature takes effect when
node /sys/class/graphics/fb*/ad is present. This signifies that that LM0
is being used with fb* for writeback.

When a video playback begins we write "1" to this node to indicate to
post processing that a writeback will happen. Likewise a "0" is written
to this node when playback stops.

The original contents are worked upon and the modified output is fed
via writeback to either rotator or mdp as appropriate.

The feature doesnt trigger when either:
1) Buffer size exceeds 2048
2) External display is connected
3) Multiple yuv streams are present

When this mode is active, MDP comp is applied only to yuv layer.

Change-Id: If5520f9dc849de3189c9f9ed4e9072c8f8f760e1
2013-08-07 17:57:09 -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
1f27f3fb3c Merge "hwc: Refactor of allowing virtual displays to HWC" 2013-07-23 09:05:05 -07:00
Amara Venkata Mastan Manoj Kumar
7fb132789d hwc: Refactor of allowing virtual displays to HWC
1. Since SF doesnt invoke blank for virtual display,
     handle pipe clean up as part of Primary display
     blank.
  2. Support virtual display to query display attributes.

This refactor is done to address Framework reboot issue.

Change-Id: I266a87228193fd85252a22242b66dd4af5f3033f
2013-07-12 12:14:08 -07:00
Saurabh Shah
6810742452 hwc: Increase precision in triming
Increase precision from float to double in triming calcs.
This improves the output. We need this since ultimately
we assign to int which would truncate excesses. With float
due to lower precision, we end up slightly lower than an
integral value.

Change-Id: I5d781b609be1761b746edf6503340f34a985b9e2
2013-07-09 15:17:17 -07:00
Saurabh Shah
23a813c1ab hwc: Sync for rotator
Implement sync for rotator.
If a buffer is rotated, it can be used by producer soon after
rotation (and it wont have to wait until vsync).

Mdp waits for the rotator buffer's release fence to signal
to start display.

Hwc waits for previous access to rotator buffer by MDP to finish
before using it

Change-Id: I5664806a17c44d58af62a2825ce454089fcd31cf
2013-07-03 19:54:22 -07:00
Linux Build Service Account
6e8a57ef3a Merge "hwc: split display: Fix flip on which to do crop swap" 2013-07-03 17:06:20 -07:00
Saurabh Shah
94d6236990 hwc: split display: Fix flip on which to do crop swap
Crop swapping is being done on V flip, rather it should be done
on H-flip in case of split displays.

Change-Id: If6136ad36731f4ac4847e94d8dfa851182f25c83
2013-07-02 11:02:25 -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
Linux Build Service Account
a1c443c063 Merge "hwc: Initialize yuvIndices properly." 2013-06-25 16:39:05 -07:00
Linux Build Service Account
3692044216 Merge "hwc: 8x26: Composition policy when WFD connected" 2013-06-24 14:19:39 -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
Ramkumar Radhakrishnan
26bdee916c hwc: Initialize yuvIndices properly.
memset initializes first 32 bytes of yuvIndices array, so remove
memset initialization and initialize yuvIndices whenever it is required.

Change-Id: I2f01a5c3d07cfbc325f4ca06e3c019616b8a7588
2013-06-20 17:32:39 -07:00
Arun Kumar K.R
1830d50573 hwc: consider landscape panels for calculating aspect ratio
Need to consider the primary panel native orientation(portrait or
landscape) while calculating the aspect ratio for external display

Change-Id: Ic37c719fe736b6957d975ebefa9972b1ba3ccf7f
CRs-fixed: 497272
2013-06-19 15:12:17 -07:00
Linux Build Service Account
1f1db52302 Merge "hwc: Fix Bwc policy's decimation check." 2013-06-07 03:30:02 -07:00
Linux Build Service Account
7b3c8b1b7b Merge "hwc: Fix to avoid heap corruption" 2013-06-06 07:58:11 -07:00
Ramkumar Radhakrishnan
e661f9677d hwc: Fix to avoid heap corruption
- Check for MAX_NUM_APP_LAYERS before updating yuv indices array.
- Fall back to GPU composition when number of app layers exceeds
  MAX_NUM_APP_LAYERS to avoid heap corruption.

Change-Id: Ieb91b705a0a5f50ce2f8829d1f1ee048d44b7d2e
2013-06-05 18:41:47 -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
Saurabh Shah
c5b96dc13e hwc: Fix Bwc policy's decimation check.
In decimation checks of BWC, take log, since a value > 0 and <= 1
doesn't mean decimation will be used.

Change-Id: I2a518e9021a814d3a65e3db793abbb1eb433120a
2013-06-05 13:19:52 -07:00
Linux Build Service Account
88cd5ed8e6 Merge "hwc: Add BWC policy manager" 2013-06-01 06:06:56 -07:00
Linux Build Service Account
3a6cbafeaa Merge "hwc: In scaling check, consider out of bounds layers." 2013-05-31 15:23:41 -07:00
Linux Build Service Account
22f9fe4528 Merge "hwc: Update orient info from transform." 2013-05-31 15:23:39 -07:00
Linux Build Service Account
87db49eb52 Merge "hwc: Featurize framework changes" 2013-05-31 00:29:38 -07:00
Linux Build Service Account
b2a40a4ce3 Merge "hwc/overlay: MDSS driver requires 4-aligned crop.h for interlaced" 2013-05-30 12:07:27 -07:00
Saurabh Shah
1a03d484e0 hwc: Add BWC policy manager
Add a BWC policy manager that decides if BWC needs to be disabled on
certain conditions.
These conditions are statically determined. BWC might get used and
still fail (or cause failure of subsequent pipe requests) if SMP
blocks are not sufficient.

Change-Id: I805738911a8da7dfc6232c133c74ef844c3af5b1
2013-05-29 13:44:20 -07:00
Naseer Ahmed
edbe51811c hwc: Featurize framework changes
These flags were added to the core HWC header and break pure AOSP
builds.

Change-Id: I0d2f2071ce3fd6a9a0dc848b08098895b669c94e
2013-05-28 19:56:11 -04:00
Linux Build Service Account
5a7dcbbab6 Merge "hwc: Unblank primary display on bootup." 2013-05-27 07:12:31 -07:00
Sushil Chauhan
5491c8ade9 hwc/overlay: MDSS driver requires 4-aligned crop.h for interlaced
MDSS driver requires the crop height to be multiple of 4 to
de-interlace the interlaced Yuv content.

CRs-Fixed: 491488
Change-Id: I9a95392a71cca217e2890c9736f1450fd8aa4a59
2013-05-24 10:23:55 -07:00
Saurabh Shah
8a11793ad1 hwc: In scaling check, consider out of bounds layers.
In scaling check, consider out of bounds layers, apply trim
and then decide if scaling is necessary or not.

Change-Id: Iad7f662f42096b3f7a4a1c4cfe71048d275f4b5f
2013-05-23 12:48:13 -07:00
Ramkumar Radhakrishnan
d7e8d0c3d1 hwc: Update orient info from transform.
Update orient info from transform for animation use case.

Change-Id: I33e51d3ee9f5010c04642535316bc8ed97d10b33
2013-05-22 12:31:48 -07:00
Linux Build Service Account
6c8c61a45b Merge "hwc: Add check for YUV formats in configRotator." 2013-05-21 09:26:39 -07:00
Naseer Ahmed
22616d9e18 hwc: Unblank primary display on bootup.
SurfaceFlinger assumes that the primary is unblanked on bootup.

Change-Id: I481ece9772ad29ac5eddd2b31f67f3f68bb3baa5
2013-05-21 11:49:59 -04:00
Linux Build Service Account
ad257b5c8a Merge "hwc: Set List should not block DMA on 8x10" 2013-05-21 06:14:14 -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
Sushil Chauhan
6181aa265a hwc: Add check for YUV formats in configRotator.
Since configRotator gets called from FBUpdate for non-YUV layer,
check for YUV formats is required.

Change-Id: Idaef9d9b650499f8a0342ddfc04e1f55c9b75f73
2013-05-17 18:04:10 -07:00
Terence Hampson
45c02efdb1 hwc: Set List should not block DMA on 8x10
Since DMA is the only overlay pipe on 8x10 it should not be
blocked in the set list.

Change-Id: Ie8ba7028ceaf90e1a3211ef076bc839e793017de
2013-05-17 17:28:17 -04:00
Linux Build Service Account
9659a6a7ad Merge "hwc: Simplify vsync code" 2013-05-17 06:43:42 -07:00
Linux Build Service Account
b27da8ff97 Merge "hwc/overlay: If configRotator fails, mark all pipes as available." 2013-05-17 04:15:21 -07:00
Linux Build Service Account
cc8c72deb8 Merge "display: Remove default arguments for setMdpFlags function." 2013-05-17 04:13:12 -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
Sushil Chauhan
bd3ea926be hwc/overlay: If configRotator fails, mark all pipes as available.
If configRotator fails, reset usage & allocation bits on all pipes
for the given display to make them available for the current draw
cycle. It is required because if external is connected and Rotator
commit() on Video fails, all pipes which were picked-up by primary
are not available for FB update, hence it runs out of pipes.

CRs-Fixed: 483002
Change-Id: Ifd0d708e4ef8e3ddbe9d0531f6090539b8dcb249
2013-05-15 14:56:31 -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
Sushil Chauhan
1cac81521d hwc/overlay: Crop x, y, w and h should be even for MDSS Rotator.
MDSS driver requires Rotator crop x, y, w and h to be even for YUV
formats.

CRs-Fixed: 485216
Change-Id: I9a066970f8cedaed7ba18534bb99edd1bcf421dd
2013-05-14 00:01:50 -07:00
Naseer Ahmed
8bb8f9de3b hwc: Simplify vsync code
Handle the wait properly in the kernel and remove unnecessary
thread signaling.

Change-Id: Iff05825a7a85d0353f3feb64e7f9a06cedab7869
2013-05-13 17:38:26 -04: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