Commit Graph

188 Commits

Author SHA1 Message Date
Linux Build Service Account
aa18901d75 Merge "hwc: Configure MDP with updated crop and whf for PTOR layers" 2014-07-31 06:00:54 -07:00
Linux Build Service Account
f689eca921 Merge "HWC: Support for thermal mitigation on 8909" 2014-07-31 02:01:12 -07:00
Sushil Chauhan
875a92e98d hwc: Configure MDP with updated crop and whf for PTOR layers
1. For PTOR layers, MDP needs to be configured with width, height
and format of the Copybit render buffer, otherwise it will lead to
artifacts due to incorrect render buffer reads, when PTOR layer
handles have un-equal strides.

2. Remove render buffer offset for a PTOR layer and configure MDP
with modified source crop, based on its position on render buffer.

3. A layer cannot qualify for PTOR feature, if none of below layers
intersect with it.

Change-Id: Idba65789b9ed3b699a5c70107881868c0385322d
2014-07-29 12:13:02 -07:00
Dileep Kumar Reddi
a25a9187a3 HWC: Support for thermal mitigation on 8909
Avoid MDP composition while system running in thermal burst mode
by reading node msm_fb_thermal_level which is being updated by
thermal daemon.

Change-Id: I3a1a85f1af35b787310ac205dbed3bb2ae86deb7
2014-07-28 08:38:21 +05:30
Raj Kamal
5ef25b84f0 Revert "Set priority among various display devices"
* This reverts commit 52b4fdbdbd.

* Since DisplayDevices are not created for non-wfd virtual
displays(CTS/SR/SSD) anymore, we can remove these checks.

Change-Id: I9249a70c6d6f6b42f268e6ec8a28c0a86b954c4e
2014-07-16 23:27:01 -07:00
Linux Build Service Account
a3691146b1 Merge "display: Dynamic debug logging via binder" 2014-07-07 21:55:28 -07:00
Naseer Ahmed
35a268c23a display: Dynamic debug logging via binder
Provides a way to enable/disable logs at runtime via binder.
The logs need to be enabled from a priviliged shell.

For example,
$ adb shell service call display.qservice 15 i32 0 i32 1

Here 15 is the integer code for DYNAMIC_DEBUG in IQService.h
The first parameter 0 is for DEBUG_ALL
The second parameter 1 is to enable.

Hence, this command enables all debug logs.

Another example - this command enables vsync logging
$ adb shell service call display.qservice 15 i32 2 i32 1

Change-Id: I13d5f397d9d03f0ac6a14d3a3c9098ed59fc62fd
2014-07-03 18:51:04 -04:00
Saurabh Shah
8ec9b5eda4 hwc/overlay: Get rot dest dimensions instead of manipulating source
Currently for Mdss rotator we manipulate the layer buffer dimensions
to be equal to what rotator's destination dimensions would be, so that
these could be fed to MDP. Instead, this patch introduces APIs in
rotator so that hwc can directly query destination crop, width, height,
format from rotator.

This also simplifies the updateSource() and configRotator() helpers.

Change-Id: I501d998f2e0574683c764af9422742b2426ba0c7
2014-07-02 09:58:42 -07:00
Arun Kumar K.R
b2a03b1db3 hwc: Extend PTOR feature for two layers
- Consider two smallest layers for PTOR feature which uses MDP comp.
- These two layers are rendered on a buffer and are queued to MDP
  to acheive full MDP Composition
- This helps to acheive performance enhancement

Change-Id: I43d9306ff19cd2d7a410c885316523965a44cbd4
2014-06-20 12:19:25 -07:00
Ramkumar Radhakrishnan
9d20b39e4a hwc: Rotate RGB layer using MDP Rotator
1. Use MDP rotator to rotate RGB layers which are rendered by software
2. Restrict total number of rotator sessions to 4 for all displays
3. Disable RGB layer rotation for all MDP versions < MDP5

Change-Id: Ie93111082dff9a16b614e9768df5d8ce83ff9e25
2014-06-16 12:10:40 -07:00
Linux Build Service Account
3063fca48e Merge "hwc: Set GPU Hint from idlefallback state to GPU" 2014-06-15 21:46:01 -07:00
Linux Build Service Account
e5d6750d6d Merge "hwc: Define binder interface to set view frame of a display" 2014-06-15 21:45:58 -07:00
Ramkumar Radhakrishnan
0a021a85a3 hwc: Define binder interface to set view frame of a display
Define binder interface setViewFrame to set view frame information
of a display by surfaceflinger when projection for that display
changes.

Change-Id: If737b51ae0f04303a1a29c91a9703f64354b61fb
2014-06-10 14:52:44 -07:00
Tatenda Chipeperekwa
523eac5717 hwc: vds: Add support to dump layers, FB and WB output buffer
1. Add hook to dump the layers going to VDS based virtual display.

2. Furthermore, add utility function to dump the frame buffer and
   WB output buffer. This will be enabled via a system property

   debug.hwc.enable_vds_dump

   Once dumping is enabled, the dumps can be extracted from

   /data/vds.fb.FORMAT.XRESxYRES.raw
   /data/vds.wb.FORMAT.XRESxYRES.raw

   e.g. vds.fb.MDP_RGBA_8888.1152x1920.raw

Change-Id: I2435c5507961a52929411206892c005492d5c193
2014-06-10 10:52:44 -07:00
Ramkumar Radhakrishnan
3efce48401 hwc: Set GPU Hint from idlefallback state to GPU
Set the GPU hint to high from idlefallback to GPU state transition.

Change-Id: Ia8c2e44788e7131c4faf5fda32acf0c5b6000cdd
2014-06-09 16:26:29 -07:00
Sushil Chauhan
defd352e10 hwc: Full MDP Composition mode with overlap region removal
MDP bandwidth limitations can be avoided, if the overlapping region
covered by the smallest layer at a higher z-order, can be composed
on a render buffer using Copybit, and then it can be queued to MDP
along with other layers. It helps to improve performace by avoiding
GPU Composition in use cases like Home Screen pan. To enable this
feature, set system prop "persist.hwc.ptor.enable" to "true" or '1'
and enable Copybit HAL compilation.

Change-Id: Ib719d3dd42477837519518cc427f1b95356c28f7
2014-05-30 13:59:16 -07:00
Ramakant Singh
0def28c653 hwc : Add support for single layer Bypass in MDP3
If the display list contains single layer and that layer
has same properties as Frame Buffer, avoid BLIT on Frame buffer
and pass it directly to display.

Change-Id: I24decaca4788432a55b550caa2a1354a670cd6fa
2014-05-26 13:56:36 +05:30
Jeykumar Sankaran
71e597c7e8 hwc: Map dirtyRect to layer destination before using.
DirtyRect for a layer is generated w.r.t to its buffer
coordinates. It needs to be mapped for layer destination
(display) coordinates before using it to calculate the frame's
ROI.

Change-Id: Id86f495b2016da2cfd5aed4d86bff6d3035abf10
2014-05-15 09:28:08 -07:00
Jeykumar Sankaran
6c7eeac178 hwc: Extend partial frame update for split displays
Extends partial frame update support for split displays by calculating
changing region(ROI) independently for each half of the screen. In case of
only one half updating, display driver shuts down the DSI/MDP mixer control
of the non updating half.

Maintains two ROI's for each display. In case of Non-split
displays, only left ROI is updated.

Change-Id: I8a67fe40aac665a48b6f8a46beffb9f8027851b2
2014-05-14 17:45:24 -07:00
Dileep Kumar Reddi
e351d84ca0 HWC: Update DisplayFrame of all layers properly in Dynamic FB
Use change in HWC_GEOMETRY_CHANGED flag appropriately to avoid
redundant and unintentional overwrites of DisplayFrame values,
which may result fall back to GPU.

Change-Id: Ifb0f8dc5d356c965b6e80644f32392c460fb1ae7
2014-04-25 17:48:51 +05:30
Jeykumar Sankaran
7c85238f0c hwc: Use layer dirty rect to calculate frame's updating ROI
Use layer dirty rect instead of display frame to calculate frame's ROI.

Change-Id: If5fe93da7815efdf9b44ed683a4d80b397921cf1
2014-04-24 10:43:02 -07:00
Linux Build Service Account
597c23c216 Merge "HWC/Copybit :: Add swap rect feature in HAL for MDP3" 2014-04-22 06:37:15 -07:00
Ramakant Singh
21cec725af HWC/Copybit :: Add swap rect feature in HAL for MDP3
We brings all swap rect level checks in HAL from surfaceflinger
for MDP3.
swap rect kicks in case of
1 Only one layer is updating.
2 No overlaypping layers.
3.Both src and dst has same value.(no scaling)
4.No video layer

Change-Id: I881958994e80b53d4969beaaf51518b727a8de78
2014-04-19 19:04:41 +05:30
Raj kamal
59fea567e1 Display and wfd synchronization during teardown
* Provide a binder interface call for wfd module
to inform display about the start/stop/pause/resume
of wfd session.

* This is needed for wfd-hdmi synchronization in
case of v4l2 wfd solution. If hdmi is plugged
in during v4l2 wfd session, display-hal waits in
uevent thread for wfd teardown notification from
wfd module, before going ahead with configuring
external display.

* For VDS WFD solution, display-hal waits in uevent
thread for wfd-teardown to be signalled from
the composition thread.

Change-Id: I9514cb5bc7ff81de0b5dd4cdf66d8286a64ba094
2014-04-15 14:15:59 +05:30
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
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
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
2f11754664 Merge "hwc: Move aspect ratio helper function to qdutils" 2014-03-11 15:35:05 -07:00
Linux Build Service Account
de8c2e476e Merge "hwc: Enable downscale feature through system property" 2014-03-08 07:10:40 -08:00
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
ca1f9ef3ba Merge "gralloc: Add GRALLOC_PRIVATE_USAGE_WFD flag" 2014-03-01 16:19:54 -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
Manoj Kumar AVM
1f6a82159c gralloc: Add GRALLOC_PRIVATE_USAGE_WFD flag
1. Screenrecord and WFD use virtual display and encoder.
   Since HAL supports only one virtual display, we need a
   definite way to distinguish both use-cases.

   Failure to differentiate will break Screen record + WFD
   concurrent usecase.

   WFD stack will set this usage flag and SF will query the usage
   flags to differentiate WFD and screenrecord usecase.

2. Deprecate GRALLOC_USAGE_PRIVATE_EXTERNAL_CC and
   GRALLOC_USAGE_PRIVATE_EXTERNAL_BLOCK flags as these are no
   longer used.

Change-Id: Ifa260c5af2371eea830744ce62a5a83b8cfd0de7
2014-02-20 11:22:33 -08:00
Linux Build Service Account
736a9d93e7 Merge "hwc: Derive view frame for external display." 2014-02-19 19:55:55 -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
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
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
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
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
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
b6b9bde81e Merge "hwc: Add support for Macro Tile feature" 2014-01-16 13:27:11 -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
c62935ae37 display: Add binder interface to pause/resume WFD
- Client can call this when it want to pause/resume wfd
- Calling this will make sure after pause, black screen
  is shown on the sink
- Currently used by the SecureDisplay module

Change-Id: If618edf76a82abe49fb676d3845ca1f1d5a8bf25
2014-01-07 09:57:51 -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
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