Commit Graph

342 Commits

Author SHA1 Message Date
Linux Build Service Account
2ce22c9b76 Merge "hwc: Support for reading FB format from driver" 2015-03-23 00:01:28 -07:00
radhakrishna
c3198ff918 hwc: Support for reading FB format from driver
- Instead of assuming the default format(RGBA_8888),
  read FB format from driver and pass the info to SF
- For now, this is limited to primary and HDMI only.
  WB FBformat is assumed to be in RGBA_8888
- If FB doesn't have alpha channel, disable mixed mode

Change-Id: Iefc0080819749b541483ea47357bb37ec150c544
2015-03-19 15:27:03 +05:30
Jeykumar Sankaran
14d41a86b2 libqservice: Defer enabling partial update PP turns off
When client prefer to enable PU(partial update) over PP(post
processing), delay enabling PU until PP turns off its
features completely. This change introduces hand shaking flags
between PP and HWC through binder calls. When requested to turn
on PU, we notify PP through the sys_fs node. When PP is done
shutting off it features, it acknowledges back to HWC to actually
turn on PU.

Change-Id: I72008f2313b93497f55c0435367ef62cd772c2c4
2015-03-11 15:43:44 -07:00
Linux Build Service Account
0bb20fc378 Merge "hwc: Partial update support for dual DSI panels with source split." 2015-03-03 08:50:12 -08:00
Linux Build Service Account
09fdc2b36f Merge "display: Support for S3D video" 2015-02-28 13:07:07 -08:00
Jeykumar Sankaran
f7124b919f hwc: Partial update support for dual DSI panels with source
split.

1) When source split is enabled, both the panels are calibrated
   in a single coordinate system. So only one ROI is generated
   for the whole panel extending equally from the midpoint and
   populated for the left side.
2) Fixes a bug in mdpcomp where ROI generated for the frame is
   reset when a strategy fails.

Change-Id: I47fa0e827985dd76d06dcbe464ef832cfc57a671
2015-02-26 12:51:54 -08:00
Arun Kumar K.R
8b9270271f hwc: mdpcomp: Remove the perf lock acquire log message
Perf lock acquire would fail during the boot up as the perfd
service is not up yet.
Its harmless to remove these logs which cause false alarm

Change-Id: Id305f3122a77ebe70819e4b3edfaf405c3a87d70
2015-02-24 12:43:50 -08:00
Naseer Ahmed
6bbd0a14a5 display: Support for S3D video
1. Add support to set HDMI to 3D mode
2. Add binder API to force 3D mode
3. Switch to 3D mode based on metadata
4. Configure pipes appropriately
5. Only side-by-side and top-bottom formats are currently supported

Change-Id: Iae579ecfa45aae088ff543d4143e5025e8c682fa
2015-02-20 16:18:40 -05:00
Linux Build Service Account
ea51be6e5b Merge "hwc: Use 1 pipe if rotator downscale reduces dimensions" 2015-02-09 16:47:07 -08:00
Saurabh Shah
05f4e22484 hwc: Use 1 pipe if rotator downscale reduces dimensions
If rotator downscale is able to reduce output dimensions below
MDP's pipe limits, then use only 1 pipe if possible in source split
cases.

Change-Id: I6739a1fcd32b1047ce266d60c0123961c9daa657
2015-02-05 14:40:56 -08:00
Linux Build Service Account
505947c1c2 Merge "hwc: Partial update support for ping pong split." 2015-02-03 19:38:20 -08:00
Linux Build Service Account
1f595e5c76 Merge "hwc: Try MDP composition eventhough skip layer is present" 2015-02-02 03:33:22 -08:00
Linux Build Service Account
a1cb887cad Merge "liboverlay: Fix pipe priority mismatch on new allocations" 2015-02-01 14:29:41 -08:00
Jeykumar Sankaran
aedd143215 hwc: Partial update support for ping pong split.
ping-pong split needs source split to be enabled to stage two
pipes of a layer in the same Z order. This change adds partial
update support to generate ROI when source split is enabled.
When configured, ping-pong-split splits the layer mixer output equally
across two DSI's. To meet this limitation, the generated ROI is
adjusted to have equal widths from the panel mid point.

Change-Id: Ic307a1d5b902af9e352b0dfc6f5ab474ecd9c8a4
2015-01-30 15:56:08 -08:00
Raj Kamal
1179d9cf95 hwc: Try MDP composition eventhough skip layer is present
* Explore cachebased and loadbased composition strategies
eventhough skip layer is present in the layer list.

* Prioritize loadBasedComp over cacheBasedComp in such case.

* Invoke redraw of FB for every-frame as long as skip-layer
is present to comply with the spec.

Change-Id: If105ae8af4888a1e0b0fb824c526ef5a1adaedd8
2015-01-29 01:14:57 -08:00
Jeykumar Sankaran
89e23ab4cb liboverlay: Fix pipe priority mismatch on new allocations
With source split enabled:
1) When both LEFT and RIGHT pipes gets reused pipes, we use their
   pipe id's to compare their priority and swap them as needed.
2) When both LEFT and RIGHT pipes needs to be newly allocated, we
   let driver take care of the priority as long as both pipes are
   of same type. If different, we swap them according to the pipe
   type priority.
3) When LEFT is reused and RIGHT needs new allocation, we swap
   them only when they need same pipe type and LEFT has the
   pipe with lowest priority.
4) When RIGHT is reused and LEFT needs new allocation, we swap
   them only when they need same pipe type and RIGHT has the
   pipe with highest priority.

Change-Id: I320285aaca7ffc032e3b3b0832380a9c705bc4fc
2015-01-28 21:22:56 -08:00
Dileep Kumar Reddi
7399d5ca44 hwc: Reset ROI and avoid dirtyRect for video case
Reset ROI in when we are unable to proceed with full MDP comp.
Do not use dirtyRect for video use-cases to address some
corner cases

Change-Id: Id1ea6c1515f4441f0f35c0d08828e9c361bcbc86
2015-01-27 00:21:47 -08:00
Sushil Chauhan
65e26307e6 display: Add support for UBWC in display hal
1. Add support for UBWC allocation in the Gralloc APIs for aligned
width, aligned height and buffer size. A client can request for UBWC
allocation by sending UBWC specific HAL pixel format or by setting
GRALLOC_USAGE_PRIVATE_ALLOC_UBWC flag in the usage flags.

2. Gralloc allocates UBWC aligned buffer, only if format is supported
by GPU and MDP and no CPU usage flags are set. Otherwise it allocates
linear buffer.

3. If UBWC conditions are met, gralloc sets PRIV_FLAGS_UBWC_ALIGNED
in private handle flags to tell client that allocated buffer has UBWC
alignment. This flag remains unset by default.

4. Add helper functions in gralloc to calculate UBWC meta buffer size
for RGB* formats.

5. Add UBWC HAL pixel format HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS_UBWC
which has been defined by Video module.

6. Add AdrenoMemInfo api to query, if GPU supports UBWC for a format.

7.MDP driver expects UBWC specific pixel format defined by MDP header.

Change-Id: I5b4344bc90aa498dbdb7bb8100e70ed7728e6ea5
2015-01-16 11:00:01 -08:00
Linux Build Service Account
fc4d923177 Merge "libhwcomposer: Enable padding round for SMP failure" 2015-01-08 13:04:42 -08:00
Linux Build Service Account
3930ecae03 Merge "hwc: Modify MDPOnly composition to allow only secure RGB layers" 2015-01-07 19:37:40 -08:00
Tatenda Chipeperekwa
95675a747f hwc: Modify MDPOnly composition to allow only secure RGB layers
MDPOnly composition needs to cater for the use case when we have
secure RGB layers that require MDP composition. For non-secure RGB
layers we can afford to send them for GPU composition. This is
especially needed for the following use case: full MDP composition
on primary (including YUV layers), followed by external connection.
For the mentioned use case, we need to fall back to Video and then
GPU composition in in order to reclaim pipe resources for external
usage.

Change-Id: I6da3ca48cf6e38e767fecfbfee6b06e82ba00a51
2015-01-06 16:58:45 -08:00
Arun Kumar K.R
299bcda69c hwc: Add support for perf display hint
- Set the perf hint when there is only one updating layer, which helps
  in reducing cpu params and thus reduce power.
- This feature is enabled with the property persist.mdpcomp_perfhint,
  which is set to a positive value, which will be the window of frames
  before the perf hint is set

CRs-fixed: 765460
Change-Id: Ie21e1cd201afab16bedd3c750ea3b0230769969a
2015-01-06 13:50:45 -08:00
Justin Philip
37ab9a8a3f libhwcomposer: Enable padding round for SMP failure
SMP failure for video only composition should introduce
padding round to free up pipes.

Change-Id: I6fca32d53f1fc515ca4861d700566c7e02edeee5
2015-01-05 22:52:30 -08:00
Linux Build Service Account
9860611474 Merge "hwc: Release DrawLock before calling invalidate" 2014-12-20 14:13:11 -08:00
Linux Build Service Account
3f46890d0f Merge "hwc: Use max pipe width instead of max mixer width for splitting" 2014-12-20 14:13:08 -08:00
Linux Build Service Account
24ff9ca0c8 Merge "hwc: Set min panel refresh rate during idle timeout" 2014-12-20 14:12:56 -08:00
Jeykumar Sankaran
3930580bb3 hwc: Use max pipe width instead of max mixer width for splitting
Not necessarily the max width supported by the MDP pipe and mixer
need to be same. HWC has to make the decision for using one OR
two pipes per layer only based on the max width supported by the
pipe not the mixer.

Change-Id: I5a2495d07de1b6f54ef64d9140c909f0f4cef914
2014-12-18 12:03:11 -08:00
Raj Kamal
58b31a0a61 hwc: Release DrawLock before calling invalidate
Release Drawlock before calling invalidate to avoid
deadlock between caller thread and the draw thread.

Change-Id: Iddf9c3a554016d6493b336ec654f6f32bf57506a
2014-12-16 15:53:53 +05:30
Linux Build Service Account
2db6acb762 Merge "hwc: Handle idle fallback in corner cases" 2014-12-16 01:42:52 -08:00
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
Praveena Pachipulusu
47346c2aaf hwc: Handle idle fallback in corner cases
Handle idle fallback in mdpOnlyLayers and videoOnlyLayers
composition when the layers are non secure and non updating
for power optimization.

Eg: Idle fallback was not happening when video in pause mode
and layers are non updating.

Change-Id: If7c752074f405994e2cd145225ea409c5cabeec7
2014-12-10 13:59:10 +05:30
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