Commit Graph

1267 Commits

Author SHA1 Message Date
Manoj Kumar AVM 23ce176960 hqd: Fix validate and prepare frame for virtual displays
Extend validate and prepare frame functionality for
virtual displays.

Change-Id: I266f35d8581ac2de04c5ce22e51b267a48955e46
2014-02-11 17:39:35 -08:00
Linux Build Service Account 1652fde949 Merge "hwc: mdpcomp: Remove pipe estimation blocks" 2014-02-11 05:20:35 -08:00
Linux Build Service Account a3e2ef4437 Merge "libqservice: Use correct typecast in QService" 2014-02-11 05:19:24 -08:00
Linux Build Service Account fb068ef54e Merge "hwc: Add support to query max. supported WriteBack width" 2014-02-11 05:19:09 -08:00
Arun Kumar K.R 78c9dd7b10 libqservice: Use correct typecast in QService
Change typecasting from status_t to android::status_t as it requires
the caller to be in android namespace.

Change-Id: Ib5f21874bc691fe1bd5cb7a34d7a2de54a8cbe44
2014-02-10 12:04:27 -08:00
Linux Build Service Account 6f0fcc0e45 Merge "h/q/d: Add missing ASTC format" 2014-02-09 19:08:39 -08:00
Linux Build Service Account 223589679e Merge "hwc: Reset FB Z order to -1 instead of 0" 2014-02-09 19:08:38 -08:00
Linux Build Service Account b9e32ec898 Merge "hwc: hwc_sync - populate correct fences for BLIT" 2014-02-09 19:08:31 -08:00
Saurabh Shah 770cfba765 hwc: mdpcomp: Remove pipe estimation blocks
Pipe estimation was necessary when the unavailability from overlay
led to GPU fallback.
With the new design, hwc uses the next best strategy, so failure
to grab a pipe from overlay is ok.

Change-Id: Id20d2e6fd24aeb5af3ab84ec9dd8c52f6bbbef8b
2014-02-07 16:09:55 -08:00
Raj Kamal 03514577d0 Invoke a padding round in certain use-cases.
* In some use-cases, it is possible that there are
no AppBuffer layers on the external/virtual layer-list
during which all the pipes will be allocated to the
primary. When layers do comeup on external/virtual
layer-list, subsequent overlay sets fail.

* This change ensures that in such cases, we invoke a
padding round on all the displays to free up the
hw resources which can be used in subsequent cycles.

Change-Id: Ifac0b8f51a8719eb55b11010d05b8d11352db054
2014-02-07 16:20:10 +05:30
Linux Build Service Account 4f5017a874 Merge "hwc: vds: Display HAL changes for VDS based solution" 2014-02-06 06:20:39 -08:00
Linux Build Service Account 03eecbbb3c Merge "hwc: vds: Configure WB as secure if output buf. handle is secure" 2014-02-06 06:20:38 -08:00
Linux Build Service Account 9be1bf9519 Merge "gralloc: Set default value for implementation defined formats" 2014-02-06 06:20:37 -08:00
Linux Build Service Account dae66008d9 Merge "hwc: vds: Add support for black frame generation on PWR suspend" 2014-02-06 06:20:37 -08:00
Jeykumar Sankaran 017007fd0c h/q/d: Add missing ASTC format
Adds support for Khronos format COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR

Change-Id: I2ca2c548cbcca0c56f28d2158cb5a0d01a326f0f
2014-02-05 15:23:40 -08:00
Linux Build Service Account eb64200bcd Merge "hwc/overlay: validate and prepare frame" 2014-02-05 14:02:39 -08:00
Saurabh Shah 2b59168391 hwc: Reset FB Z order to -1 instead of 0
In Video-only mode FB Z-order of 0 was being used, incorrectly,
because the value was reset to 0 and wasn't changed subsequently.

Reset to -1 to prevent this. Any MDP comp strategy that needs to use
FB should set it's Z order appropriately.

If cache based mode has no MDP comp layers, fail so that other
strategies can be used, rather than succeeding with FB Z as 0, which
will at most allow GPU comp to be used.

Change-Id: Ifdae2cd5f8d8ff0e10447b1fed6ee1671260f311
2014-02-05 11:59:38 -08:00
Linux Build Service Account a144c5a84b Merge "hwc: resolve compiler warnings" 2014-02-05 11:40:45 -08:00
Balamurugan Thanikachalam e3d4aadbee hwc: hwc_sync - populate correct fences for BLIT
Previously, the acquire and release fences for BLIT
composition were populated using same logic as Overlay,
but BLIT composition consists of separate BLIT step
before screen refresh, and app buffers are no longer
required after BLIT. So holding the buffers for both
the steps is unnecessary and impacts performance.

This change adds condition for BLIT in fence population
logic in hwc_sync and populates the right fences for the
App Buffers and Display Refresh during BLIT composition.

Change-Id: I9998a7052c0375acb32a174bdf0469d2a88f79e8
2014-02-05 14:18:59 +05:30
Saurabh Shah c401d189bc gralloc: Fix getSize and getAlignedWidthAndHeight
getSize was incorrectly modifying aligned height and allocating
a buffer of lesser than expected size.

All alignments should be done in getAlignedWidthAndHeight so as not
to break the GRALLOC_PERFORM functions.

getSize()'s return type is unsigned, but a signed value is returned.
Instead on error, a size of 0 should be reported.

Change-Id: Ifae5e758de8e689701cd43892324ccc0140675cd
2014-02-04 13:22:38 -08:00
Tatenda Chipeperekwa 9ecc065679 hwc: Add support to query max. supported WriteBack width
Adds a query to provide maximum supported WriteBack width.

Change-Id: I2f3f2ca1f7783394bd05e860e846dab504dbe071
2014-02-03 15:16:15 -08:00
Tatenda Chipeperekwa 5542995aa2 hwc: vds: Display HAL changes for VDS based solution
1.  Hard code the vsync for VDS during the first prepare call
    with valid VDS display. We align the vsync period to that
    of the primary display. Effectively, we produce at the at
    the primary refresh rate and do not worry about the consumer.

2.  Do not bail out on the first frame as it leads to showing empty
    buffer. This leads to failures for some test cases such as those
    run in CTS.

3.  We need an FB layer handle check to cater for this usecase:
        i. Video is playing in landscape on Primary
        ii. Launch ScreenRecord app
    In this scenario, the first VDS draw call will have HWC
    composition and VDS does not involve GPU to get eglSwapBuffer
    to get valid fb handle.

Change-Id: Idc7d989e244a83ad28ce730ecb12955bc249dc25
2014-02-03 15:16:15 -08:00
Tatenda Chipeperekwa b3bdc6efe6 hwc: vds: Configure WB as secure if output buf. handle is secure
When we receive a buffer handle that is secure, we configure WB as
secure; otherwise we continue as normal.

Change-Id: I497e257352c103c5da7ac2dc3fd4d7fe0e0b3953
2014-02-03 15:14:15 -08:00
Saurabh Shah 1029ad2b12 hwc/overlay: validate and prepare frame
Send the entire frame (array of overlays) to driver, so that it would
check pipes params and the whole frame wrt bandwidth and SMP.

Now, the overlay's commit API just prepares an overlay object but
makes no ioctl calls.

If the driver finds the frame, as a whole, to be not ok, the
validation fails and overlay/hwc return silently.

If a certain overlay object is mis-configured or pipes are
unavailable, the driver sets the number of objects it processed.
Overlay uses this to dump the incorrect config.

Change-Id: Ifb2b7fadc6bd6d9d94a35ba3908fbd832f41447f
2014-02-03 12:58:46 -08:00
Manoj Kumar AVM 80a6a8a602 gralloc: Set default value for implementation defined formats
For implementation defined formats which go via HWC, set the
default value to RGBA8888

Change-Id: I7f8c46bc47746dcf1c4a03438b8f93d7bab78bb1
2014-02-03 12:51:04 -08:00
Tatenda Chipeperekwa 5f3876753d hwc: vds: Add support for black frame generation on PWR suspend
If VDS is connected, do not clear WB object as it will end up
detaching IOMMU. We need to keep the WB session active in order
to send a black frame to WFD sink on power suspend.

For AD use case, we will keep the WB object active.

Change-Id: Ic6db255676ca0baafd468887fc3f88eafc581cea
2014-02-03 12:50:56 -08:00
Arun Kumar K.R 404047f2c6 hwc: resolve compiler warnings
- remove unused variables.
- fix incorrect castings.

Change-Id: I7661edb4539a3ffc7d4aedbb9f633bc5ba1dc149
2014-02-03 09:20:36 -08:00
Linux Build Service Account 2bbbc1c346 Merge "hwc: Request RGB pipe only if layer needs scaling." 2014-02-02 23:05:35 -08:00
Linux Build Service Account 350acbbae6 Merge "liboverlay: remove warnings during compilation" 2014-02-01 20:44:11 -08:00
Linux Build Service Account ce0d69e944 Merge "display: remove compile time warnings" 2014-02-01 20:44:10 -08:00
Linux Build Service Account f178201864 Merge "liblights: fix compiler warnings" 2014-02-01 20:44:10 -08:00
Linux Build Service Account 92188e2761 Merge "qdutils/qservice: fix compilation warnings" 2014-02-01 20:44:09 -08:00
Linux Build Service Account fef8bfd2ff Merge "h/q/d: Consider dropped layers in load based MDP comp" 2014-02-01 18:01:38 -08:00
Linux Build Service Account 5489e11d5f Merge "hwc: vpuclient: vpuClient implementation" 2014-02-01 10:14:50 -08:00
Linux Build Service Account 99bf5cc3b0 Merge "gralloc: Add support for ASTC formats" 2014-01-31 18:14:34 -08:00
Zohaib Alam b0f5e47fdc hwc: vpuclient: vpuClient implementation
Vpuclient is the client side for VFM in hwc. It follows the
similar pattern of prepare and draw. It has 2 step prepare
including: setVpuSession and prepare. The setVpuSession function
passes all the layers from the SF list to VFM, which marks
the layers that it can support. After this, the layer
allocation/configuration is done, and finally in prepare the
allocated pipes are passed down to VFM. The draw function
passes the handle to the VFM to draw the video layer.

Change-Id: I5d8795de35ed98716f7fa4cd48506b488cb3cb5d
2014-01-31 14:59:19 -05:00
Arun Kumar K.R fbda988d29 liboverlay: remove warnings during compilation
- Remove unused variables
- Use proper typecast

Change-Id: Ia60fc4c3c7ec39a1df4a780de7f5d75d723f7960
2014-01-31 11:40:03 -08:00
Arun Kumar K.R c150373713 display: remove compile time warnings
- remove unused variable in libexternal.
- make use of all variables in memtrack.

Change-Id: I67b34428f4a976327e4e9dcd6fd7dfb9063b969c
2014-01-31 11:40:03 -08:00
Arun Kumar K.R 300ec7788a liblights: fix compiler warnings
- Use unused variable dev in the module
- remove unused local variables

Change-Id: Icb0cc033023640fd785abce9d00b467978500396
2014-01-31 11:40:02 -08:00
Arun Kumar K.R 0de84c9119 qdutils/qservice: fix compilation warnings
- fix incorrect type casting.
- remove unused variables.

Change-Id: I4d21fe895b048a9dcb7c43297d44b041ba42d735
2014-01-31 11:40:02 -08:00
Jeykumar Sankaran e4ce4d8657 h/q/d: Consider dropped layers in load based MDP comp
While batching up layers for load based MDP composition, filter
out dropped layers.

CRs-Fixed: 607196

Change-Id: I78031f1094330e1d960ceb56d5441c27a041e48c
2014-01-31 10:33:56 -08:00
Linux Build Service Account d706f8d618 Merge "hwc: Dynamic Resolution support on Primary" 2014-01-31 05:11:59 -08:00
Linux Build Service Account b041f79556 Merge "hwc: vpu: Added a new flag to indicate VPU pipe" 2014-01-30 21:20:16 -08:00
Naseer Ahmed 926f26b90c gralloc: Add support for ASTC formats
This change adds support for Khronos standard ASTC formats.

Change-Id: I6963f2ed82b5f179ed8627022746deec02ff826a
2014-01-30 12:56:37 -08:00
Linux Build Service Account 103947832b Merge "h/q/d: Drop layers from composition on NULL ROI." 2014-01-30 07:23:36 -08:00
Linux Build Service Account 5989998af7 Merge "hwc: Drop alpha from writeback" 2014-01-30 07:23:28 -08:00
Linux Build Service Account c979900d0a Merge "Set priority among various display devices" 2014-01-30 07:20:51 -08:00
Jeykumar Sankaran f74196ba20 h/q/d: Drop layers from composition on NULL ROI.
While optimizing layer list for composition, drop the layers
blindly on encountering NULL ROI.

CRs-Fixed: 605482

Change-Id: Ib81f43e8f34d140e6222135f3caa9491cdbbd41e
2014-01-29 10:57:42 -08:00
Dileep Kumar Reddi f2a7cdb337 hwc: Dynamic Resolution support on Primary
* Useful to estimate GPU/MDP performance for different resolutions.
    * MDP:
      Every layer is downscaled/upscaled to primary panel resolution.
    * GPU:
      All layers will be composed in required resolution to FB.
      FB is downscaled/upscaled to primary panel resolution.
    * Steps to follow:
          step 1: adb root
          step 2: adb shell setprop debug.hwc.fbsize XRESxYRES
          step 3: adb shell stop
          step 4: adb shell start

Change-Id: I82a032df87c91549c49a9cdbd981ff02f105ff2e
2014-01-29 16:39:03 +05:30
Linux Build Service Account 757aba6d70 Merge "hwc: Add type casting to aspect ratio calculations" 2014-01-28 23:37:54 -08:00
Linux Build Service Account 12502319e5 Merge "qdutils: idle_invalidator: Use fixed timeout rather than range" 2014-01-28 23:35:43 -08:00
Zohaib Alam a9776b10e3 hwc: vpu: Added a new flag to indicate VPU pipe
Added a new layer flag: HWC_VPU_PIPE to indicate that the layer
will be drawn by VPU. There is a corresponding MDP pipe
flag: MDP_VPU_PIPE, which should be set for the VPU layers to
indicate the layer will be drawn by VPU, so that MDP driver does
the appropriate settings to allow this process.

Change-Id: I61270aca633bb831bf34d413877bf925a3d2ac37
2014-01-28 19:49:09 -05:00
Raj Kamal 4c087a193c Set priority among various display devices
* When a non-WFD virtual display device (SSD/
screenrecord) is active along with
non-hybrid WFD solution(WFD faked on
external), give preference to non-hybrid WFD
device over non-WFD virtual display device.

* This is needed only in cases when WFD is
enabled via v4l2 rather than using VDS api's.

Change-Id: I63e53baa214bdcdac19430ca30b939cdd7416cbb
2014-01-28 16:26:23 +05:30
Linux Build Service Account 2ca82065e2 Merge "libmemtrack: Fix compilation warning error" 2014-01-28 01:18:00 -08:00
Linux Build Service Account 6f17ca16b1 Merge "display: 64-bit cleanup for logs" 2014-01-28 01:17:44 -08:00
Tatenda Chipeperekwa f3d8323bcf hwc: Drop alpha from writeback
The alpha in the writeback is unused right now. Force MDP to use
RGBX for composing writeback.

Change-Id: I3d92338ced8bb98fd0515107d84c306992a3c133
2014-01-27 16:12:41 -08:00
Colin Cross 2a7ccaaa82 libmemtrack: Fix compilation warning error
Also fix a compile warning by replacing enum with int in the
getMemory function.

Change-Id: Ic4bbba425486bb7f456e928968afa5f2b04ca7ea
2014-01-27 12:26:41 -08:00
Linux Build Service Account b16e040533 Merge "hqd: Enable triple display support on 8084" 2014-01-27 11:39:26 -08:00
Linux Build Service Account ac167c7115 Merge "hwc: disable MDP composition on Secondary display" 2014-01-26 22:59:26 -08:00
Linux Build Service Account e901f318e4 Merge "hwc: virtual display: Use outbuf handle width to configure xres" 2014-01-26 22:59:23 -08:00
Linux Build Service Account 8613247c71 Merge "Copy virtual display FB to outbuf even with no app layers" 2014-01-26 22:59:22 -08:00
Linux Build Service Account a8dcd0c8a8 Merge "hwc: Common Display HAL to support VDS & V4L2 WFD solutions" 2014-01-26 22:59:21 -08:00
Linux Build Service Account 14e499a8c6 Merge "h/q/d: Consider dropped layers while calculating FB z-order" 2014-01-26 05:19:29 -08:00
Arun Kumar K.R 7271562e26 hwc: Get the retire fence from the MDP driver
Get the retire fence separately instead of duplicating the
release fence.

Bug: 9319776
Change-Id: Iacb773c2d94f635e27a7b355d399cb2e36dac2a5
2014-01-24 16:37:10 -08:00
Saurabh Shah 3e051aac17 qdutils: idle_invalidator: Use fixed timeout rather than range
Currently the idle timeout is in a range from idle_timeout / 2
to idle_timeout, since we didn't need precise values.

Change this to a fixed value using timestamps, because the timeout
is too low and warrants precision.

Change-Id: I9cec1db7f1d7fda2996ab80449c61269915f6be4
2014-01-24 13:35:48 -08:00
Linux Build Service Account 48baa45a71 Merge "libgralloc: Export header files - alloc_controller.h, memalloc.h" 2014-01-24 11:45:08 -08:00
Manoj Kumar AVM 0d5be37208 hqd: Enable triple display support on 8084
8084 supports triple displays concurrently. Primary, HDMI and WFD
can be active at a given instant.

WFD use V4L2 approach. This feature works if WFD is initiated via
settings app and not with wfd-client apk as wfd-client
use HDMI hotplug approach.

Change-Id: I9160ed83b1babe939305b0f238c8e0a8a7c51d07
2014-01-24 10:56:44 -08:00
Tatenda Chipeperekwa 27bf8b36aa hwc: Add type casting to aspect ratio calculations
Type casting to float prevents rounding off errors which could
result in invalid or unexpected results when doing calculations
with integers.

Change-Id: I6d5c233c013322c4e9c7f7db61b5c604f915643c
2014-01-23 17:51:16 -08:00
Tatenda Chipeperekwa 04e803bb62 hwc: virtual display: Use outbuf handle width to configure xres
Use outbuf handle width to configure display xres, since that would
have the necessary alignment. The outbuf is guaranteed to be valid
by the framework during hwc_prepare.

We use the framebuffer layer's display frame to obtain the actual
width. For example, the actual width could be 720 but the aligned
width would be 736.

Change-Id: I5afe38001be8116e1ad6a9f46c7ecaa50b5f25a2
2014-01-22 11:49:03 -08:00
Tatenda Chipeperekwa d7118ba436 Copy virtual display FB to outbuf even with no app layers
In the current composition strategy we bail out if there are no app
layers present. However, this leads to undesirable behaviour if the
FB contains valid data that is expected as output. In this patch we
copy the FB to the output buffer to satisfy this use case.

Change-Id: If905d8b0652faf73b9aecad1abc760f21967807f
2014-01-22 11:48:54 -08:00
Prabhanjan Kandula 319d015341 hwc: Request RGB pipe only if layer needs scaling.
For high FB resolutions do not specify required
pipe type unless a specific pipe is needed. This
makes RGB pipe available for FB in GPU fallback
scenarios because of SMP failures.

Change-Id: Ib52029aa276b5736d46a48489d280e7f65de2eab
2014-01-22 23:01:45 +05:30
Ramkumar Radhakrishnan 140ee64111 hwc: Common Display HAL to support VDS & V4L2 WFD solutions
1. Define classes for VDS and V4L2 based WFD solutions.
2. Overload the functionalities for VDS and V4L2 WFD solutions.
3. Instantiate VDS object or V4L2 object during hwc init based on the
   property persist.hwc.enable_vds set by the user.
4. VDS solution is not verified as it requires some dependent changes.

Change-Id: I74bf944d532da138c850d4ec0c20b4a881489efa
2014-01-21 18:41:04 -08:00
Arun Kumar K.R 69f90bdd13 hwc: disable MDP composition on Secondary display
- Do not use MDP composition on secondary disp when the primary
  is a high resolution panel.
- MDP would use decimation on secondary and on fall back it uses
  GPU, which could lead to quality mismatch

Change-Id: I4c92df89563de6c8387eaaaa5f450ad7cc09b647
2014-01-21 16:41:46 -08:00
Linux Build Service Account 1a0a179301 Merge "hwc: RGB888 is considered as a VIDEO type" 2014-01-21 12:34:06 -08:00
Jeykumar Sankaran eeeb833405 h/q/d: Consider dropped layers while calculating FB z-order
While batching in partial mdp composition, calculate FB batch
z-order after dropping the z-order of dropped layers lying below.

Change-Id: I92752f67e797a834aae6a575af2f8fa42c9c0911
CRs-Fixed: 601614
2014-01-20 23:00:30 -08:00
Linux Build Service Account 65442bc0f3 Merge "display : change wormhole calculation for swap rect" 2014-01-20 05:39:31 -08:00
Linux Build Service Account 8ba221e06a Merge "qdutils: Use HW revision from linux header if available" 2014-01-18 05:08:23 -08:00
Linux Build Service Account a7fc5f1382 Merge "h/q/d: Optimize layer rects on sourceCropf" 2014-01-17 16:41:47 -08:00
Linux Build Service Account f7ad1a3b9d Merge "h/q/d: Check for MDP upscale limitations" 2014-01-17 08:05:25 -08:00
Linux Build Service Account bc9749f04b Merge "hwc: Set default idle timeout to 70ms" 2014-01-17 08:05:12 -08:00
Ajay Dudani c9941932c0 display: 64-bit cleanup for logs
Use PRId64 instead of %lld for printing long long types.

Change-Id: I7a89ff91fd592c439d701534245671c018b5ac99
2014-01-16 18:27:56 -08:00
Saurabh Shah 693d5c2fa0 qdutils: Use HW revision from linux header if available
Currently HW revisions are maintained separately between kernel and
user-space. To optimize this there will be single place, exported
msm_mdp.h, where HW revisions will be maintained.

Change-Id: I815eb9bd32f17928356e58a38260cee69b019a8b
2014-01-16 17:06:32 -08:00
Linux Build Service Account ec2437450b Merge "hwc: Add support for Macro Tile feature" 2014-01-16 13:27:11 -08:00
Jeykumar Sankaran 91c6ba1704 h/q/d: Optimize layer rects on sourceCropf
This change optimizes layer dest rects  and updates its
corresponding source crop value on sourceCropf.

Change-Id: Ie921908aa23ae029d2cd3add61795f71a6e5294e
2014-01-14 17:27:35 -08:00
Manoj Kumar AVM c38cdae859 hwc: Add support for Macro Tile feature
Macro tile is enabled only if all the conditions are met:
  1. GPU hardware should support Macro Tiling.
  2. MDSS hardware should support Macro Tiling.
  3. USAGE flags shouldnt contain GRALLOC_USAGE_SW_READ_OFTEN and
     GRALLOC_USAGE_SW_WRITE_OFTEN.
  4. RGB 16bit and 32bit formats.
  5. persist.hwc.macro_tile_enable flag should be enabled.

PRIV_FLAGS_TILE_RENDERED flag is added to indicate whether the layer
is rendered/composited in Macro Tiling or Linear format.

Change-Id: Ie3139839c84d76c5d1a2300f33910a09eb7336f4
2014-01-14 13:32:31 -08:00
Jeykumar Sankaran df991ce9e8 h/q/d: Check for MDP upscale limitations
- Expose API to get maximum upscale value supported by MDP
- Check for MDP limitation before programming pipes

Change-Id: Id9faac54a7b3e393b6c4b60574e5e985b495bf59
2014-01-13 19:08:39 -08:00
Ramakant Singh 117eea5919 HWC copybit: Add conditional check for src/dst crop w and h
It's better to check the source/dst  crop width and height
for null and -ve value, may cause float exception.

CRs-Fixed: 596099
Change-Id: I34881cf37a99fb52be6429e27deba4ac12ed2474
2014-01-13 11:08:20 +05:30
Linux Build Service Account b56d846f85 Merge "gralloc_priv.h: Adds 10bit compressed HAL pixel format in enum list" 2014-01-11 01:53:22 -08:00
Ranjith Kagathi Ananda 9aca080f79 libgralloc: Export header files - alloc_controller.h, memalloc.h
- Export header files alloc_controller.h, memalloc.h, gr.h to
    TARGET_OUT path

Change-Id: Ie8f3136eddd9c29ca5210e6d3122b22dada9face
2014-01-10 16:28:48 -08:00
Zohaib Alam 317a812340 hwc: RGB888 is considered as a VIDEO type
For mpq8092, RGB888 is the output video format, so need to make
it a video buffer type, so that VIG pipe gets allocated for
it. Another reason is that GPU cannot process RGB888, so marking
it as a VIDEO layer will ensure that it will get picked by MDP.

Change-Id: I5d1812a70f5e4d1fb7448d0a145a15c07c6fc188
2014-01-09 13:34:12 -05:00
Linux Build Service Account 0fc5f16d9a Merge "hwc: Disable MDPComp for external UI layers if scaling is present." 2014-01-09 06:23:22 -08:00
Linux Build Service Account fe0e462e6e Merge "hwc: Instantiate the copybit object when needed" 2014-01-09 02:05:17 -08:00
Linux Build Service Account ba8cac15c1 Merge "overlay: Standardize init/close of internal components" 2014-01-09 02:05:03 -08:00
Saurabh Shah 6f14c9654e hwc: Set default idle timeout to 70ms
Set default idle timeout to 70ms (~4 cycles on 60fps panel + some extra)
from the earlier 2sec.
The GPU timeout is around 80ms after which it turns off its rail,
clock and bus vote. So having a draw cycle before that is beneficial

Change-Id: I03291a4b8fd0707839567987febe1c088e21c92d
2014-01-08 17:40:12 -08:00
Ramakant Singh 05317317b2 display : change wormhole calculation for swap rect
In case of swap rect use case ,wormhole rect will
be same as  dirty rect (if has any blending)

Change-Id: Id2ee34d860207c440a033010460723fe964f7074
2014-01-08 16:30:22 +05:30
Arun Kumar K.R 8eb4c1c2d4 hwc: Instantiate the copybit object when needed
- Initialize copybit object only when its used for composition, as it
  was causing on unnecessary dup of the releaseFence in hwc_sync
- Its used only in case of MDP copybit
- Remove unused copybit object for external display

Change-Id: I876b7b8c5754e469613761789193bda321134c9f
2014-01-07 18:42:33 -08:00
Saurabh Shah b4144169bc overlay: Standardize init/close of internal components
Standardize the constructor/destructor init/close of internal
components.
Also internal components are allocated dynamically, with pointers
maintained in parent. This should facilitate gathering internals
from objects into arrays.

Change-Id: I8606fa436cf03fb75e43dc0f8341a05901751a11
2014-01-07 10:13:26 -08:00
Arun Kumar K.R f39af541bb display: Add binder interface to pause/resume WFD
- Client can call this when it want to pause/resume wfd
- Calling this will make sure after pause, black screen
  is shown on the sink
- Currently used by the SecureDisplay module

Change-Id: If618edf76a82abe49fb676d3845ca1f1d5a8bf25
2014-01-07 09:57:51 -08:00
Ramkumar Radhakrishnan ba3d6165c1 hwc: Disable MDPComp for external UI layers if scaling is present.
Fallback to GPU composition for the external UI layers if Actionsafe
or WFD/HDMI downscale mode is enabled that requires scaling.

Change-Id: Ie03da35e1c2e78434de00f92ad6c2e5073fc33b8
2014-01-06 12:20:03 -08:00
Linux Build Service Account 594d4cb324 Merge "Call overlay_set even if there are no change in params" 2014-01-06 09:00:02 -08:00
Linux Build Service Account bc667c1735 Merge "Revert "utils: prevent clear from occurring on HWC_BLIT layers"" 2014-01-05 16:00:12 -08:00
Ranjith Kagathi Ananda df34c52a75 gralloc_priv.h: Adds 10bit compressed HAL pixel format in enum list
VPU and MDSS on MPQ8092 supports the 10 bit compressed pixel format
to reduce the memory access bandwidth

Change-Id: I903c52640120c4bf4252405831b98d1ef92c1572
2014-01-02 16:50:10 -08:00
Raj Kamal acd5dc3e7e Call overlay_set even if there are no change in params
* Call overlay_set even if there are no change
  in mdp_overlay params.
* Remove mPPChanged and mLkgo variables and associated
  functions.
* This is needed because there is no value add in
  avoiding set calls when there are no change in params.
  This also helps us in avoiding hal hacks where we
  need to force call overlay_set due to driver issues.

Change-Id: Ib626acbdce93185ff037c9581d07bbe428f5f159
2013-12-31 10:25:32 +05:30
Terence Hampson ba33019510 copybit: pass acquire fd when calling clear
Tearing was seen when mdp was performing clear on fb because
acquire fence was not being passed in.

Change-Id: Iea5bcc50efc783497c770779faae59f933252551
2013-12-30 17:21:20 -05:00
Linux Build Service Account 3cae11fa64 Merge "hwc: Skip load based composition for video playback." 2013-12-30 02:12:51 -08:00
Linux Build Service Account 1657555b91 Merge "hwc: Invalidate on receiving PANEL_ALIVE=0 status" 2013-12-29 23:32:25 -08:00
Linux Build Service Account ca8d8cb6a1 Merge "hwc/overlay: Set MDP_SOLID_FILL flag for Color layer." 2013-12-23 21:20:45 -08:00
Linux Build Service Account c2af8c24d2 Merge "libgralloc: correct assigment of HAL_PIXEL_FORMAT_RGBA_8888" 2013-12-22 19:22:22 -08:00
Linux Build Service Account e32615ab96 Merge "hwc: Add binder interface to get the visibleRegion" 2013-12-20 16:58:52 -08:00
Prabhanjan Kandula 7cd2a02004 hwc: Skip load based composition for video playback.
DMA setting cannot be estimated ahead of time,
so do not do load based compostion where videos
can fall to GPU.

Change-Id: I01ccc26044df6bced428bd164f5c50f87aff99fd
2013-12-20 23:59:53 +05:30
Linux Build Service Account 0586ea370b Merge "fix fd leak in memtrack.msm8960" 2013-12-20 09:46:01 -08:00
Linux Build Service Account eda2877ed6 Merge "hwc: Remove need for intermediate for mdp3 composition" 2013-12-20 09:44:20 -08:00
Arun Kumar K.R ac5b9f4e6b hwc: Add binder interface to get the visibleRegion
- This binder interface can be used by clients to know the
  active visible region for a display(pri/ext/virt)
- When external orientation is used, return the destFrame of
  the FrameBuffer layer, as its the viewFrame

Change-Id: I7cfd149c76c16b9a3031103c89b1932d44bcbecd
2013-12-19 18:45:18 -08:00
Saurabh Shah c477a410de hwc: mdpcomp: Use other compositions if programming MDP fails
Currently, if programming MDP fails from a certain composition
strategy we fall back to GPU. This change, redesigns so that
composition types can have a chain of fall back strategies if
programming MDP fails. This happens currently only if resource
checks fail.

Change-Id: Ia7fb71788e595e59a91e95b1fb4eac3faea9451e
2013-12-19 12:00:25 -08:00
Sushil Chauhan 21f37c4ebb hwc/overlay: Set MDP_SOLID_FILL flag for Color layer.
Set MDP_SOLID_FILL flag while configuring MDP pipe for Color layer.

Change-Id: Ia48e6e3e759ae026510544cad8a6c1a6256d82e7
2013-12-19 10:35:54 -08:00
radhakrishna 68a883e886 hwc: Invalidate on receiving PANEL_ALIVE=0 status
Invalidate on receiving PANEL_ALIVE=0 status, otherwise
during static wallpaper, panel will be reset only after
next screen update.

Change-Id: I6f5264367c8bd889b9103ed74641ac4a60538b57
CRs-Fixed: 591454
2013-12-19 18:03:56 +05:30
Radhika Ranjan Soni dab7469f18 Revert "utils: prevent clear from occurring on HWC_BLIT layers"
This reverts commit f96aec529b.

Change-Id: I0049d5c32ce494f8444423f3923c3ad94aa299a6
2013-12-19 14:49:29 +05:30
Colin Cross 6468a024b6 fix fd leak in memtrack.msm8960
Close smaps_fd when exiting function.

Bug: 11007903
Change-Id: I4a9fcd1e84aae195d229e5dd11f99ccb9f6f5006
2013-12-17 18:39:09 -08:00
Linux Build Service Account 70a3183f8e Merge "gralloc: use new API for Ion handles" 2013-12-17 18:25:34 -08:00
Linux Build Service Account 0ebcb2c1e5 Merge "hwc: Compute external display position for UI layers." 2013-12-17 18:25:23 -08:00
Linux Build Service Account ec790b7b6d Merge "hwc: Refactor disable animation on external" 2013-12-17 18:25:23 -08:00
Terence Hampson ef49cc7dd1 hwc: Remove need for intermediate for mdp3 composition
8x10 has a product line that is suppose to use 256MB. The
intermediate buffers allocated are not needed when we can
compose onto fb frame.

Change-Id: I13fd2deb328a3ef4b6738cfe7030fe67ea7bd6c6
2013-12-17 14:55:47 -05:00
Linux Build Service Account a4768d3153 Merge "hwc: Use mixed mode comp. strategies as fallback for each other" 2013-12-17 02:51:00 -08:00
Linux Build Service Account 4d1e7c181e Merge "gralloc_priv.h: Adds new 10bit HAL pixel formats in enum list" 2013-12-16 15:02:47 -08:00
Saurabh Shah 116df90620 hwc: Use mixed mode comp. strategies as fallback for each other
If there is a GEOMETRY change try the load based compositions first
and then cache based. Vice versa otherwise.

Change-Id: Ie7ce6017e867f47e975487a72fba81f5d94eb9e3
2013-12-16 10:40:16 -08:00
Linux Build Service Account d0d9373d86 Merge "display: Add display HAL support for msm8916." 2013-12-16 07:32:55 -08:00
Ranjith Kagathi Ananda 5697eda244 gralloc_priv.h: Adds new 10bit HAL pixel formats in enum list
Vcap on MPQ8092 can capture the content in 10 bit pixel formats.
VPU on MPQ8092 also can output the video in 10 bit pixel format

Change-Id: I3f3e938a3e4b2225d870c1d301d4d7bee6cd65f5
2013-12-15 18:30:25 -08:00
Saurabh Shah 834852cce5 hwc: Update rotator object handling in error cases
Earlier, on configuration errors, we simply drained the fences held
by current rotator objects and went to GPU comp. The rotator objects
were deleted in the subsequent rounds, if they remained unused.

If we don't use GPU comp on failure but use other strategies, then we
need to mark the rotator objects for a display for reuse, so that
other strategies can use them.

Also any failure resets on overlay or rotator need to happen from
functions that call configuration helpers rather than the helper
themselves. Leaving cleanup to black-box helpers is not desirable.

Change-Id: I59b5b1bb774b82ee85a037e934c9d2d023db30af
2013-12-13 11:49:55 -08:00
Linux Build Service Account 7f2d7fb0a1 Merge "Donot compose layers if external is in pause state" 2013-12-13 03:27:39 -08:00
Linux Build Service Account 5d353b3cf8 Merge "hwc: Restrict scissor rect to view frame rect" 2013-12-13 03:26:56 -08:00
Linux Build Service Account a2d9c1776a Merge "hwc: Use viewframe to compute display position and crop." 2013-12-13 03:26:55 -08:00
Baldev Sahu 34cdea818c libgralloc: correct assigment of HAL_PIXEL_FORMAT_RGBA_8888
For implementation defined formats which go via HWC, set the
default value to RGBA8888.

Change-Id: I741504d54694ac061ecd6c870cb8f815cc61ab24
CRs-Fixed: 588596
2013-12-13 14:00:20 +05:30
Ramkumar Radhakrishnan d25fd5c40f hwc: Restrict scissor rect to view frame rect
Restrict scissor rect within view frame boundary to avoid displaying
the layer content out of view frame boundary.

Change-Id: Iea19a4c4880a0c495d2f215e6cfd0eb41b65b785
2013-12-12 15:08:05 -08:00
Ramkumar Radhakrishnan 23a7db0daf hwc: Use viewframe to compute display position and crop.
1. Use viewframe of external display to compute Aspect ratio position
   for external.
2. Use viewframe to find the crop rectangle of the frame buffer to
   configure rotator for external orientation usecase.

Change-Id: I564c70f202176c8b1f707cbafc08cbbb2abde383
2013-12-12 15:07:47 -08:00
Ramkumar Radhakrishnan 6e0f479d11 hwc: Compute external display position for UI layers.
Do external display position calculation for UI layers.

Change-Id: I55c36f3d44ae59b506d6d2ebff791d22f2529b6e
2013-12-12 15:07:14 -08:00
Ramkumar Radhakrishnan c3da4cc59d hwc: Refactor disable animation on external
Fall back to GPU for one cycle at the start of animation and display
the frame buffer for the subsequent cycle till animation ends.

Change-Id: I6c651cebaf4694f326d6e32ae485e014f391577c
2013-12-12 14:42:14 -08:00
Saurabh Shah f29205fd13 hwc: Combine FB program and source split adjust redundancy.
Combine the redundant code for FB programming and source split
adjustment into appropriate functions.

Change-Id: Ib99a2297a672e5ef40acb9f246021e57e41cd759
2013-12-12 11:08:36 -08:00
Sivalatha Chakrala 83beda7cc3 display: Add display HAL support for msm8916.
Add initial display support for msm8916 target.

Change-Id: I709b2422dd1ac65b3b12d2853c1fc1e1efffcb7a
2013-12-12 22:24:05 +05:30
Linux Build Service Account 41a6c07042 Merge "hwc : Fix cache based partial MDP composition." 2013-12-12 08:49:41 -08:00
Linux Build Service Account 6a33eb07e6 Merge "qdutils: Add display config to qdutils" 2013-12-12 08:48:42 -08:00
Linux Build Service Account 75e03b293c Merge "hwc: Calculate viewframe from layers display frame information." 2013-12-12 08:48:41 -08:00
Prabhanjan Kandula 85cc9b8dfc hwc : Fix cache based partial MDP composition.
Reset the updating layer count when new batch is started.
Else this will effect framebuffer z-order.

Change-Id: If746a5ea4b482cd7b55ba95007a3b8d7f1dc9b6e
CRs-fixed: 584021
2013-12-12 03:37:08 -08:00
Linux Build Service Account 25db44edf5 Merge "HWC: Fix for use int reference in function call" 2013-12-12 00:09:18 -08:00
Linux Build Service Account 16107e9870 Merge "hwc/copybit: Fix the wrong layer transform check." 2013-12-12 00:08:30 -08:00
Linux Build Service Account 93eafb51e5 Merge "hwc : Add hw limitation checks for MDP compposition." 2013-12-11 20:40:13 -08:00
Linux Build Service Account 2df8434518 Merge "hwc: Crop source rect for the optimized destination" 2013-12-11 05:06:45 -08:00
Prabhanjan Kandula 86c6776691 hwc : Add hw limitation checks for MDP compposition.
Add hw limitation checks for MDP composition once
we identify actual layers for MDP. This should be generic
way for all basic hw limitations of underlying MDP/MDSS.
Current limitations:
- a-family : MDP can not handle alpha scaling.
- 8226 & 8974 : Can not handle if multiple layers need
  downscaling and blending

Change-Id: Ia944802d798f2d0e9cd4515d7e9854c7314cac78
CRs-fixed: 538803
2013-12-11 15:41:38 +05:30
Naseer Ahmed 2e11c4c456 qdutils: Add display config to qdutils
This API is meant for system level users that need to get/set
various display attributes that are normally not available via
the regular Android framework channels.
Initially the APIs exposed are to check HDMI status, get display
attributes and set HSIC data.
Only physically connected displays are supported for now.

Change-Id: Ia783ce2ab0c4599a54c992171e01e2f0504550dc
2013-12-10 22:17:22 -08:00
Ramkumar Radhakrishnan 456d555b1d hwc: Calculate viewframe from layers display frame information.
Calculate view frame of each display from the displayframe of all
the application layers.

Change-Id: I9ba4076b7b4419bd3559417fad28b4e1de6acff3
2013-12-10 22:16:15 -08:00
Raj Kamal b2f91c7c70 Donot compose layers if external is in pause state
* Donot compose external/virtual layer-list when
when external/virtual is in pause state.
* Marking the layers for GPU composition when external/virtual
is in pause state would update FB_TARGET layer which inturn would
affect partial mdpcomp after resume.

Change-Id: Id2806bd7156085c00158a31dff3c3dc4c2b61146
2013-12-11 09:40:03 +05:30
Mitchel Humpherys 9455f217d2 gralloc: use new API for Ion handles
The userspace API for Ion handles has changed slightly. Update to match
the new API.

Change-Id: I55e3ef4329f96eb6e368dbab493687b9fbc4ff49
2013-12-10 12:10:55 -08:00
Linux Build Service Account 22f977503e Merge "hwcomposer : Fixing copybit render buffer fence closing." 2013-12-10 00:08:14 -08:00
Arpita Banerjee 684e448bfd HWC: Fix for use int reference in function call
To use the integer reference, declared integer
variable to get value directly in that variable.

Change-Id: I1fd1a45580be99dd95ccbc3495e28455a4c7de23
2013-12-09 16:55:45 -08:00
Sushil Chauhan 873f87ff71 hwc/copybit: Fix the wrong layer transform check.
At 90/270 degree rotations, if there is vertical or horizontal flip in
layer transform, it is wrongly interpreted by display HAL due to wrong
check. So Copybit destination rectangle width & height are not swapped
which leads to unwanted out-of-range scaling.

Change-Id: Ib917b907d1284b91b7d6c25038050bbcb503a792
2013-12-09 15:33:57 -08:00
Saurabh Shah 8beff124c3 hwc: mdpcomp: Remove redundant function to program MDP
The programYUV used for video-only cases is the same as programMDP
function. Remove the redundant function

Change-Id: I1d891404a77b2a47f90c236d4d6dcbbd02143d93
2013-12-09 11:00:21 -08:00
Saurabh Shah b28b611dec overlay: Remove support for forced pipe configs
Forced pipe configs were used during geometry changes to track bandwidth
in driver, which is no longer the case

Change-Id: I49fb1ca1b7173da2e17ccfc8ce9b447152b9b7b6
2013-12-09 11:00:16 -08:00
Linux Build Service Account f779b3d811 Merge "hwc: Reset layer-to-rotator map and fences on configuration failure" 2013-12-08 13:29:58 -08:00
Linux Build Service Account db6ac5126b Merge "copybit: Set default value on COPYBIT_TRANSFORM for Color layer." 2013-12-07 23:19:28 -08:00
Linux Build Service Account 41d71993d0 Merge "hwc: Do not use fb handle in hwc_prepare" 2013-12-07 00:26:12 -08:00
Linux Build Service Account bac260dfd7 Merge "qdutils: mdpversion: Add device version checks" 2013-12-06 20:58:51 -08:00
Linux Build Service Account 70fbbd55a4 Merge "hwc: Use GPU Composition for 8x26 virtual dpy scaling case" 2013-12-06 16:32:30 -08:00
Linux Build Service Account 4b8fe114f3 Merge "utils: prevent clear from occurring on HWC_BLIT layers" 2013-12-06 16:32:14 -08:00
Saurabh Shah c4aeb6a471 hwc: Do not use fb handle in hwc_prepare
Do not use fb handle in prepare. Use displayFrame for dimensions,
align them and hardcode format

Change-Id: I5c494a74a807d3a52a1c88257494b58c583700f5
2013-12-06 16:04:17 -08:00
Linux Build Service Account 18c3f73237 Merge "hwc: allow DMA pipe in BLOCK mode for virtual dpy" 2013-12-05 22:28:54 -08:00
Saurabh Shah b746f91fe3 hwc: Reset layer-to-rotator map and fences on configuration failure
When a rotator or mdp configuration for a display fails, reset the
layer-to-rotator mappings for that display and reset the release
fences for the rotator objects used for that display.

Note: The rotator itself is offline and not tied to any mixer. It is
from the mappings that we deduce which rotator object was used for
layers of which display. Also we don't delete rotator objects held
for a specific display, since during stability runs, failures could
repeat each round and we end up allocating and deallocating memory
unnecessarily. The rotator objects will be deleted automatically
when not required anymore.

Change-Id: I9a67f02574be30be3b96b3575f60530cb1c89e10
2013-12-05 10:57:43 -08:00
Saurabh Shah b3665b86c4 qdutils: mdpversion: Add device version checks
Add device version inline checks for hardware devices.
Also fixes the issue of 8084 being treated as 8974v2
owing to the expanded range.

Change-Id: Iaeefb505e14e022b6e542daa8b84a87a22e7f69a
2013-12-05 09:31:47 -08:00
Linux Build Service Account 86b22f8c09 Merge "libexternal: limit ext downscale to FullHD Resolution" 2013-12-05 01:21:41 -08:00
Linux Build Service Account 92938ed6bd Merge "copybit: Use rounded integer crop value." 2013-12-05 01:19:33 -08:00
Yang Xu 84a958f6e8 hwc: Use GPU Composition for 8x26 virtual dpy scaling case
For 8x26, if there is only one layer which needs scale for
secondary display, while no scale for primary display, DMA
pipe is occupied by primary. If layer changed and need to
fall back to GLES composition, virtual display lacks DMA
pipe and error is reported.

To avoid this case, use GPU composition for virtual display
scaling case on 8x26.

Change-Id: I42297a18006517532e30d1a01c67ff8ca187482a
2013-12-05 13:55:19 +08:00
Linux Build Service Account 39e4924986 Merge "HWC: Use 2 VG pipes for YUV layer with width > 2048" 2013-12-04 19:31:07 -08:00
Sushil Chauhan 4dbb002937 copybit: Set default value on COPYBIT_TRANSFORM for Color layer.
1. For Color layer, set zero transform value on COPYBIT_TRANSFORM
otherwise it causes MDP IOMMU page fault at 90/270 degree rotation.
2. Color layer is part of Copybit context list, so no need to call
msm_copybit() explicitly for it, that will be called during flush.

Change-Id: I4421b4bddfeca56b0ad8534d921c3d743a7d92bb
2013-12-04 18:39:11 -08:00
Jeykumar Sankaran 90618cb55d hwc: Crop source rect for the optimized destination
If a layer destination can be optimized, its source rect
needs to be cropped for the optimized destination rect.

Change-Id: If9a9891200d9cea52b58b253299b4007197cd9e5
2013-12-04 16:22:34 -08:00
Linux Build Service Account 23ea6ea1d2 Merge "copybit: Initialize release & acquire fence fds of Copybit context." 2013-12-04 16:11:51 -08:00
Linux Build Service Account cbcaca1bb0 Merge "hwc: Bandwidth check upgrade." 2013-12-04 16:11:49 -08:00
Linux Build Service Account 32ed87a827 Merge "qdutils: Parse low and high bandwidth from mdp capabilities node" 2013-12-04 16:11:48 -08:00
Arun Kumar K.R 2040a273da libexternal: limit ext downscale to FullHD Resolution
- should not be enabling external downscale when primary panel
  is of higher resolution
- while enabling downscale on external, also check if primary is
  within the Full HD resolution

Change-Id: I871a435834b6bca9b0e6899680aa8282dddad624
2013-12-03 16:07:55 -08:00
Terence Hampson 4ef3cd0aaf utils: prevent clear from occurring on HWC_BLIT layers
Right now clear is already being done in SF using GPU for
HWC_BLIT layers, no need to clear layers a second time.

Change-Id: Ie6ed6a2e7ad3b24fae6e6bfd81988c604f07eac1
2013-12-03 13:18:25 -05:00
Raj Kamal 531ab83263 hwc: allow DMA pipe in BLOCK mode for virtual dpy
For portrait videos case on WFD, driver supports multiplexing
of DMA pipe in LINE and BLOCK mode.
Loosen the requirements to allow DMA pipe in block mode for
portrait case of virtual display.

Change-Id: I5821501f89b17bb2d29c425aee0a6c16b2a4783b
2013-12-03 09:54:06 +05:30
Sushil Chauhan b9e9356a3b copybit: Initialize release & acquire fence fds of Copybit context.
Initialize release and acquire fence fds of Copybit context to -1.
Otherwise fd 0 gets closed in first call to msm_copybit, which is
valid fd and it leads to bad state if fd 0 is being used as stdin.

Change-Id: I01278bbb580d61e2d4b4c7b3f7b346274af6d914
2013-12-02 13:27:53 -08:00
Linux Build Service Account 8aa8820f73 Merge "hwc: Check for downscale support only when needed" 2013-12-02 02:44:04 -08:00
Linux Build Service Account fc8e697b73 Merge "overlay: pipe reservation mechanism for overlay" 2013-12-02 02:43:53 -08:00
Linux Build Service Account 8d64e523e2 Merge "hwc/overlay: Add Color layer support in MDP Composition." 2013-12-02 02:43:48 -08:00
Saurabh Shah d2123672fa hwc: Bandwidth check upgrade.
Use the low and high bandwidth values exported from driver per target
Use the low bandwidth value when the system has at least 1 video
mode panel, else use the high bandwidth value.
Newer targets could have bandwidth exceeding what an uint32 could
hold, so change the bytes read to be in gigs.
Do not use the framebuffer handle to get size, since the handle may
be null.

Change-Id: If3124ddc33334eba80d34ab7d8fc64d1b46697ce
2013-12-01 18:43:58 -08:00
Saurabh Shah 1ff95647a2 qdutils: Parse low and high bandwidth from mdp capabilities node
Parse low and high bandwidth from mdp capabilities sysfs node
/sys/class/graphics/fb0/mdp/caps
This will be specified in kbps.

Conflicts:
	libqdutils/mdp_version.cpp

Change-Id: I2956e340106d47bb49f5744e4f9a4a0bb796f6e3
2013-12-01 18:43:28 -08:00
Zohaib Alam 25a5fbfe77 overlay: pipe reservation mechanism for overlay
This change provides APIs for this mechanism. In a case where
pipeid corresponding to the layer needs to be reserved, then pipe
session could be initiated for that pipe. This will ensure that
the pipe is not garbage collected, and is manually destroyed when
the session (or pipe requirement) has been ended. This change
also provides the api to locally allocate the dest for the given
reserved overlay pipeid.

Change-Id: I3fec3e26f69305c280395b7a92edf9e457398052
2013-11-28 12:16:06 -05:00
Ramakant Singh cacc5bcb53 copybit: Use rounded integer crop value.
We are getting floating crop value in layer
but need to convert as integer for MDP.
Change-Id: Id1de7f61804295df40f3f699446c69860752b867
2013-11-28 12:18:50 +05:30
Linux Build Service Account 281547aacd Merge "display: Clean up binder interface" 2013-11-27 15:07:19 -08:00
Jeykumar Sankaran bec4a8e65d hwc: Check for downscale support only when needed
Check for downscale support only for layers which needs to
be downscaled. Fixes issue where we bail out for all layers having
width more than MAX_LAYER_WIDTH even when they don't need scaling.

Change-Id: I19ee4d69e986390ed3df122b8ca9c0e102f3f916
2013-11-27 12:55:19 -08:00
radhakrishna 15c02b94dc HWC: Use 2 VG pipes for YUV layer with width > 2048
To minimize usage of decimation when 4K x 2K video is played
on primary, split the yuv layer into 2 halves and configure
each layer to individual VG pipes. With this approach,
decimation can be avoided in some 4K x 2K video use cases,
thereby improving performance.

Change-Id: I7cddfab787c50f6ff132eaa7f5a3d9cfd636c282
2013-11-27 18:35:24 +05:30
Linux Build Service Account e1245cc98a Merge "qdutils: Remove fb open dependency to read MDSS capabiliites" 2013-11-26 16:45:40 -08:00
Naseer Ahmed 2299e93cfd display: Clean up binder interface
The current binder implementation is inflexible when it comes to
adding new input/output parameters. It also needs a lot of
boilerplate code written when adding a simple enable/disable type
command.
Instead, let clients specify the parcels they want to pass and
unparcel them at the end points only.
Please note that it is assumed that all commands coming in
need the same permission checks. If this is no longer the case,
some commands need to be split out on the receiver end in
IQService.cpp.
This change also simplifies the code end clients need to write.
They should be able to include QServiceUtils and call a single
function to set the binder up and make the call.

Change-Id: I4db66f2427ecf16d7a6264462ae85815217a16b1
2013-11-25 20:36:13 -08:00
Linux Build Service Account de5b809a57 Merge "libqdutils: Add generic metadata structure for VFM" 2013-11-23 21:27:53 -08:00
Saurabh Shah 95a0158274 hwc: Add GPU-preferred and MDP-preferred modes to load based comp.
GPU's perf is proportional to the number of pixels it processes, so
the load based strategy that prefers GPU, attempts to load it less
in terms of pixels, and at the same time makes sure the MDP has
enough pipes and mixer stages.

MDP's perf is real time and proportional to the instantaneous b/w
which is a function of overlaps. So the load based strategy that
prefers MDP would look at sending only as many full-screen layers
that MDP could support.
This mode is used when the GPU-preferred mode fails.

Change-Id: I3221a94bb01c43112370c248cd4ab217f2bd8ed1
2013-11-22 13:50:45 -08:00
Manoj Kumar AVM 1b66878aec qdutils: Remove fb open dependency to read MDSS capabiliites
1. MDPVersion class can query the capabilities using sysfs node.
   Since sysfs node can be read with out opening framebuffer, it is no
   longer required.
2. New internal functions updatePanelInfo, updateSplitInfo are added.

Change-Id: If506e600fb14401d8bf2361aac969c7e29a5d50a
2013-11-22 11:58:45 -08:00
Saurabh Shah 0feed9dccc hwc: Replace bytes claimed with bandwidth claimed.
Bytes claimed doesn't reflect the panel refresh rate.
So use the bandwidth claimed instead which factors this in.

This is important when 2 displays are running at different
refresh rates.

Change-Id: I3ab9573e43b8c25c31e01888fb2b181469b9e91b
2013-11-22 11:10:20 -08:00
Radhika Ranjan Soni a82f5d684a hwcomposer : Fixing copybit render buffer fence closing.
While closing the fence, correct index is not used.
Fixing the same.

Change-Id: I654ec4e649c247dca9c038e5b15184a01833bdc4
CRs-Fixed: 578408
2013-11-22 14:51:29 +05:30
Linux Build Service Account 9cb4c41a76 Merge "hwc: Fallback to gpu comp when copybit cannot handle scaling" 2013-11-21 23:15:37 -08:00
Linux Build Service Account 85797506ee Merge "hwc: Move resource checks to a common function." 2013-11-21 13:55:53 -08:00
Linux Build Service Account 704437fee6 Merge "overlay: Add support for using scalar calculations" 2013-11-21 13:54:30 -08:00
Linux Build Service Account 1b710392ec Merge "libgralloc: Use new GFX API to calculate stride" 2013-11-21 01:42:32 -08:00
Linux Build Service Account cc2ef46ff7 Merge "libqdutils: added a new revision for mpq8092" 2013-11-20 20:12:41 -08:00
Ramkumar Radhakrishnan cba13e265e libgralloc: Use new GFX API to calculate stride
Use new GFX API compute_aligned_width_and_height to get the stride
value for RGB surfaces.
Backward compatible with GFX old API when old GFX library is used.

Change-Id: I15b0954602b816bf4e88f48622494144fc77c14f
2013-11-20 17:55:09 -08:00
Sushil Chauhan 08cbd81673 hwc/overlay: Add Color layer support in MDP Composition.
1. Color layer has a destination rectangle, RGBA color and plane
   alpha. There is no gralloc buffer. Layer flag "HWC_COLOR_FILL"
   denotes a Color layer.
2. There is no color member in HWC layer, so RGBA color value
   is passed via the "tranform" member from framework to HAL.

Change-Id: I8769fd3f5febcaf952a1456de0a4262679c9a0e4
2013-11-20 17:04:29 -08:00
Linux Build Service Account 8c8a7e98d3 Merge "hwc: Refresh framebuffer when an updating layer is marked for GPU" 2013-11-20 15:29:52 -08:00
Linux Build Service Account 60374e1c7d Merge "hwc: Trim out of screen layers once only" 2013-11-20 15:29:32 -08:00
Zohaib Alam ef04efb7c7 libqdutils: added a new revision for mpq8092
Added a new entry for HW_REV for mpq8092

Change-Id: I34c0c2c1bb0055303f271e20a86d594a54cbaf0d
2013-11-20 15:19:24 -08:00
Ranjith Kagathi Ananda ce303ed910 libqdutils: Add generic metadata structure for VFM
Defines generic metadata structure for VFM. An array of VFM metadata
structures is used to keep the libqdutils agnostic of the internal
details of VFM metadata.

Change-Id: I5513b5f88b0f18687c0f563f2fe25eb9481887bf
2013-11-20 14:42:37 -08:00
Terence Hampson 503386673b hwc: Fallback to gpu comp when copybit cannot handle scaling
For MDP3 we cannot support scaling more/less then 4 times. Copybit
will use intermediate buffer to run scaling operation between 4
and 16, by going through MDP3 twice. But will not continue to do
so for scaling factors greater than 16 because operation takes too
long. It is in this case that we will fallback to gpu composition.

Change-Id: I99c05f6c70307823d0497cc8f9469bcc15178fea
2013-11-20 15:03:45 -05:00
Saurabh Shah 02e2998000 hwc: Move resource checks to a common function.
Move resource checks, pipes, stages of mixer, bandwidth to a common
function and use it from all strategies.

Change-Id: I161fc957e2793d543b5943fbd23ae3607a4cfc87
2013-11-20 10:11:12 -08:00
Saurabh Shah 6289b315a2 hwc: Trim out of screen layers once only
Instead of trimming out of screen layer dimensions for various
operations repetitively, trim and store.
Will also prevent accidentally missing out on trimming.

Change-Id: I8800586070ec433aa1fcbb3aad73ec29c9c9111e
2013-11-20 09:27:49 -08:00
Linux Build Service Account e2340954ff Merge "hwcomposer : Fix copybit render buffer fence usage." 2013-11-20 06:14:17 -08:00
Linux Build Service Account 63876c1b99 Merge "hwc: Optimize layer drops based on ROI" 2013-11-20 01:01:05 -08:00
Linux Build Service Account 011cefd92c Merge "hwc: Change error messages to informative messages in HWC" 2013-11-19 22:04:32 -08:00
Saurabh Shah 072cc46edd overlay: Add support for using scalar calculations
Add support for using scalar calculations from custom library.
The calculation will override pipe configurations if required on
basis of format, scaling, split display etc.

Change-Id: I53c73431b70b5b339ad09c19ac8792f0fc96aaaa
2013-11-19 12:55:03 -08:00
Linux Build Service Account 54b39975f3 Merge "Revert "hwc: Fix Flicker on video start on MDP3 target"" 2013-11-19 09:11:05 -08:00
Linux Build Service Account b16659cbe6 Merge "display : Add wormholeRegion Calculation" 2013-11-19 09:11:04 -08:00
Linux Build Service Account 035f3e6ffa Merge "HWC : Add support for solid fill color" 2013-11-19 09:11:03 -08:00
Linux Build Service Account 256d850846 Merge "hwc: Add error check for secure layer handling" 2013-11-19 05:31:15 -08:00
Linux Build Service Account 9c8367e12e Merge "hwc: Add deduction operation to Rect utils" 2013-11-19 05:31:14 -08:00
Radhika Ranjan Soni e8f8302303 Revert "hwc: Fix Flicker on video start on MDP3 target"
This reverts commit 8f45bf6467.
2013-11-18 05:20:03 -08:00
radhakrishna bf5bd0784e display : Add wormholeRegion Calculation
For copybit cases we should clear wormhole region
rather than nonwormhole. Adding support to calculate
and clear the same.

Change-Id: Ie85d1b484174199e35f43ce95b30de1fac9c30b2
2013-11-18 05:19:53 -08:00
Ramakant Singh 4c149fa8c0 HWC : Add support for solid fill color
We are using the solid fill feature for
clearing the wormhole region using black
color.
Using the src buffer same as dst buffer to
avoid kernel checks for this use case.

Change-Id: Ia46aded9b067ece83c9df1f2c2cdd6b017fa64ea
2013-11-18 13:35:08 +05:30
Prabhanjan Kandula b67303f4ba hwcomposer : Fix copybit render buffer fence usage.
Fixing array size to hold fence fd to count of render
buffers used in copybit and use it to store
fence of corresponding render buffer at the index.

Change-Id: Ic5e7f264c2a81ded2a0f61ef138e59a093b0023a
2013-11-17 15:16:14 +05:30
Linux Build Service Account 624891b5c3 Merge "hwc/copybit: Add Color layer support in MDP Copybit composition." 2013-11-16 15:27:23 -08:00
Arpita Banerjee 0938709ed5 hwc: Change error messages to informative messages in HWC
Few error messages in HWComposer change to as informative
messages.

Change-Id: Iecd2d6c129713363d338ca7aeefbcbc422df893d
2013-11-15 18:49:08 -08:00
Jeykumar Sankaran e21d2bb081 hwc: Refresh framebuffer when an updating layer is marked for GPU
When MDP cannot handle an updating layer and we marked it for GPU,
make sure framebuffer is refreshed for that frame. In the current design,
only video layers fall into these catches. But we may need
this change for future composition strategies.

Change-Id: I1d6a92da13feef4b353fa5e196d42f91148412e5
CRs-Fixed: 575340
2013-11-15 15:39:14 -08:00
Jeykumar Sankaran a0179fa554 hwc: Optimize layer drops based on ROI
- Iterate layer list to drop layers from composition that
are not going to be visible inside the updating ROI.
 - No ROI when skip layers are present.
 - Reset dropped layer info on full GPU fallback.

Change-Id: Ib544526a8c28ffdd16b5be12f73d57d10d207c39
2013-11-14 15:03:58 -08:00
Jeykumar Sankaran 11c3d6d70c hwc: Add error check for secure layer handling
When we try MDP composition only for secure layers, bail out if
secure layers are not present. Otherwise partial MDP composition
succeeds with all layers marked for FRAMEBUFFER.

Change-Id: I3f968835951320bb6c5873ba77fedef8a359b7bf
2013-11-14 15:03:55 -08:00
Jeykumar Sankaran b81222638c hwc: Add deduction operation to Rect utils
Seperate out rectangle deduction from the layer cropping. Update
layer sourceCrop and displayFrame after deducting the rect value.
This makes the function generic enough to be used by other
modules.

Change-Id: I587ac951357af823a1bf5e06c15ff47ac6a9c2a0
2013-11-14 15:03:17 -08:00
Arun Kumar K.R 696808f4e8 libmemtrack: Refine the feature define
Use appropriate name for the feature define.

Change-Id: If6b6f63a24c84f916f26043ad776084f3723137d
2013-11-13 19:04:31 -08:00
Sushil Chauhan 905042d4ea hwc/copybit: Add Color layer support in MDP Copybit composition.
1. Color layer has a destination rectangle, RGBA color and plane
   alpha. There is no gralloc buffer. Layer flag HWC_COLOR_FILL
   denotes color layer. MDP BLIT happens via MDP_SOLID_FILL mode.
2. There is no color member in HWC layer, so RGBA color value is
   passed via "tranform" member from framework to HAL.
3. Update HWC query to enable framework to query for Color layer
   support in HAL, at run-time.

Change-Id: I2c698007c1689779fe86d549093bb5285432dc5f
2013-11-13 10:13:19 -08:00
Linux Build Service Account 01a8ba3232 Merge "libqdutils: add edid raw data reading support" 2013-11-13 04:58:00 -08:00
Linux Build Service Account 8a260479b2 Merge "libmemtrack: Add correct target information" 2013-11-13 02:44:52 -08:00
Linux Build Service Account 1b9bc7ecd9 Merge "Initial msm8x64 memory tracker HAL" 2013-11-13 02:44:51 -08:00
Ken Zhang c50ee05cc0 libqdutils: add edid raw data reading support
Add API getEdidRawData to fill the input buffer with
edid raw data(640 bytes)

Change-Id: I993c3fdc01b469f65d78d8f5d05c46c54d4e580d
2013-11-12 22:20:20 -08:00
Linux Build Service Account dd1e63bd61 Merge "hwc: use sourceCropF instead of sourceCrop from hwc_layer_t" 2013-11-12 15:04:56 -08:00
Linux Build Service Account e3b12fe507 Merge "Revert "display: Video Encoding not working"" 2013-11-12 15:04:55 -08:00
Linux Build Service Account 9f5f83c9ed Merge "hwc: Do not punt secure layers for non integral crops" 2013-11-12 15:04:53 -08:00
Linux Build Service Account 37e87b2ff9 Merge "gralloc: Perform function to return custom stride" 2013-11-12 15:04:52 -08:00
Linux Build Service Account 6ea5c8e269 Merge "hwc: Punt layers with non integral source crop" 2013-11-12 15:04:50 -08:00
Linux Build Service Account e53dbc15c3 Merge "Replace sRGB_888 with sRGB_X_8888" 2013-11-12 15:04:49 -08:00
Linux Build Service Account 2a859e7c0d Merge "gralloc: Add allocation support for sRGB formats" 2013-11-12 15:04:48 -08:00
Linux Build Service Account be9a93a8ab Merge "gralloc: Add padding byte for YUV 420" 2013-11-12 15:04:47 -08:00
Linux Build Service Account 83f1c152fa Merge "display: Add support to HAL_PIXEL_FORMAT_NV21_ZSL format" 2013-11-12 15:04:45 -08:00
Linux Build Service Account cf0f9551e1 Merge "hwc: Bump up version to 1.3" 2013-11-12 15:04:44 -08:00
Linux Build Service Account 2c12f2df36 Merge "get rid of HAL pixelformats 5551 and 4444" 2013-11-12 15:04:43 -08:00
Arun Kumar K.R e9268aa55a libmemtrack: Add correct target information
- Add correct target information to make file
- Remove incorrect target names in the src files
- replace sprintf(banned api) with snprintf

Change-Id: I846ff3d5dcc5acc843c2c83506deafadd30b4942
2013-11-12 10:26:24 -08:00
Colin Cross 001f8b8389 Initial msm8x64 memory tracker HAL
Reads memory info from kgsl to track unaccounted for GL and ION
memory.  Right now it has to parse every allocation and then
cross-reference it against /proc/pid/smaps.  It would be faster
to modify the kgsl driver to keep counters that could just be
read directly.

Bug: 10294768
Change-Id: Icb17558f03ce53bc594fbee097e51fe82e15dc31
2013-11-12 10:25:41 -08:00
Arun Kumar K.R f44bcdd642 hwc: use sourceCropF instead of sourceCrop from hwc_layer_t
- Always use sourceCropF instead of sourceCrop.
- Change it to sourceCropF at places where sourceCrop
  used
Change-Id: Ia64050a41a174f3f038c9b88d527d70c2240f2d9
2013-11-11 16:31:12 -08:00
Naseer Ahmed 74f56831ac Revert "display: Video Encoding not working"
This reverts commit 0a1db6aef2.
Video encoder uses the NV12 encodeable format again.

Change-Id: I1b5170a5c2b5c7de0791cc5bc44457257519f749
2013-11-08 15:32:52 -08:00