Commit Graph

40 Commits

Author SHA1 Message Date
Manoj Kumar AVM
fac1b844cb sde: fix qservice compilation issue
Fix ambiguous overloading error by proper type casting
to IQClient.

Change-Id: Ibec88935dfe9474e24d6b33294d8defd13f75b98
2015-03-04 15:08:58 -08:00
Ramkumar Radhakrishnan
b327d5982b sde: Add set power mode support for virtual display.
1. Set the power mode for virtual display while setting power mode for
   primary, as surfaceflinger does not invoke SetPowerMode() for
   virtual display.
2. Invoke null commit on each display to release all the pipes connected
   to it on SetPowerMode().

Change-Id: I8992850a7acbfdf8ab0de3216d92cf4f28fbaaeb
2015-02-26 16:25:59 -08:00
Ramkumar Radhakrishnan
84fdd2db94 sde: Add support to disable animation on external display.
1. Compose the first animating frame using GPU on external display.
2. Set composition type of subsequent animating frames as SDE
   composition and update cached framebuffer to external display.
3. Close the releasefence fd of framebuffer target during animation.

Change-Id: I674efa1821c8fc2fa0c3f9ccee88e25b70f75f9d
2015-02-10 18:07:56 -08:00
Linux Build Service Account
3c53d380f3 Merge "sde: Implement sequence locker to lock across multiple APIs." 2015-02-09 08:12:44 -08:00
Ramkumar Radhakrishnan
952081f9ed sde: Add support for input and output layer dump
1. Add support to dump the input layers for all displays or each
   display separately.
2. Add support to dump output layer for virtual display.
3. Add binder support to enable dump on each display, to enable dump
   for input/output layers, and to set number of frames to be dumped.

Syntax:
  adb shell "service call display.qservice 21 i32 <FRAME_COUNT> i32
             <DISPLAY_TYPE> i32 <LAYER_TYPE>"

  FRAME_COUNT  = Number of frames to be dumped.
  DISPLAY_TYPE = 1 -> To enable dump on primary display
                 2 -> To enable dump on hdmi display
                 4 -> To enable dump on virtual display
  LAYER_TYPE   = 1 -> To enable input layer dump
                 2 -> To enable output layer dump

To dump 2 frames of input and output layers on virtual display:
  adb shell "service call display.qservice 21 i32 2 i32 4 i32 3"

Change-Id: Ifb3e6a7554e0012495f6f5858d6e32ff8fee6bec
2015-02-04 15:16:01 -08:00
Ramkumar Radhakrishnan
ef83526f6a sde: Implement sequence locker to lock across multiple APIs.
1. Lock prepare() and set() APIs using sequence entry and sequence
   exit lock respectively to prevent the critical section being
   accessed by other threads.
2. Wait for sequence wait lock on HotPlugEvent thread or any other
   binder threads(Eg. dumpsys), before it accesses the critical region.
3. Prevent deadlock during multiple prepare() calls before a set().

Change-Id: I5443675c870ed2967615ec383dd2d59ded30b52b
2015-02-02 18:07:38 -08:00
Ramkumar Radhakrishnan
94c27a389b sde: Add support for virtual display
1. Create virtual display, if the current virtual display list is
   valid and the output buffer handle is not NULL.
2. Configure input and output layers of writeback for the composition
   using writeback.
3. Propagate the retire fence back to framework, so that the consumer
   will wait for retire fence before it consumes the output buffer.
4. Recreate the virtual display, if the width, height or format of the
   output buffer changes.
5. Destroy virtual display, if the current virtual display list is
   invalid or the output buffer handle is NULL.

Change-Id: I096575381da3db1d0c7b7270bc55c5d936b9f5a8
2015-01-30 08:20:11 -08:00
Ramkumar Radhakrishnan
befbdbe6ff sde: Add Support for UI/Video rotation using SDE rotator
1. Implement Buffer manager to allocate and deallocate output buffers
   for rotator.
2. Assign buffer slot for each layer requires rotation and manage the
   internal state of buffer slot in buffer manager.
3. Get the output buffer for each layer requires rotation from buffer
   manager and associate the information along with that layer.
4. Create/Destroy the rotator session from the hint provided by buffer
   manager. This is required to help driver to calculate the bandwidth
   for the current frame.
5. Validate the rotator configurations and submit the rotation job
   using rotator validate and rotator commit ioctl.

Change-Id: I1bc1de05042f64d5f32e95ac6226890fa4fabd24
2015-01-30 08:19:57 -08:00
Ramkumar Radhakrishnan
7ebf034c5f sde: Add support to systrace.
1. Define an interface between hwcomposer and display engine to collect
   systrace for a module in display engine.
2. Implement the functionality of conditional ATRACE_BEGIN/ATRACE_END
   in hwcomposer.

Change-Id: I441d06397a2618f87f132c8037ca83d5fc13b07c
2015-01-30 08:16:37 -08:00
Ramkumar Radhakrishnan
a35a2735d2 sde: Add support for idle fallback.
1. Set idle timeout value to driver through sysfs interface for
   primary display.
2. Get notification about idle timeout from driver and fallback to GPU
   composition.
3. Avoid idle fallback, if there is only one application layer.
4. Define a binder interface to set the idle timeout value through adb.
   (Eg. adb shell "service call display.qservice 16 i32 70")

Change-Id: If0cfcbea140580803ad8a67ac9425db86c0f75bb
2015-01-28 19:12:12 -08:00
Linux Build Service Account
c56295232f Merge "sde: Add support for flush." 2015-01-28 10:44:03 -08:00
Linux Build Service Account
0da1c10772 Merge "sde: Add support for UBWC in display engine" 2015-01-25 13:11:26 -08:00
Dileep Marchya
25927a6b47 sde: Add support for flush.
Add support for flush on a display. This flush shall release pipes,
all pending buffers and associated fences that are currently held
by display engine.

Change-Id: I8a8d7030fb6af031b3760c172fce4f1f8ef3fedc
2015-01-21 13:12:52 -08:00
Sushil Chauhan
cfee3f3d6e sde: Add support for UBWC in display engine
SDE checks for PRIV_FLAGS_UBWC_ALIGNED bit in private handle flags
and sets the corresponding UBWC aligned LayerBufferFormat. Driver
expects UBWC specific pixel formats defined by MDP header.

Change-Id: Iaf86c4d7433dc9628b1cf8d7fb8872ab4f1f0a39
2015-01-20 16:40:57 -08:00
Ramkumar Radhakrishnan
b56c7a9272 sde: Add support for video playback with SDE.
1. Set the video and secure flag of the layer buffer flag properly.
2. Normalize the crop rectangle of the layer to even values.
3. Handle one pixel downscale usecase, as MDP hardware dont support it.
4. Set the hint flag for each layer qualified for SDE compoisition to
   notify surfaceflinger to clear the layers destination region in FB.

Change-Id: I20239e79db3ea90e0d4fdcb6953b8b70d703b4fc
2015-01-16 11:31:11 -08:00
Ramkumar Radhakrishnan
0142f2ce73 sde: Close acquire fence fds, if display commit fails.
Close acquire fence fd of all layers, if display commit fails. This
is required to avoid fd leaks.

Change-Id: I12d44ddc0d1e378374c64a1808e7a19f071209be
2015-01-06 15:42:06 -08:00
Manoj Kumar AVM
0a8eef0f16 sde: strategy interface changes
1. Create an instance of strategy interface for each display.
2. Add start and stop methods in strategy interface.
3. Remove union of retire fence and output buffer.

Change-Id: I31e8afedda529a5e92d618d515ae23eebcedf32b
2014-12-29 12:11:37 -08:00
Dileep Marchya
f0a2dfaac6 sde: Add support for hwc version 1.4
- Add support for setPowerMode.
- Treat HWC_POWER_MODE_DOZE/HWC_POWER_MODE_DOZE_SUSPEND equally.
- Support getActiveConfig/setActiveConfig only at 0th config for now.

Change-Id: I4684423bb8e3c66cb2289fcabcf13f717168dc9d
2014-12-17 18:15:03 -08:00
Dileep Marchya
ad32ccf4c5 sde: Initialize layer stack based on its usage.
Initialize retire fence for primary/external displays and output buffer
for virtual display.

Change-Id: Id2e628a5265df62f63c92e0414a7d988aac078c1
2014-12-16 17:08:32 -08:00
Arun Kumar K.R
d821fbdf15 sde: Add support for HDMI
- Listen to HDMI uevent in HWCSession and handle the creation
  of HDMI displays
- Add support for querying different modes in HWFramebuffer
  interface
- Add interfaces in display engine for HDMI display
- Enables only GPU composition on HDMI

Change-Id: I3fc8c6512817883f34540298730ca976a63e6d48
2014-12-16 17:08:24 -08:00
Linux Build Service Account
6c9cdd5138 Merge "sde: Fix SET_BIT and CLEAR_BIT macros." 2014-12-06 14:38:30 -08:00
Linux Build Service Account
28b8263e2a Merge "sde: Add a client for qservice in hwc." 2014-12-06 00:26:59 -08:00
Linux Build Service Account
201d25f6f6 Merge "sde: Add support for conditional logging." 2014-12-06 00:26:58 -08:00
Linux Build Service Account
72b4d86893 Merge "sde: Fix/clean up DeviceBase/HWFramebuffer and LOG msgs" 2014-12-06 00:26:57 -08:00
Linux Build Service Account
2e34fc0ccc Merge "sde: Make validate and commit ioctl calls on driver." 2014-12-06 00:26:57 -08:00
Dileep Marchya
1d1f366532 sde: Fix SET_BIT and CLEAR_BIT macros.
1. Set output of SET_BIT and CLEAR_BIT to destination.
2. Remove kernel header dependency from hwc makefile.

Change-Id: Iad6f5776997064654178b54e0aba749576d85a50
2014-12-05 18:44:30 -08:00
Dileep Marchya
1fcbb06e2c sde: Add a client for qservice in hwc.
1. Add a client for qservice in hwc and enable dynamic logging.
2. Remove common makefile and merge it to respective modules makefiles.

Change-Id: I582873c296d21ecd037225ac0be8177e52cc8cda
2014-12-05 16:02:12 -08:00
Dileep Marchya
3ffb4703cf sde: Add support for conditional logging.
1. Add support for conditional logging.
2. Move log handling to hwc client.

Change-Id: I76bb2f9b420a178f22c4ee2ebf64da6daf5b87ed
2014-12-04 16:31:37 -08:00
Arun Kumar K.R
ed2ffce4b8 sde: hwc_display: Set all the display attributes
- Set the HWC_DISPLAY_SECURE attribute in the HWC.
- All the physical connected displays are assumed to be secure by SF.
  Hence set this display attribute as true.
- This is added for backcompatibility.

Change-Id: I9e0ac4f3d923f990a5c81a3c36638bd62fdc83c0
2014-12-02 12:50:34 -08:00
Arun Kumar K.R
ac6c734815 sde: Fix/clean up DeviceBase/HWFramebuffer and LOG msgs
- Replace HWBlockType in DeviceBase with HWDeviceType to
  differentiate when we add Rotator Device
- Parse fb node index for primary, hdmi and virtual displays
- Use fb node index while opening the fb device
- Update split info in GetDeviceAttributes
- Store event handlers only for Primary and HDMI
- Change LOGE to LOGW at appropriate places
- Enable error on unused variable

Change-Id: Ie6cb00633edfda17cb6ce1005780bf4b7e6c8270
2014-12-02 12:35:54 -08:00
Dileep Marchya
aef83adb7e sde: Make validate and commit ioctl calls on driver.
1. Update hw framebuffer implementation to compose layers for
   validation with driver.
2. Use atomic commit ioctl to send layers for validation
   and commit on driver.
3. Add different buffer formats handling in hw framebuffer.

Change-Id: I13f9c245c14859c8e2680ef724cfebb59a0d990e
2014-12-02 01:06:12 -08:00
Ramkumar Radhakrishnan
d33432ef5a sde: Replace device with display wherever its applicable.
1. Replace device interfaces between display engine and hwcomposer
   with display interfaces.
2. Replace all device interfaces internal to display engine with
   display interfaces.
3. Rename device_base header and source files to display_base header
   and source files.
4. Rename hwc_sink header and source files to hwc_display header and
   source files.

Change-Id: Iedde81fb19583bcaf71cc631d935c7268511027f
2014-11-20 23:55:48 -08:00
Linux Build Service Account
69ca731c02 Merge "sde: Add device dump information" 2014-11-18 09:05:17 -08:00
Ramkumar Radhakrishnan
cd8b429dd8 sde: Add support for layer caching
1. Pass layer updating flag to composition manager to mark those
   layers for SDE composition.
2. Compare cached layer stack info with current layer stack info.
   if it matches then set composition type to HWC_OVERLAY, so that
   surfaceflinger wont compose those cached layers into framebuffer
3. Cache current layer stack information for next frame composition.

Change-Id: I3485a8ac2242fa25b48e79b1549d37ef7638c9af
2014-11-14 17:03:25 -08:00
Dileep Marchya
750da12730 sde: Add device dump information
Add device dump information to dump output.

Change-Id: I68a5465bf8371fbd3f6d2b0caf02db69bdd56f0f
2014-11-13 12:00:41 -08:00
Arun Kumar K.R
edb8bc82ff sde: Add support for DisplayEventHandler
- Add DisplayEventHandler to receive VSync event from driver.
- Add hooks to enable/disable VSync from client.
- Propogate VSync timestamp to the client

Change-Id: I27ea9773c424d8ad85f11f292ddd8792564bbcdc
2014-11-13 11:59:29 -08:00
Dileep Marchya
eb547a0340 sde: Reduce level of indirections to access layer info.
1. Pull LayerArray information in LayerStack struct and
   remove LayerArray.
2. Remove size_t usage in SDE.

Change-Id: If2d4be17e42c27a2ee451c103282bac35eea42dc
2014-11-13 11:59:21 -08:00
Dileep Marchya
b61346fd8b sde: Add hooks for dump information.
1. Implement dump interface and provide hooks for adding
   dump information from different modules.
2. Rename writeback session module to offline controller.
3. Merge logger.h functionality into debug.h
4. Rename DISPLAY_* as SDE_*.

Change-Id: I3e8df27a848475d067801037bcdc807561d35cc8
2014-11-13 11:57:15 -08:00
Dileep Marchya
934d396925 sde: Enable GPU mode composition for primary display.
1. Load sde core and create primary display in hwc session.
2. Prepare layer stack for primary display.
3. Open open fb node for primary display.
4. Add support to select a composition strategy using strategy
   interface and allocate mdss resources using resource manager
   in composition manager.
5. Manage mdss pipe state machine and configure pipes for layer
   stack in resource manager.
6. Add default strategy to select GPU composition.
7. Add support for hw layer to atomic commit translation.

Change-Id: I5a5537dbcb28727e16b0c055e17a387696f6dac8
2014-11-13 11:57:06 -08:00
Dileep Marchya
96db258608 sde: Snapdragon Display Engine (SDE) implementation skeleton.
Define classes and files required for SDE implementation.

Change-Id: Ic2d8572699b895f1980c7c127301e9ce0d4c8b03
2014-11-13 11:56:56 -08:00