Commit Graph

207 Commits

Author SHA1 Message Date
Tatenda Chipeperekwa
af2c004c44 hwc: Rename libexternal to serve HDMI as primary or external
This change will make is easier to build new functionality
applicable to both HDMI scenarios.

Change-Id: I417184568cb65a49c2ccb4199aff313ae2ee9b24
2014-09-29 15:39:58 -07:00
Tatenda Chipeperekwa
03d5df265c hwc: Clean up ExternalDisplay class
1. Remove hwc_context_t from libexternal since this is a construct
   that should only be used in libhwcomposer.
2. Clean up redundant code by creating utility functions to
   a. open a sysfs node in a given mode
   b. improving EDID mode storage/manipulation
   c. creating/destroying composition objects
3. Add utility functions to
   a. get the connected state of the external display
   b. determine which interface the external display is connected to
      (primary or external)
   c. activate the hdmi interface by setting the resolution via an
      ioctl
   d. update/reset external display information when a device
      connected/disconnected

Change-Id: Iba34c9e43b39ccb9c9436deb726587bd1b26b779
2014-09-25 10:20:11 -07:00
Linux Build Service Account
b8173300fa Merge "display: Add support for dynamic refresh rate" 2014-09-20 13:38:37 -07:00
Arun Kumar K.R
a727a888ba display: Add support for dynamic refresh rate
- The primary panels refresh rate can be change by clients
- Required refresh rate will be set by client using metadata
- If there are multiple clients requesting, it will be used only
  when the refresh rates are equal, else it resets to default
- Set the new refresh rate only when there are only YUV layers
  updating or when the list has only one RGB layer updating
- MdpVersion gets the dyn fps capabilities from panelInfo

Change-Id: If3e7e6b2f028eb301399c4d32c748eed8a97c41f
2014-09-17 13:48:26 -07:00
Tatenda Chipeperekwa
cb2a243608 hwc: vd: Add support for Dynamic Resolution Change (DRC)
1. Add support for Dynamic Resolution Change

We add support for DRC on virtual displays. This is achieved
by reading the width and height attributes that are set as
part of the buffer handle metadata.

For the WFD use cases, the WFD  MultiMedia framework will
update the width and height during DRC by using setMetaData
API with UPDATE_BUFFER_GEOMETRY. We then proceed to configure
WB with the new resolution for subsequent frames.

2. Update WB dump with output buffer format and resolution

Update WB dump with output buffer format and resolution. This is
helpful for debugging purposes.

Change-Id: I537277499041bffc7bfc5c6e3d024b67f80fce44
2014-09-15 11:12:35 -07:00
Linux Build Service Account
663e49d89c Merge "hwc: Enable mdp downscale feature for 4k resolution" 2014-09-10 18:54:33 -07:00
Ramkumar Radhakrishnan
a5c72875f5 hwc: Enable mdp downscale feature for 4k resolution
Enable MDP Downscale feature for primary resolution greater than
2048 only for the targets that supports source split.

Change-Id: I21871b099f74543aa8c2416bac41e3a16d4ce72d
2014-09-08 17:37:53 -07:00
Manoj Kumar AVM
9591a5e8cd hqd: virtual display code clean up
Remove V4L2 based virtual display functions as it is
no longer used.

Change-Id: Ibd7685791de6baa1bbf12ffe343443fcd7725269
2014-09-02 19:50:23 -07:00
Manoj Kumar AVM
fb472b0553 hqd: Do not process WFD teardown as part of HDMI connection
WFD teardown was required when HDMI is connected on V4L2
architecture. This is because WFD connection is using HDMI
piggyback connection. Since SurfaceFlinger can honour only
one active external display, we have to teardown WFD
connection to process HDMI connection.

This is no longer applicable on VDS architecture. WFD connection
is established using Virtual Display adapter.
WFD Stack listen to HDMI broadcast event and initiate wfd teardown.

Change-Id: Iaca249f4f45193f02d32ac0ab56d68ce85e8c9a3
2014-08-27 13:45:14 -07:00
Linux Build Service Account
f4045c63bb Merge "hwc: Add support for secure RGB layer" 2014-08-24 13:52:07 -07:00
Linux Build Service Account
fa90e1e422 Merge "hwc\overlay: Remove support for foreground override" 2014-08-23 07:58:50 -07:00
Ramkumar Radhakrishnan
4ec775f955 hwc: Add support for secure RGB layer
1. Detect and account the number of secure RGB layers present.
2. Mark secure RGB layers for MDP comp in cache based stratergy.
3. If full MDP comp and partial MDP comp fails, Mark secure RGB
   layers for MDP composition.
4. In partial MDP comp reject load based composition, if secure
   layer is present to avoid GPU composition.
5. Disable idlefallback feature if secure RGB layer is present
   to avoid GPU composition.

Change-Id: Idb4c4f09b081ec20240a2602aa3f20332fa49ad6
2014-08-20 11:32:47 -07:00
Linux Build Service Account
1127603e93 Merge "hwc: Remove external only feature related code" 2014-08-18 16:44:51 -07:00
Saurabh Shah
2c8ad05dcf hwc\overlay: Remove support for foreground override
Remove support for overriding a layer's z to set it up for foreground.
This is unused and can be achieved using pipes staged at required
z-orders.

Change-Id: Ia4688beed770c44c20d201a2dc5687252e002981
2014-08-15 13:27:46 -07:00
Ramkumar Radhakrishnan
3d863777c5 hwc: Remove external only feature related code
External only feature is completely handled in surfaceflinger, remove
unwanted code churn related to external only feature from display HAL.

Change-Id: If4f4f3fa8e91a5b8387e426b9e190abd2b06d793
2014-08-13 15:13:50 -07:00
Raj Kamal
bd3bdc6d03 hwc/overlay: Implement rotator caching
* A non-updating layer requiring rotation, can make use of
the older rotator buffer written when the layer got first
updated, rather than invoking a new rotator cycle.

* A rotator play is avoided in cases where incoming layer
buffer fd, offset, whf, src-rect, dst-rect, etc are similar
to that of the previous input layer to the rotator.

* For ex: In a usecase where video layer updates happen at
30fps and all other asynchrous UI updates happen at 60fps,
instead of the traditional 60 calls of rotator play per sec,
we now do only 30 thereby saving rotator bandwidth.

* Property "debug.rotcache.disable" can be used to disable
this feature.

Change-Id: I1d1c352c63007b7e0b4fee40882086ccd2f5a4aa
2014-08-13 01:31:49 -07:00
Linux Build Service Account
ee75c10fa6 Merge "overlay: Add support for rotator downscale" 2014-08-12 09:16:00 -07:00
Saurabh Shah
c46cf9d26b overlay: Add support for rotator downscale
Add support for rotator downscale. This is enabled from 8994 onwards
Constraints:
--Downscale should be a power of 2, max upto 32
--Both directions should have equal downscale
--{src_w, src_h} mod downscale = 0
--No BWC
--No Interlaced video support

The rotator's destination rect is modified to reflect the presence of
downscale. Any downscale calcs should be done only after adjusting
crop to meet rotator's requirements.

Smaller downscale is used if we need to chop off any more than 1
line or pixel.

Change-Id: Id07d62fefa3213035f16cca49497800716484a95
2014-08-08 10:19:18 -07:00
Raj Kamal
389d6e33d3 Limit #ROT-SESSIONS to 4 in LayerRotMap and RotMgr
* Limit the number of rotator sessions to 4 both in
LayerRotMap and RotMgr structures

* Make use of MDPVersion getter fuctions to check
for maxMixerWidth and maxDownScale supported by MDP

Change-Id: I27dac877807fbb4ed6fcb3500a3a318a2ef5d8b2
2014-08-08 09:11:09 +05:30
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