Commit Graph

43 Commits

Author SHA1 Message Date
Rahul Sharma
61173ea422 sdm: Add support for new pixel formats in HAL
Add support for BGR_888 and CBYCRY_422_I in display HAL. The
new formats will be used by QCarCam Application.

CRs-Fixed: 1116491
Change-Id: I5ccca57a3ca2d27c4e064b0c5abd68c77c7afadd
2017-01-27 09:00:06 -08:00
Raj Kamal
8bb3b8f79a hwc: Add support for YCrCb_420_SP_VENUS(NV21_VENUS)
* Earlier, camera preview buffers were of NV21(YCrCb_420_SP)
  and the video buffers were of NV12_VENUS(YCbCr_420_SP_VENUS)
  format. Now that the video encoder has support for NV21,
  both the camera and video buffers can be of
  NV21_VENUS(YCrCb_420_SP_VENUS) format.

* If the preview and video buffer sizes are the same,
  CPP double pass to generate video and preview buffers can be
  avoided and the buffers can now be generated within a single pass
  with CPP duplication thereby saving power.

* Add support in gralloc for NV12_VENUS format to achieve
  the same.

Change-Id: I7001f975f2cafa21c893e7384ddbddd5f2788b1d
2015-04-16 18:28:45 +05:30
Linux Build Service Account
c0103cbac5 Merge "hwc: Add dynamic fps support for PPP" 2015-03-09 17:15:57 -07:00
Linux Build Service Account
ccbe5a4fc8 Merge "hwc: fix crop validation issue in copybit." 2015-03-06 23:41:39 -08:00
Ramakant Singh
140965d6a4 hwc: Add dynamic fps support for PPP
Some apps like camera and video are running on
less fps than panel refresh rate. Hence setting
dynamic fps will help in reducing BW voting for PPP.

Change-Id: I236fe96d5c6547044083774388887638f9e32958
2015-03-05 19:38:06 -08:00
Ramakant Singh
17fabdba25 hwc: fix crop validation issue in copybit.
While calculation of actual src or dst crop for mdp3,
values may go in -ve.

CRs-Fixed: 769741
Change-Id: Ief0fff0cb518f473bd24d04936e97c771e95cb5f
2015-03-04 03:47:04 -08:00
Ramakant Singh
cab868bf6d hwc: Add null check for copybit context and source handler
Add malloc return null check for copybit context 'ctx',
and source handler null check before getting metadata.

Change-Id: I9466de72d2b47ec2ba58fd50e66022555652f4c8
2015-02-25 17:35:42 +05:30
Saurabh Shah
1adcafe634 gralloc: Allocate cached by default, don't use bitops on SW flags
Allocate gralloc buffers cached by default unless clients specify
uncached using PRIVATE_UNCACHED or READ_RARELY or WRITE_RARELY at
allocation time. Some clients could use gralloc for allocation but
later won't use lock()/unlock() for CPU operations and likely use
their own caching methods. Cached by default helps such clients.

SW usage flags are not defined as bit values, so do not use bitops
on those flags.

Change-Id: Id371de2ec6efbfa0ed84172b3540f3ebc8f5d459
2014-12-19 18:30:00 -08:00
Ramakant Singh
8595cca6d4 hwc: Fix warning messages.
Fix warning messages for hwc and copybit.

Change-Id: I36360720383b482578fa6d2e21f19fe937f8610b
2014-11-07 00:57:10 -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
Ramkumar Radhakrishnan
964395241b Revert "get rid of HAL pixelformats 5551 and 4444"
This reverts commit e4001e736d.

Change-Id: Ic09ba8bc5b0784bce07e8800f6276b3290bc0e7a
2014-10-29 17:23:41 -07:00
Sushil Chauhan
0265c4787a overlay/copybit: Set Color Space for MDP to configure CSC matrix
Set Color Space for MDP (Overlay & Blit) to configure CSC matrix
correctly.

Change-Id: Ie1cada971d43339f334c061591fa848d8bb2385d
2014-10-02 14:53:48 -07:00
Dileep Kumar Reddi
8ec85afb84 copybit: Minor fix in opening copybit device
Proper handing of opening copybit device.

Change-Id: Id54ca463fe34764a1a3ffe90a71d8eec7cfefeb3
2014-06-26 09:43:49 +05:30
Praveena Pachipulusu
aef031c135 copybit: Use proper type casts and pointers
- Remove unused variables
- Use proper type casts for pointers.

Change-Id: Ie07c67d759d76f418fae08accdcfb1855511dedf
2014-03-21 09:16:54 +05:30
Terence Hampson
ffbcf4321a 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
1dfaed1ca4 Merge "copybit: Set default value on COPYBIT_TRANSFORM for Color layer." 2013-12-07 23:19:28 -08:00
Sushil Chauhan
2babecc511 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
Sushil Chauhan
9be6542ada 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
Ramakant Singh
613e357e6a 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
Sushil Chauhan
943797c361 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
Mathias Agopian
e4001e736d get rid of HAL pixelformats 5551 and 4444
This changes removes the use of 5551 and 4444 pixel formats
as its not supported anymore

Change-Id: I817510c3c7c0c3d95924c2ffc79e5727a6d6c48f
(cherry picked from commit 1fbd4a9662b07d53a3f220c91b3e85ca571a4938)
2013-11-08 15:17:17 -08:00
Sushil Chauhan
1f6d68fce6 hwc/copybit: Handle "R/B swap" for RGBA and RGBX color formats.
1.Framework notifies HAL with "HWC_FORMAT_RB_SWAP" layer flag to handle
a limitation where R and B components were swapped in Rendering phase.
2.Add "R/B swap" in hwc query to enable framework to query for support
in display HAL, at run-time.

Change-Id: I3b44d15b51b4f24939048fee9d1bac2b9009c97c
2013-10-18 13:58:16 -07:00
Linux Build Service Account
d55992da01 Merge "display: Add support for interleaved YUY2 and YUYV format." 2013-09-27 15:17:38 -07:00
Ramkumar Radhakrishnan
b52399cfa0 display: Add support for interleaved YUY2 and YUYV format.
Adding support for interleaved HAL_PIXEL_FORMAT_YCbCr_422_I and
HAL_PIXEL_FORMAT_YCrCb_422_I format in display HAL.

Change-Id: Ib87d9bf481c20bf6a92293dd04746719b1d928c1
2013-09-19 11:10:45 -07:00
Terence Hampson
b6e4b1e58f copybit: Release fd from intermediate BLIT calls
In certain corner cases copybit would make an intermediate BLIT
call. In these cases the intermediate release fd would be not
be closed.

Change-Id: I031fd5b375a5e9dd8bdcc46c67fc5ccbdfa4dfb7
2013-09-18 11:55:25 -04:00
Shivaraj Shetty
e86506ac35 HWC/copybit : Add support to indicate driver on layer with Zorder 0
Some applications send RGBA layer with constant alpha 0xFF and
isOpaque=1. For these types of layer we don't get any wormHole
regions. Hence we see the previous content (framebuffer) due to
wrong selection of blending logic at kernel side.

To fix these kind of issues on MDP3 we make layer with Z order
zero as FG layer. This makes sure that proper blending logic
is chosen in kernel.

CRs-fixed: 521638
CRs-fixed: 517944
Change-Id: I172a46c3284916264a1413a6a16875afea2b1aad
2013-08-14 17:48:52 +05:30
Linux Build Service Account
10c41265cd Merge "copybit: Pass in proper acquire fence count to blit call" 2013-07-23 13:10:59 -07:00
Terence Hampson
1d8db6f830 copybit: Pass in proper acquire fence count to blit call
The counter that was incremented when an acquire fence was provided
was not the counter that was passed into the blit call. Due to
blit requests being processed in order that it is submitted, it is
not need to pass in previous release fence as acquire fence for
next blit request.

Change-Id: Ic259af24b33e5e69440d481c92788107ff639bed
2013-07-17 11:28:37 -04:00
Radhika Ranjan Soni
21175f9e9f copybit: Add support for HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS format.
Currently framework is not returning the correct MDP format
corresponding to HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS format.
Modifying the right format to be returned.

Change-Id: I1862dea6daf6cc90e25492af7bf2e7f3bf6328ec
2013-07-16 18:44:27 +05:30
Linux Build Service Account
e9efd8a487 Merge "copybit: call blit ioctl before freeing intermediate buffer" 2013-07-09 11:11:47 -07:00
Terence Hampson
c67e87f49e copybit: call blit ioctl before freeing intermediate buffer
Pass in buffer handle before it is freed to prevent blit operation
from failing while importing buffer.

Change-Id: I4a944e7b2c0f6e19b55ed5602eda49d14d5e78f0
2013-07-05 17:05:22 -04:00
Raj kamal
e77f4ec555 copybit: Fix mismatch between HAL and MDP formats.
Fix the format mismatch between HAL and MDP formats
in copybit. This is to handle chroma issues on 8x10
for SW decoded videos.

Change-Id: I0b1ddc10cfca0c8b219838b33253a0c87b7c8f97
2013-07-03 11:32:05 -07:00
Dhivya Subramanian
7c4baa4b0c copybit: Fix type conversion error for GCC 4.7
GCC 4.7 has stricter type conversion rules in copybit.cpp

Change-Id: I7f8572e2d9416ccb2ba17e707c7f75a2e69d69cf
2013-06-25 10:18:20 -07:00
Linux Build Service Account
2efdd00340 Merge "copybit: Enable copy bit to use sync pt" 2013-06-06 15:46:23 -07:00
Terence Hampson
d0fd579ab4 hwc: Allow for yuv content to go through ppp on 8x10
8x10 has overlay but it also allows for composition to go through
copybit.

Change-Id: I086aab118b03c1cbc7fa0dbc080ceb906310deab
2013-06-03 11:54:55 -04:00
Terence Hampson
adf4730f2f copybit: Enable copy bit to use sync pt
Since mdp composition is now an async call, the waiting for fences
is now no longer needed inside copybit. In addition, how
composition ioctl is called is slightly different as a result
needing to pass in aquire fences device performing compsition

Change-Id: Ia12dfb2960ba2fc78b14e776984ffe0c3fe45fdb
2013-05-29 09:34:02 -07:00
Terence Hampson
0124cc725d display: Enable copybit on msm8610
This change is the hwc and copybit changes need to enable
composition to go through mdp on msm8610.

Change-Id: If0df3a247c5f4f4310966d14fe8fd839bf84b9d5
2013-05-09 16:20:40 -04:00
Arun Kumar K.R
6b353bd3d6 libcopybit: Merge copybit HAL from jb
Single commit having all the following commits

commit f39e512ad6f51cf35ab00995e52a39f31e76e77f
Author: Naomi Luis <nluis@codeaurora.org>
Date:   Fri Oct 19 14:41:32 2012 -0700

    copybit_c2d: Use a single draw call for surfaces with different rotations

    - When opening the copybit module, query the c2d driver capabilities.
    - If supported, use a single draw call for blitting surfaces with different
    orientations using the target target rotate override flag.
    - If not supported, invoke finish_copybit to draw the layers with the
    previous orientation before applying the current orientation.

    Change-Id: I0446f2817786321c9caa2eabf7b6679e5ecbcabe

commit a4008ff75150c1591c0dca46354e6bb8b30a675b
Author: Naomi Luis <nluis@codeaurora.org>
Date:   Thu Oct 18 15:26:15 2012 -0700

    Display: Add copybit_c2d performance optimizations

    Following performance optimizations have been made to copybit_c2d
    - Club all the layers into a single draw call. When finish_copybit
    is invoked, the draw and finish are executed.
    - Send the layer blend mode to copybit.
    - If the blend is set to none, set the pre-multiplied alpha flag.
    SurfaceFlinger assumes all surfaces have pre-multiplied alpha unless
    explicitly specified. Copybit_c2d does the same.

    The following cases are currently exempt from this optimization:
    - Change in C2D target
    - The template surfaces limit has been reached
    - Max. blit object limit has been reached.
    - Change in target transform.
    - Use of any temporary source/destination surfaces.

    Change-Id: I5ad1dc48bbe6d38d319116ccaa800fefb4fbf9f6

commit b188d739f69272c4820e1a33c5e10aa2f2825a5f
Author: Naomi Luis <nluis@codeaurora.org>
Date:   Mon Oct 15 11:17:11 2012 -0700

    copybit: Add finish API

    Add the finish API to copybit. This API is used to indicate the
    end of the drawing required by the copybit client.

    Change-Id: Ica4d13dbe6e7aeb7f88aabb734bf03e86c043acc

commit ecd56ace395fce78c14e2e753d3221218d062899
Author: Naomi Luis <nluis@codeaurora.org>
Date:   Mon Oct 15 11:21:08 2012 -0700

    copybit: Clean up copybit_c2d

    - Remove unused functions
    - Do nothing for the COPYBIT_BLIT_TO_FRAMEBUFFER case when using c2d
    composition.

    Change-Id: Idc416ce3742bb41f060e52ac70add44e584032b9

commit 35d45d0cff5f6fe866fcb5df71444824a45e046e
Author: Naomi Luis <nluis@codeaurora.org>
Date:   Wed Oct 17 10:37:33 2012 -0700

    copybit: Use correct alignment in get_size()

    get_size() is used to get the size required by c2d. It's alignment
    should be 32 and not 16.

    Change-Id: I9fedca0186d0ea19883b967e127417b059621a99

commit 31311da328cbe2229fcf8d8d8e276ec64005bcb3
Author: Ramakant Singh <ramaka@codeaurora.org>
Date:   Thu Sep 20 15:58:29 2012 +0530

    HWC: use uncached buffer for tmp yv12 and tmp stretch buffer.

    Change-Id: Iecc2a9c3c9a365d00d3491ce1007a36484209346
    CRs-fixed: 396574

commit 5503c90b5001aa4d863139eebcd9c0c43f265702
Author: Pawan Kumar <pavaku@codeaurora.org>
Date:   Mon Sep 3 09:14:13 2012 +0530

    copybit: Fix crash when copy_image is called with Tile format

    Add check for copy_image failure case.
    CRs-Fixed: 393122

    Change-Id: I5765120e87a135795d771c5d331275a66ade7e23

commit 48975bc53702ecba66ecaa5e5769036bb91f5cf2
Merge: feb1cd6 ab25cb4
Author: Linux Build Service Account <lnxbuild@localhost>
Date:   Sat Sep 1 13:36:47 2012 -0700

    Merge "Display ::Use proper ion heap id" into jb

commit ab25cb4818d9b87886678972f2861bacc93c580a
Author: Ramakant Singh <ramaka@codeaurora.org>
Date:   Thu Aug 9 14:23:39 2012 +0530

    Display ::Use proper ion heap id

    Change the MM heap to CAMERA heap for 7627a in use case
    1.Intermediate stretch of low resolution clips
    2.Software conversion of Y12 format

    Change-Id: Ib705d3245f601256179e2dedccbc707df85eb431
    CRs-Fixed: 383115

commit 90bcaadf41451d89fe80f96961ffc0a07a333145
Author: Prabhanjan Kandula <pkandula@codeaurora.org>
Date:   Mon Aug 6 12:50:12 2012 +0530

    libcopybit: fix YUV buffer alignments as per gralloc

    buffer alignment in copybit should be in sync with
    gralloc allignments while allocating buffer.

    CRs-fixed: 377051
    Change-Id: Ib2ae64e368ea3c92d3494c71da605197ccb4a9a5

    Conflicts:

        libcopybit/copybit_c2d.cpp

commit 95cf0038ea6eb02314024d673418464f0739ddb4
Author: Sravan Kumar D.V.N <sravank1@codeaurora.org>
Date:   Thu Aug 2 14:37:37 2012 +0530

    copybit : Add support for NV12_ENCODABLE format

    Change-Id: I7087dcad2238a3c35cc15c28d75b76a9e3ca6718

Change-Id: I748bffb4215d27f609beec209af0a5047858a314
2013-01-09 13:56:38 -08:00
Mathew Karimpanal
dec98cc96e display: Standardize log-tags for qcom display logs.
Change-Id: I75bc2d8db8d64994097d6b744f357c29c9a5717a
2012-12-12 17:49:17 -08:00
Naseer Ahmed
31da0b1f44 display : Add support for copybit composition
This change add support for copybit composition in display HAL
for MDP3 targets.

Change-Id: I9bc8e40f624b0760f4faa223cb03a13695611bb3
Acked-by: Sravan Kumar D.V.N <sravank1@codeaurora.org>
2012-08-14 14:15:51 -07:00
Naseer Ahmed
b16edac510 display: Fix warnings, make warnings as errors
Change-Id: I61f22765b04112be48e62135db930c415c9c7d37
2012-07-23 12:40:50 -07:00
Naseer Ahmed
01d3fd3318 display: Clean up gralloc
* Remove pmem and ashmem implementations
* Remove usage of RefBase
* Reduce log verbosity

Change-Id: If8ef543d236e5305bd5430f4f9c62c51b3a13787
2012-07-23 12:39:29 -07:00
Naseer Ahmed
29a26818d7 qcom/display: Update HALs
- Update the display HAL from Code Aurora Forum
- Add updated overlay library
- Enable HWC with basic video going through overlay
- Cleanup some files

Change-Id: I65c687c51be458cee71213c79e03eeda962d9086
2012-06-21 11:52:07 -07:00