Commit Graph

312 Commits

Author SHA1 Message Date
Praveena Pachipulusu
66c8ef7b7f hwc: Set min panel refresh rate during idle timeout
Set minimum panel refresh rate during idle timeout for
power savings. Also handle dynamic refresh rate whenever
there is early return in prepare.

Change-Id: Ifb7b567adf47962789ee0cd1a97181cb53b53fd2
2014-12-15 13:11:36 +05:30
Linux Build Service Account
8921608ed8 Merge "hwc: Preserve dynamic partial update preference on framework reboot." 2014-12-12 04:36:38 -08:00
Linux Build Service Account
c18558644f Merge "hwc: mdpcomp: Use actual usable mixer stages from driver" 2014-12-10 13:02:41 -08:00
Jeykumar Sankaran
f4eb9fbedc hwc: Preserve dynamic partial update preference on framework reboot.
Dynamic partial update feature enabled post processing OR
partial update based on client preference. In case of framework
reboot, HWC needs to preserve the last set preference of these
features.

Change-Id: I4f53ac21f5404c7862d58248c86f23c45493f41b
2014-12-08 16:42:47 -08:00
Jeykumar Sankaran
53b05f2a95 hwc: Add binder API to control partial update
Expose binder API to control partial update dynamically. Partial
update feature cannot co-exist with post processing features
dependent on histogram data. With this API, OEM's can set their
preferences on these features on use case basis.

Change-Id: Iee3eaa1593e057b1a0b7d35e642352f7f02c460f
2014-12-05 16:40:30 -08:00
Saurabh Shah
2fd8a250f1 hwc: mdpcomp: Use actual usable mixer stages from driver
The driver now sends the actual usable mixer stages, so no need to
deduct the STAGE_UNUSED and STAGE_BASE.

Change-Id: I3690d10b5ccf83cab499871479768fcd5cdb2a4e
2014-12-05 13:49:53 -08:00
Linux Build Service Account
182a6a96b0 Merge "h/q/d: Add binder-api support to change refresh-rate." 2014-12-04 11:22:27 -08:00
Saurabh Shah
cad57777f3 hwc: Do not disable mdp comp on external based on primary resolution
Do not disable mdp comp on external based on primary resolution for
quality concerns. The app could still be rendering at a lower
resolution and disabling will cause performance issues in mirroring.

Use the newly added property persist.hwc.maxseclayers to restrict
mdp comp on external for desired devices.

Change-Id: I97ed575ef545890c1e71e2d8ab16130d04927b41
2014-12-03 19:00:44 -08:00
Raj Kamal
0d53fc6d29 h/q/d: Add binder-api support to change refresh-rate.
** Now, there are two ways for the clients to request
change in the refresh-rate of the target.
(a) Using metadata of the input-buffer.
(b) Using binder api added as part of this change.

** configureDynRefreshRate binder api provides three
op-modes which can be used as following:

(a) "DISABLE_METADATA_DYN_REFRESH_RATE" can be used by the
clients, to disallow display-hal from honoring refresh-rate
change requests, made by video-clients using the metadata.

For ex: This can be used during streaming use-cases
(Dash-playback, playback at WFD-sink,etc) where the idea
is not to change the refresh-rate, though video-client
requests for it using metadata, as video-clients cannot
distinguish between streaming and non-streaming usecases.

Usage:
adb shell service call display.qservice 18 i32 0 i32 0

(b) "ENABLE_METADATA_DYN_REFRESH_RATE" can be used by the
clients after DISABLE_METADATA_DYN_REFRESH_RATE, to once
again allow display-hal to be able to change refresh-rate
based on requests made by the video-clients using metadata.

For ex: This can be used by clients( Dash-playback,
WFD, etc) once they are done with their use-case.
WFD-framework will also use this when the wfd-session is
paused.

Usage:
adb shell service call display.qservice 18 i32 1 i32 0

(c) "SET_BINDER_DYN_REFRESH_RATE" can be used by the clients
to change the refresh-rate of the target using binder-api,
provided they have disallowed display from honoring the
refresh-rate requests made using metadata.

In other words, changing refresh-rate through this binder
api and using metadata approach cannot co-exist together.

Usage:
adb shell service call display.qservice 18 i32 2 i32 45
-- The refresh-rate set here will correspond to 45fps.

** Added property "persist.metadata_dynfps.disable" that
can be used by OEM's, to disable setting of refresh-rate
using the metadata.

Change-Id: I767fa174dcf1cfd061a578e96cd68af28e7dd36b
2014-12-04 08:20:32 +05:30
Saurabh Shah
acec8e48d2 hwc: Add support for configuring maximum mdp layers on secondary
Add support for configuring the maximum mdp layers on secondary
via persist.hwc.maxseclayers property. The default value is 1.

Move the check for max allowed layers to postHeuristicsHandling
rather than it being a part of strategies itself.

Change-Id: Icae6cb7e400fd95f60e0b3eb64e6b768e4dbd861
2014-12-01 14:06:53 -08:00
Dileep Kumar Reddi
72058b897d hwc: Deduce overlapping region from layers below PTOR layer
Use intersection of PTOR layer and the layers below it to
address usecases like
   * PTOR layer is not peripheral to the layers below it
   * Some layer/layers completely below PTOR layer

Change-Id: Ieb456a60df12cc2f5ad46fbbba2d99a16853278d
2014-11-18 22:28:07 -08:00
Linux Build Service Account
5deeaddb7b Merge "hwc: always_split: Use pipe clock comparison to mixer to split" 2014-11-15 03:57:36 -08:00
Linux Build Service Account
45fde5d8a5 Merge "hwc: Check for planeAlpha along with HWC_BLENDING_NONE" 2014-11-14 14:23:44 -08:00
radhakrishna
4efbdd6a0b hwc: Check for planeAlpha along with HWC_BLENDING_NONE
Check for planeAlpha along with HWC_BLENDING_NONE as the latter
is set if the layer is Opaque irrespective of planeAlpha value.

Change-Id: Iaee7efe662189ba3a2562f79c2d109da831ac94d
2014-11-14 03:52:01 -08:00
Linux Build Service Account
2ed441a5f3 Merge "hwc/qservice: Add support for toggling bwc over binder" 2014-11-14 01:17:28 -08:00
Dileep Kumar Reddi
d8e601d912 hwc: Disable mdpcomp for MDP3 targets by default
Change-Id: I00867d0e9ef9350ad09d29aa4e90c4e9e09e5fcc
2014-11-13 08:17:44 -08:00
Linux Build Service Account
dac844ed7d Merge "hwc: Add a new check for DMA state change" 2014-11-12 17:03:37 -08:00
Saurabh Shah
514759db1d hwc: always_split: Use pipe clock comparison to mixer to split
The layer clock is dependent on vertical downscaling and horizontal
dest width (pixels). When comparing to mixer's requirements,
line-time can be ignored since it is common to both pipe and mixer.
Also since mixer's scale is 1, layer's downscale * dest width needs
to be compared to mixer's width.

Change-Id: I6d28abc33f8a57a15101bf012b7706e163e2dc69
2014-11-12 16:28:01 -08:00
Saurabh Shah
cd01835997 hwc/qservice: Add support for toggling bwc over binder
Remove support for toggling BWC via property and add support to
toggle BWC over binder. This will take effect only on targets where
the driver enables BWC.

Example to disable BWC:
    adb shell service call display.qservice 17 i32 0
Where 17 is the code to toggle BWC, 0 to disable.

Change-Id: Ie534ab4643a72d47f5a985fe0b32e134bf0e7af3
2014-11-11 13:54:19 -08:00
Linux Build Service Account
e98a3d6b04 Merge "libhwcomposer: libgralloc Set MDP_SMP_FORCE_ALLOC flag" 2014-11-09 23:41:33 -08:00
Tatenda Chipeperekwa
dc8d708c35 hwc: Add a new check for DMA state change
Add a check to bail out of MDP composition in cases when we need
to switch the DMA state.

Change-Id: Iab3978df77d7f0e7cee28603189292504706c463
2014-11-05 20:59:37 -08:00
Jeykumar Sankaran
be93e27e44 hwc: Query MDP capability for blending stages supported.
- Read MDP sys_fs node for blending stages supported per mixer
  instead of hard cording the value. This makes the implementation
  scalable across chipsets.
- Add binder support to change the max pipes per layer value
  dynamically for MDP comp.

Change-Id: I3b83f4bdc2e2e81ca55c54fc6bcfd61c55fef501
2014-11-05 10:34:50 -08:00
Justin Philip
d616660fe6 libhwcomposer: libgralloc Set MDP_SMP_FORCE_ALLOC flag
For PROTECTED but NON SECURE layers set MDP_SMP_FORCE_ALLOC flag
to allow SMP allocation and prevent GPU fallback
In Such cases if video resolution changes dynamically
it fails to display layer due to GPU fallback.
Use this flag for FB layer composition and depricate
MDP_BACKEND_COMPOSITION flag.

Change-Id: I9ab7cbdd2e12b56dfa67d5b4b3ff6b2dcd0096be
2014-10-21 21:34:30 -07:00
Linux Build Service Account
7f84f96e22 Merge "hwc: Refactor windowboxing feature" 2014-10-17 10:36:19 -07:00
Linux Build Service Account
650ba1960a Merge "hwc: Support for windowboxing feature on external" 2014-10-17 10:36:08 -07:00
Linux Build Service Account
f31fd02ea0 Merge "hwc: memset dropArray when changing refresh rate" 2014-10-17 03:14:17 -07:00
Ramkumar Radhakrishnan
b33f490b2f hwc: Refactor windowboxing feature
1. Remove AIV video mode composition stratergy and reuse video only
   composition stratergy to achieve the same functionality.
2. Drop all non AIV layers from the external list at the start of MDP
   composition prepare and fall back to video only composition.

Change-Id: I34760e2df57cfbb923a6be0182e632c9ddd6aa07
2014-10-14 19:56:52 -07:00
Ramkumar Radhakrishnan
9d7bc31a00 hwc: Support for windowboxing feature on external
1. This feature is targeted to remove any window/pillar boxing on
   external display when zoom mode is enabled.
2. Preserve the aspect ratio of the external display by cropping and
   upscaling the tagged video layer during video playback on external.
3. User can tag the layers to be displayed on external display.
4. Set sys.hwc.windowbox_feature to true to enable this feature

Assumptions & Limitation:
    1. Tagged layers for external display will also be displayed on
       primary display along with untagged layers
    2. When zoom in mode is enabled, source crop left and source crop
       top of a tagged video layer is always assumed to be set to
       positive integer value. So pinch zoom feature or zooming in top
       left corner of the video use case cannot be supported.
    3. Except tagged video layers, all other tagged UI layers will
       use GPU for composition on external display, So all tagged UI
       layers cannot be secure layer.
    4. Rotation animation cannot be supported for this feature.

Change-Id: I8b934cf616ec23b4359d0120f9a291178a2781c6
2014-10-14 19:54:32 -07:00
Raj Kamal
18e946ef99 hwc: memset dropArray when changing refresh rate
memset dropArray and set dropCount to 0 before proceeding
to identify if refresh rate needs to be changed. Not doing
this will result in dropCount containing junk value which
will impact mdpCount. This prevents us in changing refresh
rate in cases where it could be changed.

Change-Id: I4081062157620ca0dc0b4a6fed0689b2869efb91
2014-10-14 14:39:03 +05:30
Linux Build Service Account
96da83a12b Merge "hwc: Partial Update for MDP3 targets" 2014-10-10 06:26:06 -07:00
Linux Build Service Account
d01357a76a Merge "hwc: Enable PTOR for 8x16 and 8x39 devices by default" 2014-10-09 08:11:11 -07:00
Dileep Kumar Reddi
4070e93e1e hwc: Partial Update for MDP3 targets
Enable partial update for MDP3 targets.
Use computed ROI of mdpcomp in copybit
to avoid composition of layers outside ROI.

Change-Id: I4b23fd48cac814f8c35a3c01253dca8c297036f9
2014-10-08 01:08:56 -07:00
Linux Build Service Account
dd9101aec9 Merge "hwc: No idle fallback for single layers" 2014-10-07 21:21:22 -07:00
Saurabh Shah
59562ffb03 hwc/qdutils/qservice: Add dynamic idle timeout support
Add support for dynamically setting idle timeout values.
Move default idle timeout setting to IdleInvalidator.
Fix static var naming, handle errors from IdleInvalidator in hwc.
Property debug.hwc.idletime is removed with this change.

Example:
1) Set idle timeout to 100ms
adb shell service call display.qservice 16 i32 100
16 is the code for SET_IDLE_TIMEOUT, 100 is time in ms

2) Disable idle timeout
adb shell service call display.qservice 16 i32 0

Change-Id: I60e15a3ac869b4e9f4015b3be50a35c90d00d404
2014-10-03 10:53:31 -07:00
Linux Build Service Account
6df359bc75 Merge "hwc: Fix src split bugs" 2014-10-02 15:59:52 -07:00
Naseer Ahmed
96bb778950 hwc: No idle fallback for single layers
There is no need to do idle fallback if there's only one layer
being composed.

Change-Id: I0a4e0c7af66b750c1ebd31779175168613a280ce
2014-09-30 14:43:13 -04:00
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
Saurabh Shah
189f23d621 hwc: Fix src split bugs
--In "always_split" mode, split FB only if the updated portion of
FB's width is less than mixer width

--While deciding whether or not to allocate the 2nd pipe, account
for 90 transform in crop width

--Crop minimum width limitation of at least 5 pixels does not apply
to targets after 8974 v2.

Change-Id: I83b4690216a75c0d57e7e4e7b18b4531bb22df05
2014-09-29 14:50:33 -07:00
Naseer Ahmed
9eb5e09577 display: Fix warnings
Treat warnings as errors again

Change-Id: Ibd7f484d31ad420b85e82fd5183d70bf7dce4bfa
2014-09-25 16:11:15 -04:00
Dileep Kumar Reddi
c6ef347816 hwc: Enable PTOR for 8x16 and 8x39 devices by default
Change-Id: Ic12f721194155c7ae103d4ab9d84855f18d56dd3
2014-09-25 23:15:40 +05:30
Linux Build Service Account
b8173300fa Merge "display: Add support for dynamic refresh rate" 2014-09-20 13:38:37 -07:00
Linux Build Service Account
b803e4c13e Merge "hwc: vd: Add support for Dynamic Resolution Change (DRC)" 2014-09-18 18:36:45 -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
4ecfb281c3 Merge "hwc: Fix PTOR for overlapping PTOR regions." 2014-09-15 00:04:11 -07:00
Linux Build Service Account
d6a3a5e94a Merge "hwc: Release non VIG pipes during padding round and HDMI configure" 2014-09-13 13:29:44 -07:00
Linux Build Service Account
a7dcd9f7b8 Merge "hwc: Moving error log to debug log for non-fatal error" 2014-09-10 18:55:02 -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
f26fe9ebdb hwc: Release non VIG pipes during padding round and HDMI configure
1. Fall back to video only composition instead of full GPU composition
   to release all pipes assigned to RGB layers for primary display
   during external configuration and padding round. Do this only for
   the target which has total number of pipes >= 8.
2. This resolves blinks when HDMI is connected during secure video
   playback usecase.

Change-Id: I6cf3a20c3eb3c2b82ad6c70eba84292cf59ecf26
2014-09-10 13:56:21 -07:00
Prabhanjan Kandula
9889a20f78 hwc: Fix PTOR for overlapping PTOR regions.
If two PTOR layers are overlapping, remove overlapping
region from bottom PTOR layer if possible to reduce total
overlapping layers in a region.

Change-Id: I695c097360ac5a8fa123e014f21380169519eb32
2014-09-10 18:21:12 +05:30