Commit Graph

383 Commits

Author SHA1 Message Date
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
Naseer Ahmed
7a7b66d1f0 display: Add HDMI CEC HAL
Implement the spec as per
hardware/libhardware/include/hardware/hdmi_cec.h

Change-Id: I02e1ba9deee1007b7e5922c363b9f5d6c6ad82a9
2015-03-02 14:54:49 -05: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
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
94b3741b1b Merge "hwc: Remove unused utility function" 2015-02-10 08:10:16 -08:00
Linux Build Service Account
81778e77cf Merge "hwc: Program default mode upon boot anim completion" 2015-02-09 16:47:08 -08:00
Tatenda Chipeperekwa
274a5d23f2 hwc: Remove unused utility function
Cleaning up unused code in utils library.

Change-Id: I642f78897fa317f34bdcdba4df84db10ad9f7eb3
2015-02-09 14:53:09 -08:00
Linux Build Service Account
011f59cb65 Merge "hwc: Rename two app buffer property." 2015-02-03 19:38:22 -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
4437029fe2 Merge "hwc: Use maximum mixer width supported to identify split display" 2015-02-01 14:29:40 -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
Ramakant Singh
b8369bf9a7 hwc: Rename two app buffer property.
Read only property will not work form HAL,
hence renaming it.

Change-Id: I7be4014908a955bb69e714556622d06c09318afa
2015-01-29 01:42:47 -08:00
Krishna Chaitanya Parimi
db992fd320 hwc: Program default mode upon boot anim completion
Default display mode needs to applied exactly on boot
completion. Hence we check for the exact instance of
boot completion by checking the property of boot
animation exit. We keep on checking till the property
is found to be set and program the default mode over
a dynamic link to libmm-qdcm.so

Change-Id: Ic68667a12e4058f29bc2203382baf59ef34ab038
2015-01-29 15:11:04 +05:30
Jeykumar Sankaran
dc76ba86aa hwc: Use maximum mixer width supported to identify split display
MDP pipe width should be used to find the number of overlay
pipes needed for configuring a hwc layer. Split display should
use the max mixer width supported by the H/W to check against display
resolution to detect split displays.

Change-Id: I76f97b33ea4a11270a6e33a3942bce0c4b4bae1f
2015-01-28 21:22:42 -08:00
Saurabh Shah
b85284ba72 hwc: 8992/8994: Disable BWC when HDMI is connected
8994/8992 don't support BWC with video mode panels in system.
Disable BWC when HDMI is connected.

Change-Id: I43616cc90bb2a518bae360af996889a75cc8c633
2015-01-27 10:54:52 -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
Arun Kumar K.R
ee4e239d25 hwc: Use dynamic_fps node from /sys/devices/virtual/
- With SELinux, the HAL should write to sysfs nodes from
  "/sys/devices/virtual/graphics" instead of "/sys/class/graphics"
- Change HAL to use that file path.

Change-Id: I867a1f94c8f13afe5bbbcb5a61f93599938210d9
2015-01-12 18:16:41 -08:00
Linux Build Service Account
e00c91fe5f Merge "hwc: Do not use BWC when layers are forced split" 2014-12-20 14:13:10 -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
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
Saurabh Shah
1a7262ae4d hwc: Do not use BWC when layers are forced split
In the configureSourceSplit() helper (nothing to do with SourceSplit
feature) BWC is being set in all rotator cases.

Remove that since we use that function when layers are forced split,
and we cannot have BWC.

Change-Id: I082005746f1a04766d10381412c399a8946e712d
2014-12-15 18:49:01 -08:00
Arun Kumar K.R
2225eaab7c hwc: Set HPD once at boot up
- HPD has to be set only once during boot up.
- This also helps in use case where HPD is turned off
  (on purpose)through by adb shell for power testing
  and on suspend/resume, it gets re-enabled.

Change-Id: I7bf6fdd08e719432029c5d6e5756685d36cdca43
2014-12-12 10:18:41 -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
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
Arun Kumar K.R
053dc5072b hwc: Add 60 progressive framerate to the table
Add missing 60p to the standard refresh rate table to avoid fps
fluctation b/w 59 and 60 while playing a 60 fps clip

Change-Id: I8cdc28a604ead0970e5cc6e8d64835b0c646e1d3
CRs-fixed: 755186
2014-11-25 10:08:11 -08:00
Linux Build Service Account
02d00237c3 Merge "hwc: Add secure display attribute" 2014-11-20 06:11:44 -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
9d7aa689b6 Merge "hwc: 8994: Disable BWC when HDMI intf is active" 2014-11-14 01:17:29 -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
Arun Kumar K.R
074c9cfdaf hwc: Add secure display attribute
- External displays can be secure or non-secure based on HDCP
- Propogate this to the SF with the getDisplayConfig
- Non-virtual displays(pri and hdmi) are considered to be secure
- For WFD using V4L2 archiecture, read the HDCP status from the
  sysfs and update accordingly

Change-Id: I4aaf303f0770201b8ca4f8a1c578bed61054bcfb
2014-11-13 04:32:14 -08:00
Saurabh Shah
9d6b6729d3 hwc: 8994: Disable BWC when HDMI intf is active
Due to h/w limitations hwc cannot use bwc when video-mode panels are
active in system. Disable bwc when HDMI intf is active.

For video-mode primary the driver disables the feature via
capabilities node.

Change-Id: I5b101dffe443a8ca2a508c6ca1b0966006bbe284
2014-11-11 14:20:23 -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
Jeykumar Sankaran
6a33952aa7 hwc: Consider orientation while checking a layer for scaling.
When a layer has 90 or 270 degree orientation flag set, the source buffer will be
rotated before MDP scales it up or down, if applicable. So while
checking the layer for scaling for configuration decisions in
HWC, we need to consider its orientation flags.

Change-Id: Ia35f5868eb0e4e47659484de28b14ae3560c18aa
2014-11-05 10:33:26 -08:00
Ramkumar Radhakrishnan
b8eb16d792 hwc: Add support for RGBA_4444 and RGBA_5551 formats
1. Modify gralloc library to allocate buffers for RGBA_4444 and
   RGBA_5551 formats
2. Modify copybit library to add composition support for RGBA_4444
   and RGBA_5551 layers
3. Modify hwc library to add MDP composition and rotator support for
   RGBA_4444 and RGBA_5551 layers.

Change-Id: I30dbc4e5e2c010835fa7e7663f996f67779a1803
2014-10-29 17:28:16 -07:00
Linux Build Service Account
734dbf5d5b Merge "hwc: Enable MDP rotation for GPU rendered RGB layers." 2014-10-29 09:21:09 -07:00
Arun Kumar K.R
33888f5b1f display: Add setSecondaryDisplayStatus API
- Clients(SecureUI/WFD FW) will use this API to set status of the
  Secondary display
- Status can be offline/pause/resume
- Secondary display will be hdmi/wfd, HWC will free up pipes for
  these displays

Change-Id: I25d5e070b60c38daeb102349bed14bb6de0a5684
2014-10-23 10:30:02 -07:00
Linux Build Service Account
b0481ecc53 Merge "hwc: Add support for HDMI as Primary display" 2014-10-22 15:59:05 -07: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
ebe2c491b3 Merge "hwc: Set full screen aspect ratio deviation within tolerance level" 2014-10-17 10:36:20 -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
96ace4bfec Merge "hwc: Avoid crash when debug.hwc.fbsize is reset to 0" 2014-10-17 03:14:20 -07:00
Linux Build Service Account
e319ffb89b Merge "hwc: Fix swap interval zero" 2014-10-17 03:14:18 -07:00
Tatenda Chipeperekwa
d80b6173b3 hwc: Add support for HDMI as Primary display
We are adding support for HDMI as Primary to the display HAL.
The HAL must be able to support boot-up use cases and cable
connect/disconnect events as follows:

1. Boot up with HDMI cable connected

   For this scenario we read the best mode supported by the
   HDMI TV and set that as the current and default mode for
   subsequent boot up.

2. Boot up without HDMI cable connected

   We read a default resolution from the driver by reading vscreen
   and reporting this as the display resolution to SF.

3. Switch the display to active state when we receive first frame

   When HDMI is primary we should rely on the first valid
   draw call in order to activate the display

4. Update handling of uevents when HDMI is primary

   a) Do not send hot plug when the cable is connected/disconnected.
   b) Use the correct display ID in uevents when HDMI is primary

5. Handle display timeout when HDMI is Primary

   When HDMI is connected as primary we clean up resources
   and call commit to generate a black frame on the interface.
   However, we do not call blank since we need the timing
   generator and HDMI core to remain turned on.

6. Clear pipe resource when HDMI is disconnected

   When HDMI is primary, we need to make sure that SF/HWC does
   not have any open fd's when the cable is disconnected.

   We clear all pipe resources and call a display commit to ensure
   that all the fd's are closed. This will ensure that the HDMI
   core turns off and that we receive an event the next time the
   cable is connected.

Change-Id: Ice70add583a3859f99bfa2e384fbbb6df4df92e1
2014-10-16 16:21:14 -07:00
Ramkumar Radhakrishnan
629cbf563a hwc: Enable MDP rotation for GPU rendered RGB layers.
Use MDP rotator to rotate GPU rendered RGB layers buffers, if the
buffer is not intended for secure display.

Change-Id: Id756f3f1561a32a5d404c45ea8846b2b907af56b
2014-10-16 11:49:21 -07:00
Ramkumar Radhakrishnan
812999a8d9 hwc: Set full screen aspect ratio deviation within tolerance level
1. Set tagged video layer to be full screen on external, if the
   deviation between aspect ratio of external and aspect ratio of
   video layer is within the tolerance level.
2. Set sys.hwc.windowbox_aspect_ratio_tolerance property to change the
   tolerance level.

Example:
   Set sys.hwc.windowbox_aspect_ratio_tolerance to 5 for +/- 5%
   tolerance level

Change-Id: I5b3e962dfa1c9fc19036e42cb4599d0490b04da9
2014-10-14 20:01:36 -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