Commit Graph

236 Commits

Author SHA1 Message Date
Linux Build Service Account
0003a16858 Merge "hwc: Set display as active only after unblanking it" 2013-09-15 22:36:36 -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
Linux Build Service Account
edc46aab6f Merge "hwc: Add additional trace points" 2013-09-10 16:32:54 -07:00
Linux Build Service Account
7e2cc28e2d Merge "hwc:Donot invoke commit when wfd is in pause state" 2013-09-10 16:32:15 -07:00
Raj Kamal
2464cce7cd hwc: Set display as active only after unblanking it
* For HDMI and non-Hybrid WFD solution, on receiving
online event, display hal sends hotplug connect to SF.
* In case of such displays, set them as active only
after receiving an unblank call.
* For Hybrid WFD solution, since display hal will not
be receiving unblank call from SF, set it as active
as part of processing online event itself.

Change-Id: I319f1576cba954da2024680568c37fedb1eb5d43
2013-09-11 00:12:43 +05:30
Naseer Ahmed
099a693939 hwc: Add additional trace points
Require HAL tag for tracing HWC and add additional trace points
for systrace.

Change-Id: If0abb438da96d3507fb3e2a42bcb8d8b4734fb8f
2013-09-09 14:25:20 -04:00
Dileep Kumar Reddi
90a8d72bd6 hwc:Donot invoke commit when wfd is in pause state
Donot invoke commit when wfd is in pause state
in hwc_set_virtual

Change-Id: I7202237e33b1b5de11f3bb1fdece4a897d3e6434
2013-09-04 04:17:52 -07:00
Saurabh Shah
8c5c852c86 hwc: Add support for bandwidth check
Add support for checking whether the current frame's required
bandwidth can be handled by MDP.

The max limit is configurable via a property and the value is
derived from simulation runs and profiling

Conflicts:
	libhwcomposer/hwc_mdpcomp.cpp

Change-Id: I46b46c346973fcb6487a8a656268171470ce69b9
2013-09-03 15:00:55 -07:00
Dileep Kumar Reddi
52eab82231 hwc: Do not overwrite retireFenceFd if already set
* Do not overwrite retireFenceFd of displaylist in
hwc_set_virtual if it is already set

Change-Id: I785618bf3b266dc6fa8e881677df6e0849870ae7
2013-08-27 11:16:03 -07:00
Amara Venkata Mastan Manoj Kumar
5cbac94cb2 hwc: Fix Pause/Resume issues
1. During PAUSE event, trigger an invalidate frame
     which will unset the pipes (in draw call) and invoke
     display commit as part of hwc_event thread.
     This is required to avoid iommu page faults arising when
     WFD encoder is in the middle of configuring buffers
     and providing to Writeback as part of RESUME event and
     Display HAL tries to invoke display commit as part of PAUSE.

  2. Allow usage of rotator for Primary when WFD is in Pause
     state.

The above changes are required to support secure/non-secure
video playback on HDCP WFD session and Pause/Resume.

Change-Id: I7391ae4cc7cd8b968873996a1a00fee5fbe6039c
2013-08-26 18:35:11 -07:00
Amara Venkata Mastan Manoj Kumar
95e8bc67db hwc: Replace redundant display_commit with Overlay displayCommit
1. As part of Writeback class implementation, display commit is
     implemented in Overlay class.
     Replace display_commit function with Overlay::displayCommit
     function.
  2. Fix return value of hwc_blank function

Change-Id: Ie54fa9876495608a60216025e57cf4de7f6cb03c
2013-08-26 17:55:50 -07:00
Linux Build Service Account
dd07a6ffce Merge "hwc: Fix locking." 2013-08-23 17:32:54 -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
Saurabh Shah
784e98575f hwc/overlay: Force pipe config if list geometry changes
Force pipes of a display, whose geometry has changed, to pass
configuration arguments using MSMFB_SET_IOCTL. This helps the driver
make additive bandwidth calculations and reject the frame if the
requirements go beyond what the hardware can support.

This change still preserves the optmization to avoid ioctl calls, in
cases where pipe params are the same but makes an exception when
list geometry changes.

Change-Id: I909d35b2a8c33059b34b65943ccbbc08650461db
2013-08-22 02:24:13 -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
Raj kamal
a67027089c hwc: Define and Use mSecureLock
Define and Use mSecureLock in composition and binder
thread. This is to ensure both variables mSecureMode
and mSecuring are updated in binder thread without
any context switch to composition thread

Change-Id: Ibd701bd3363515e2f7e8a9711bbc5b66053cfa03
2013-08-19 12:23:11 +05:30
Linux Build Service Account
dec392e864 Merge "hwc: Reset state of layer which needs rotation" 2013-08-15 01:29:18 -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
Amara Venkata Mastan Manoj Kumar
310d04f3ce hwc: Reset state of layer which needs rotation
This change was removed during re base
  ( original commit id: I266a87228193fd85252a22242b66dd4af5f3033f).

  Bringing it back.

Change-Id: I625add1996ca98c47cedecbe8c9f27d298c5f079
2013-08-13 12:42:34 -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
188e433606 hwc: Fix locking in external connect and composition.
The external configuring flag should be set after holding locks.
Before opening FB for HDMI/WFD, composition should give up any
open external FB resources.

Locks should be held by composition for the entire duration.

Change-Id: I703f69f156c665bf422613567c00aae340f3ee12
2013-08-05 15:08:49 -07:00
Saurabh Shah
2a4eb1b965 hwc: Configure framebuffer before other layers.
If framebuffer needs to be configured, configure it before all the
other layers in mdp composition. This helps in cases where we are
out of SMPs and framebuffer configuration fails owing to that.
Framebuffer being the fallback path, should always get highest
priority when reserving SMP blocks

Change-Id: Ie7a6903d1b9fb98b308689c81522571449bf2e8e
2013-07-25 15:17:15 -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
Linux Build Service Account
1f27f3fb3c Merge "hwc: Refactor of allowing virtual displays to HWC" 2013-07-23 09:05:05 -07:00
Linux Build Service Account
8a97d984e1 Merge "hwc: Don't lock eventControl for vsync events" 2013-07-18 21:52:10 -07:00
Linux Build Service Account
b92cdfe40e Merge "overlay: Add writeback support" 2013-07-18 04:47:58 -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
c8118acd59 overlay: Add writeback support
Add explicit writeback display type, writeback ioctls, memory mgmt,
writeback class, writeback obj manager class to overlay.

Change-Id: I171e60cea5ed8f6649859e3eb189df37b39962f1
2013-07-11 17:57:53 -07:00
Saurabh Shah
567788bfa7 hwc: wfd: Fix locking on pause resume events
Fix locking on wfd pause, resume events. Some variables are updated
without proper locks being held.

Fix external related lock in hwc to include complete prepare and draw
Mdp comp for primary, otherwise, ends up reading some flags without
locks.

Change-Id: I0f2f0953a7ab322128d044ca3458e359da4e575e
2013-07-11 10:19:52 -07:00
Naseer Ahmed
20585702e8 hwc: Don't lock eventControl for vsync events
Locking here can lead to a delay in vsync disable/enable
where prepare/set is not yet completed. The HWC spec says that
eventControl needs to take effect immediately.
This lock was earlier present when we waited for SF to unblank
primary at startup and the vsync control ioctls could fail.
This is no longer necessary as we unblank primary on startup now.

Change-Id: I2bf18ae9235f8dd428a495a9a23af7f00f34ff1d
2013-07-11 11:22:41 -04: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
ea6f7144fb Merge "hwc: wfd: Call commit even if in pause" 2013-07-03 17:05:30 -07:00
Saurabh Shah
ad0f0d0a1f hwc: wfd: Call commit even if in pause
We need to call commit on wfd even if in paused state so that pipes
which are unset are actually unstaged from driver

Change-Id: Id71de8b80c44a632989de154a2387380d8fa66f0
2013-06-24 16:07:48 -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
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
4cf4354f41 Merge "display: Enable copybit on msm8610" 2013-05-21 09:29:00 -07:00
Linux Build Service Account
07be7a4e80 Merge "hwc: Implement idle-fallback for videos" 2013-05-17 06:43:50 -07:00
Linux Build Service Account
9659a6a7ad Merge "hwc: Simplify vsync code" 2013-05-17 06:43:42 -07:00
Saurabh Shah
2d998a9658 hwc: Implement idle-fallback for videos
In case of videos, do a fallback using 2 pipes per mixer at most.
This redraw will happen only once to reduce pipes from at most 4
to at most 2 and never draw again until there is an update.

Change-Id: I78c0dc2af4e3bd7e9128994e507e777187b4e247
2013-05-14 18:18:37 -07:00
Linux Build Service Account
8f148a46f5 Merge "hwc: Do not show animation on External display." 2013-05-13 15:38:00 -07:00
Linux Build Service Account
4bfc6a98fa Merge "hwc: Add support for EXT_ONLY Layers" 2013-05-13 15:37:48 -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
68a51923d2 display: Fix acquireFenceFd memory leak
Remove return statement from display commit failure and assign
the return value as -1 to avoid memory leak during error scenario.

Change-Id: I87dd73e997e016f89944bb1603b517847bbc555c
2013-05-11 23:18:15 -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
Arun Kumar K.R
a2978452bd hwc: Add support for EXT_ONLY Layers
If there are any EXTERNAL_ONLY layers present in the list, mark
them as HWC_OVERLAY such that SF does not compose and in hwc_set
post that layer to Ext display, ignore other layers

Change-Id: Ic5db3bfa88295167d23d1fb2be7640c9fc772054
2013-05-11 18:05:40 -07:00
Terence Hampson
0124cc725d display: Enable copybit on msm8610
This change is the hwc and copybit changes need to enable
composition to go through mdp on msm8610.

Change-Id: If0df3a247c5f4f4310966d14fe8fd839bf84b9d5
2013-05-09 16:20:40 -04:00
Linux Build Service Account
6f6e598abe Merge "Fix crash issue arising out of multiple hdmi connect/disconnects" 2013-05-08 22:20:29 -07:00
Saurabh Shah
98acd09dde hwc: Fix Idle fall back when external connected.
Reset idle fall back at the end of prepare, so that irrespective of
whether primary or external is configured first, both will fall back.

Change-Id: I6206f7cf0cccf71d1b33153044546515029f4e08
2013-05-03 10:48:24 -07:00
Raj kamal
e3e68ae41f Fix crash issue arising out of multiple hdmi connect/disconnects
Acquire mExtLock before proceeding further in
hwc_prepare_external to prevent crashes arising out
of updating ctx variables from two different
threads(composition and uevent threads)

Change-Id: I0f18c41b117f18aeb25572b53ef6eba3638bb826
2013-05-02 10:14:23 -07:00
Ramkumar Radhakrishnan
b32a0bc134 display: Enable more Debug logs.
- Dump more info for BUFFER_SYNC ioctl failure case.
   - Enable debug logs for blank/unblank display.

Change-Id: I289ed8ad39a0181ff4a404644b90cb02a8144b9a
2013-04-29 11:02:04 -07:00