Commit Graph

72 Commits

Author SHA1 Message Date
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
Arun Kumar K.R
6364fa6c26 gralloc: Add RGBA_5551 and RGBA_4444 formats
Define RGBA_5551 and RGBA_4444 which are OEM specific formats in
gralloc_priv.h

Change-Id: I6cdb723ea7e0783e7f58dbe1b45152dc427994c9
2015-01-14 14:47:11 -08:00
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
Linux Build Service Account
f7275bd94a Merge "hwc: Fixes for MDP3 targets" 2014-10-22 15:59:00 -07:00
Dileep Kumar Reddi
92eb5db579 hwc: Fixes for MDP3 targets
* Define VENUS_COLOR_FORMAT to get aligned dimensions for venus format
 * Compile copybit lib for ferrum

Change-Id: I905b84fc066075af50b8197dd53157a3a57db59b
2014-10-20 18:28:17 +05:30
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
Naseer Ahmed
9eb5e09577 display: Fix warnings
Treat warnings as errors again

Change-Id: Ibd7f484d31ad420b85e82fd5183d70bf7dce4bfa
2014-09-25 16:11:15 -04:00
Sushil Chauhan
5cc90ddef8 copybit: Avoid NEON instructions in s/w converter on 64bit
NEON instructions in software converter are specifically written
for 32 bit ARM architecture. Do not compile them on 64 bit arch.

Change-Id: I1dbac24df519e00a2cc125b35cbd3bc520188457
2014-07-31 12:46:29 -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
Shalaj Jain
a70b435d10 display: remove compiler warnings
Use correct typecasts and format specifiers and resolve
compiler warnings

Change-Id: I51b12ecb78a9a496cf1f76c3d32892a203f70c43
2014-06-19 15:44:51 -07:00
Omprakash Dhyade
3cc819e3c7 copybit: Enable RB Swap for RGB_888
Enable swapping of R & B color components
for RGB_888 format, otherwise C2D renders
wrong output.

Change-Id: Ib1670418a588e09e8168a04c9f8b8022a84e65e8
CRs-fixed: 672033
2014-05-30 16:52:46 -07:00
Linux Build Service Account
d187510c4c Merge "display: Change LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH" 2014-05-29 04:35:22 -07:00
Linux Build Service Account
f26580bc5d Merge "copybit: Enable HAL_PIXEL_FORMAT_RGB_888 support in c2d" 2014-05-17 00:07:06 -07:00
Sushil Chauhan
43755debbe copybit: Enable HAL_PIXEL_FORMAT_RGB_888 support in c2d
Enable HAL_PIXEL_FORMAT_RGB_888 pixel format support in c2d library.

Change-Id: I2316357adb3fef8007bdab4791c94e53d12fa00f
2014-05-15 11:20:32 -07:00
Ajay Dudani
96719e7d57 display: Change LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH
To comply with multi-arch build system changes for 64-bit support,
LOCAL_MODULE_RELATIVE_PATH needs to be used.

Drop explicit use of LOCAL_MODULE_PATH as its not needed, and
causes build system to overwrite one of multi-arch library
variants with the other arch variant.

Change-Id: I882de72ad2003f1e2bcc93fb63bad7377a84d31d
2014-05-14 16:30:45 -07:00
Linux Build Service Account
860bd97534 Merge "display: Remove ashmem header includes" 2014-05-14 14:44:29 -07:00
Naseer Ahmed
9136b8000b display: Remove ashmem header includes
Ashmem use in gralloc has been deprecated for some time. Remove
the stale headers.

Change-Id: Ie048c377b649c0639ffeefe9af41f7a5caaf0382
2014-05-13 11:22:39 -04:00
Naseer Ahmed
5d7d2924a7 copybit: Export c2d header
On open source builds, adreno libs don't get built, due to which
c2d headers aren't exported. Export it from the display HAL.

Change-Id: I6ed1d1fcf3f99ba83d5f194e40d0b42bd7b4d566
2014-05-02 15:19:31 -04:00
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
Naseer Ahmed
c55d60a3d7 display: Export headers
Display headers used by other components should be at a common
location to avoid issues with future changes in paths.

Change-Id: Iaec21206b82dd7dae03e598b9ec46b3e6f1bbf71
2013-07-12 11:58:51 -04:00
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
Pawan Kumar
74d9ea9f11 libcopybit: Fix GPU page fault on c2d use
On HDMI connect or other use cases where finish_copybit
is called, reset dst_surface_mapped and dst_surface_base
as destination surface is already unmapped.

Change-Id: I0073a46178e6b1ecfdbf0a08d8790af4271bc37b
CRs-fixed: 481685
CRs-fixed: 502555
2013-07-02 12:19:56 -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
Linux Build Service Account
5153b5836d Merge "hwc: Allow for yuv content to go through ppp on 8x10" 2013-06-04 10:36:35 -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
Linux Build Service Account
4cf4354f41 Merge "display: Enable copybit on msm8610" 2013-05-21 09:29:00 -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
Sushil Chauhan
b00f59d79e hwc/copybit: Add check for Max layers support.
Add check in copybit for Max. layers supported by HWC. Increase
max. RGB surfaces to MAX_NUM_LAYERS to support known use cases.

CRs-Fixed: 481226
Change-Id: Ie30ab0ef3047a304133cb547902ae11fecc5db22
2013-04-30 16:35:06 -07:00