Commit Graph

412 Commits

Author SHA1 Message Date
Linux Build Service Account
0c719b9620 Merge "hwc: Limit BWC to content with height within 4092" 2015-06-16 08:21:40 -07:00
Linux Build Service Account
87b476742f Merge "hwc: Handle layers marked as PROTECTED flag as secure" 2015-06-13 19:51:06 -07:00
Linux Build Service Account
dfe1f63b41 Merge "hwc: Don't pass release fence to copy bit in mdp3" 2015-06-12 13:29:21 -07:00
Saurabh Shah
4b631b055d hwc: Limit BWC to content with height within 4092
Limit BWC to content with height within 4092, since this is a MDSS
requirement.

Change-Id: I82cd7212fc6c393b8b568abf2734a725a51d3cb0
2015-06-11 09:58:28 -07:00
Ramakant Singh
7e444beb71 hwc: Don't pass release fence to copy bit in mdp3
Copy bit in mdp3 uses frame buffers as destination surface,
hence no need to pass release fence to copy bit.

Change-Id: I6ff8d5cbbdd14e7c8d5e473ca0303505f6502cc5
2015-06-08 10:01:21 +05:30
Linux Build Service Account
056047432f Merge "hwc: Populate frame rate in rotator set" 2015-06-06 23:38:03 -07:00
radhakrishna
b8e2c95763 hwc: Populate frame rate in rotator set
- Populate frame_rate in rotator set, so that driver
  can vote for honest BW for rotator based on frame rate.
- If metadata contains source fps, frame_rate will be set
  to source fps, else it will be set to primary refresh rate.
- frame_rate will be populated for primary with
  source fps from metada, only when secondary is not active.

Change-Id: Icaacd0ed67ec09591d31868591680d2e86fe54a2
2015-06-05 12:30:33 +05:30
Arun Kumar K.R
7b1f152708 hwc: Handle layers marked as PROTECTED flag as secure
- All secure layers are marked with GRALLOC_USAGE_PROTECTED,
  irrespective of L1/L3, which should not fallback to GPU.
- In HWC, treat this layer as secure so that any fallbacks
  will be avoided.

Change-Id: I399740bfb5910f3fda4c4f395e2f7b49ea8619a9
Crs-fixed: 842071
2015-06-03 15:02:16 -07:00
Tatenda Chipeperekwa
748c96f7fb hwc: hdmi: Add support for action safe scaling for HDMI primary
Apply action safe scaling when HDMI is either the external or the
primary display.

Change-Id: I6de5d14e4d03beb59e81bed8ce96a64030c766f6
2015-05-19 11:42:12 -07:00
radhakrishna
fe1657032c hwc: Swap source dimensions for rotated layer
In downscale utility functions, swap source dimensions
for rotated layer.

Change-Id: If28c892d4720f9b102af8367947b9d5b3537dc78
2015-05-12 22:24:57 +05:30
Linux Build Service Account
bc64e1268d Merge "hwc: Avoid MDP comp for RGB downscaled layer" 2015-04-29 08:20:38 -07:00
radhakrishna
35e3307665 hwc: Avoid MDP comp for RGB downscaled layer
- In targets with fewer pipes, composition switch can happen
  continuously for a layer based on whether it is updating or not.
  If that updating layer requires downscaling, because of the
  difference in the downscale filters between MDP and GPU,
  the output of MDP and GPU will differ. This difference could be
  perceived as flicker. To avoid this flicker, mark RGB downscaled layer
  with downscale more than threshold to GPU always.
- property persist.hwc.downscale_threshold defines the threshold value
  for downscale beyond which the layer will be marked for GPU composition.

Change-Id: Ifd26d7eb1eff0096b0391a0552d0fd97386c1a19
2015-04-24 16:54:42 +05:30
Linux Build Service Account
c14b57f114 Merge "hwc: Trigger dynamic refresh-rate change for more usecases" 2015-04-14 08:04:14 -07:00
Raj Kamal
f8829b9a9a hwc: Trigger dynamic refresh-rate change for more usecases
* Until now it's been the case that refresh-rates were set to
the standard values of 24, 30, 48 and 60 for video playback
usecases. Since of the most panel vendors can only support
refresh-rates above 45, in many of the use-cases with fps < 45,
dynamic change in panel refresh rate doesn't happen.

* To address this, following are the changes done:
    1. Refresh-rate will no longer be limited to standard values
    for video-playback usecases and any value above the
    minfpsSupported which is advertised by the mdss driver will
    be considered.
    2. If the fps of the use-case is 'x' and it falls less than
    minfpsSupported, a multiple of it 'k*x' will be considered as
    the new refresh-rate, provided k*x < 60. If
    abs(k*x - stdRefreshRate) < 2, set the refresh-rate to the
    standard value rather than k*x.

* With the above two optimizations in place, if the panel has
a minfpsSupported value of 45, and if the use-case fps is 12,
the new refresh-rate would be set as 12 * 4(= 48) instead of 60
which had been the case.

* The above two optimizations will result in dynamic change in
refresh-rate happening more often, in local video and streaming
use-cases and will help in improving DOU(Days Of Use) metric.

Change-Id: I2051e4d91280867135bf592e8f561911adcb6228
2015-04-09 10:06:49 -07:00
radhakrishna
d750d00e20 hwc: Separate out hwc_sync into mdss and rotator functions
Separate out hwc_sync into hwc_sync_mdss and hwc_sync_rotator
functions.

Change-Id: I5f5a82971a42bd7e20b6382ac748518183a75a62
2015-04-08 17:12:59 +05:30
Linux Build Service Account
a27b05a8ff Merge "display: Add support for HW Cursor" 2015-04-04 16:58:54 -07:00
Arun Kumar K.R
00b84792b7 display: Add support for HW Cursor
- Retrieve cursor pipe info from driver
- Configure the layer marked with flag HWC_IS_CURSOR_LAYER to the
  HWCursor using the fb_cursor ioctl.
- The config happens only when it satisfies the hw limitions of
  cursor
- HWCursor is supported on primary display
- Since cursor configuration happens first, make use of drop
  layer/count to handle other composition strategies
- Add support for hwc_setCursorPositionAsync as per HWC 1.4

Change-Id: I8663b6da89b0c2dd9b48af96d64a433b2b8a302c
2015-04-01 11:25:36 -07:00
Zohaib Alam
83ea46d240 hwc: add qdcm service to be loaded in HWC and perform service
1. Add one binder command to display.qservice to serve the
    binder requests received from SDK.
 2. Each subcommand will be corresponding to one command
    handler. Command handler will pass the requests to
    qdcm library.
 3. Dynamically load qdcm library, where all apis are
    implemented.
 4. apply default mode function will be invoked once
    bootanimation event is detected

Change-Id: I28fdf5f2561fcaffbfd3b7a1e9b136a4c372300e
2015-03-31 14:00:57 +05:30
Nitesh Gupta
538e0f7f25 hwc: Apply Default Mode only after Bootanimation is really completed
Property "service.bootanim.exit" was read before applying Default
Mode. This property is set in SurfaceFlinger when boot finish is
triggered which is happening before Bootanimation is completed
which results into some of the Bootanimation frames with default
mode settings.

Replace this property with "init.svc.bootanim" which is checked to
be "stopped" before applying default mode. This results into first
frame of homescreen to be with default mode settings.

CRs-Fixed: 805499
Change-Id: I23298a8c61b9a5bda239839d9f8ca9ecc3a6ab59
2015-03-25 13:49:18 +05:30
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
Linux Build Service Account
a0feb96504 Merge "hwc: increase app buffers to 3 on 8909_512 increase the app buffers to 3 to improve the performance of the Ux scenarios." 2015-03-18 15:05:05 -07:00
Linux Build Service Account
5b4a18f358 Merge "hwc: Add support for panel resolution switch" 2015-03-14 08:49:40 -07:00
Linux Build Service Account
801e76c3b3 Merge "hwc: Return failure from hwc_device_open when fb open fails" 2015-03-09 17:15:58 -07:00
Saurabh Shah
90c55cfcf8 hwc: Add support for panel resolution switch
Add support for panel resolution switch. This feature makes use of
the Linux modedb feature that lists available modes in
/sys/class/graphics/fb0/modes and accepts a mode change when written
to /sys/class/graphics/fb0/mode

Clients can link to APIs exposed in display_config.h, these
internally resolve to binder calls into HWC. For debugging, mode
changes can be made over binder using shell commands.
adb shell service call display.qservice CODE ARGS
ARGS can include config index and display (only primary supported)

setActiveConfig():
adb shell service call display.qservice 25 i32 INDEX i32 0
getActiveConfig():
adb shell service call display.qservice 26 i32 0
getConfigCount():
adb shell service call display.qservice 27 i32 0
getDisplayAttributes():
adb shell service call display.qservice 28 i32 INDEX i32 0

Change-Id: I97d34cc9c0e521a3bd5c948eeea6d1e07db7b7ff
2015-03-09 14:50:01 -07:00
Linux Build Service Account
eac9935fe8 Merge "hwc: Rename app buffer count property" 2015-03-06 23:41:39 -08:00
Arun Kumar K.R
205df77ece hwc: Return failure from hwc_device_open when fb open fails
- When fb open fails during hwc initialization, it should be
  flagged as a fatal error and HAL should return error.
- Without this, the SF would make calls to HWC that would fail,
  and display being blank.

Change-Id: I20f08bdcb283d4805449c74a8214b871c2f1c80b
2015-03-04 15:56:25 -08:00
Ramakant Singh
be390c7907 hwc: Rename app buffer count property
Renaming app buffer count property based on
naming convention of android.
CRs-Fixed: 764611
Change-Id: Ic627668752542b797c6b1313adb1e1ca195c0609
2015-03-04 17:14:24 +05:30
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
Sanjeev Jakkilinki
f8bc0361f5 hwc: increase app buffers to 3 on 8909_512
increase the app buffers to 3 to improve the performance
of the Ux scenarios.

Change-Id: Ie413213baa7bbd6777f42e78842975852e34ea45
2015-02-26 18:54:34 +05:30
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