Commit Graph

59 Commits

Author SHA1 Message Date
Sushil Chauhan
4b0638777a libcopybit: Fix source stride for software YUV buffer copy.
Incorrect source stride setting for software YUV buffer copy causes
the software converter used by apps like Video Telephony app to
crash. Correct the source stride setting passed to YUV buffer memcpy.

CRs-Fixed: 346928
(cherry picked from commit db92bedc081365e447233bbdd6e070e88a5cbc19)

Change-Id: I5edf7ff4d38e8b55eece9e856adeeab972e80fa0
2012-05-22 16:32:13 -05:00
Prabhanjan Kandula
0c3b559c20 libcopybit: Enable premultiplied alpha support
Premultiplied alpha is now supported on MDP3.x.
Enable it from userspace.
Also make flags as int since values are exceeding 255(uint8_t).

CRs-fixed: 347803
(cherry picked from commit 3dcbcb1f8672067f85e2f53e6321c27df6d6fbe6)

Change-Id: I865379b368726e95cab7aa669fbf27d5207240c5
2012-05-22 16:31:19 -05:00
Andrew Sutherland
3ef9f39ba5 copybit: fix build for qsd8k
Change-Id: Ic9edb3149a96a251e4cf9f4957f5624cef85667c
2012-03-16 21:53:00 -05:00
Prabhanjan Kandula
2e18b6b9b2 libcopybit : Fix calculation of copybit source rect for blit
- Fix the copybit source rect calculation for 180 and 270
 degrees rotation. Calculate blit rects  based on the source crop.

 CRs-fixed: 337366

(cherry picked from commit 06aa97757bd7023234d3852801e05e077aaa1d2f)

Change-Id: Iba2e230acd84271fc5649e06918824752aa90670
2012-03-16 21:23:21 -05:00
Prabhanjan Kandula
a16a3bc002 libcopybit: Fix the software conversion from YV12.
Fix the software conversion from YV12 to YUV_420_SP
by reading the chroma based on chroma padding involved.

CRs-fixed: 333784
(cherry picked from commit b22b6b191644e3ef618d122d30cef4bb9f87019d)

Change-Id: Ie84c1cbb2635a6197c5a907dac1e720c29a66e6c
2012-03-16 21:22:50 -05:00
Ramakant Singh
739ac1ba01 Display/copybit:Fix YV12 multiple conversion issue
Use a temporary buffer to replace inplace conversion

CRs-fixed: 333784
(cherry picked from commit 927542660e4c6106f8062c79bd6461c7fef55b4a)

Change-Id: I044bdaa31faea98552e35267bb78318317d68866
2012-03-16 21:22:38 -05:00
Paras Morabia
9987a6a6fa Copybit: Fix for source x and y calculation.
The x and y coordinates are derived properly from clip and dest rect with this fix.

- Even if rotation is involved, we need to start reading from the same point.
- Do scaling operation on the delta, and then add the source left and top values.
- If we scale the result of addition, we will not be reading source correctly.

CRs-fixed: 324782

Change-Id: I2876c6a8e48acbf03f80713338f9a17c57863aaa
2012-02-26 23:30:16 -06:00
Naseer Ahmed
25297cbe9b display: Fix blending on MDP 3.0
Assign the correct blending value
for MDP 3.0, earlier it was
incorrectly assigned to zero
for cases where blending was not needed.

Change-Id: Icec6541616c8a9dc6ffc0e99c5b2936389799656
2012-02-06 23:19:37 -06:00
Jeykumar Sankaran
dadd73f13f libcopybit: Disable copybit blending for opaque layers
This change disables copybit blending when surface flinger sets
HWC_BLENDING_NONE for a layer.

Change-Id: Ie86a2d5c9e3d3dab1bc7a0a3cc31bff7afe604da
2012-02-06 23:19:37 -06:00
Andrew Sutherland
a9a3796c03 qcom: copybit: build proper for qsd8k
Change-Id: Ic4ab7ec7105e45b8e09b232ae8096f3c7ea75ede
2012-02-06 04:27:53 +00:00
Naomi Luis
2ce4ec69b8 libcopybit: Temporary buffer optimization.
Add the following optimizations for the temporary buffer:
- Initialize the temp buffer only when required.
- The temp buffer is not deallocated/released unless there is a
  change in size of the temporary buffer.

Change-Id: I833851b1feff0a7457ad6847f18a988e002d61d5
CRs-fixed: 319337
2011-12-22 21:43:32 -05:00
toastcfh
b67994677f Merge git://codeaurora.org/platform/hardware/qcom/display.git ics into ics and resolve conflicts
Change-Id: I3acb5e963763821d2b547cf3c9390754dc42c12f
2011-12-18 19:45:23 -05:00
Naomi Luis
b6ca342fac libcopybit: Add support for converting to non 32pixel aligned formats.
Android YUV formats are aligned to 16pixels, while C2D requires 32pixel
aligned. Use a temp buffer to do the conversion.

Change-Id: Iff93b56e152460255d480dc703dabbcdb3697995
2011-12-12 16:41:07 -08:00
Naomi Luis
90f0fc7201 libcopybit: Add support for setting the Framebuffer info.
Add support to set the framebuffer width and height in the copybit
context. This parameter will be set for composition using c2d where
the c2d target is calculated based on the framebuffer width and height.

Change-Id: Ica0f7622bed305c0f56dd0a16b35406c28600fd8
2011-12-06 12:58:20 -08:00
Naomi Luis
2197d5d924 libcopybit: Add support for YUV destination targets.
Add support in the c2d copybit for YUV destination. We support 2 and 3
plane yuv formats.

Change-Id: Ia2b4dadf2966a324e011fea499da996eee8c8c3c
2011-12-06 12:52:22 -08:00
freexperia
a9b1e1661c msm: idef TARGET_USES_ION for targets that dont have ION (msm7x30) but use C2D_COMPOSITION
Change-Id: Idbea7db9a9f3241980cbe31ea2f8e6ad8dabc484
2011-12-05 21:34:55 -08:00
freexperia
b151a85950 msm: cleanup to compile msm7x30
Change-Id: Ie1ca24c4f08de56a07c8e299ffbb00fc4af85a8a
2011-12-06 07:03:30 +02:00
Naomi Luis
f79ec0f398 libcopybit: Add copybit iterator.
Add the copybit iterator which takes a single rectangle as an input.

Change-Id: I6fd496450c29ed06ffbfad62b5c880e837450791
2011-12-04 19:40:55 -08:00
Naseer Ahmed
95ab7ecd2c copybit: Do not do in-place conversion for YV12
Change-Id: I7e53f44baa6e924c6923d4e1d1af9454f51a7357
2011-11-23 18:12:56 -08:00
Harshad Bhutada
cfd5850e6a copybit: Enable copybit for 7K targets
Change-Id: Ie88f36d54d2eac51bcb5ea6c1793b41e4573ca53
2011-11-21 18:50:46 +05:30
Naseer Ahmed
b0d4ae5c3a libcopybit: Enable copybit in new location
- Enabled copybit HAL
- Remove copybit support for 8k targets from Makefile.

Change-Id: I15ea4851c677bc9338159a8db667056655dddc13
2011-11-20 21:43:45 -08:00
Naomi Luis
48cedc6ddf libcopybit: Add copybit header file.
Add the copybit header file in the libcopybit directory. Modify the
copybit source files to read from the correct header file.

Change-Id: I8d2f6758c7d1fbbb6ffc513d899b62b3c0013f5e
2011-11-18 05:29:58 -08:00
Naseer Ahmed
cb2b8ef287 copybit: Change gralloc header location
Change-Id: I7f4ffed723d2a84d832ec52fd25fe9636f2885a2
2011-11-16 16:57:33 -08:00
Naseer Ahmed
049cef0c8c C2D HAL: Enable ION
Change-Id: Ibfd124d620bab018bc89dd37e4471270c93aa58d
2011-11-16 12:46:17 -08:00
Naseer Ahmed
b2f68b6190 copybit: Check for invalid handle
Change-Id: I3b0bcb3b464aaa15994add3b2f8d6feea3becc68
2011-11-16 12:45:50 -08:00
Naseer Ahmed
f979fa8589 copybit: Set vertical padding
Change-Id: I86f3fe29c577b06487aedd9f9569075a22c146fc
CRs-fixed: 284384
2011-09-19 19:16:37 -05:00
Sushil Chauhan
d739bf81ce copybit_c2d.cpp: Return the correct status in open_copybit()
The patch sets the status as COPYBIT_FAILURE in case of an error in
open_copybit() as it needs to return the correct status. It also sets
the copybit device handle as NULL.

Change-Id: I3c35d163049763427ad92030cb1d88d72f7680fb
2011-09-19 19:16:36 -05:00
Naomi Luis
95c239e6be copybit_c2d: Set the C2D_FORMAT_PREMULTIPLIED format for premultiplied surfaces
Set the premultiplied format for the source and destination formats if
COPYBIT_PREMULTIPLIED_ALPHA has been enabled

Change-Id: I89113a1f1160b921d8e49b5dd6fc01001307648f
CRs-fixed: 279449
2011-09-19 19:16:35 -05:00
Naomi Luis
0818f64a0e copybit_c2d: Disable alpha for the RGBX format
Set the C2D_FORMAT_DISABLE_ALPHA for the RGBX format.
2011-09-19 19:16:35 -05:00
Naomi Luis
f90406e9e1 copybit_c2d: Use the framebuffer stride to calculate position
Use the framebuffer stride instead of the framebuffer width when
calculating the position for rotation.

CRs-fixed: 280765
2011-09-19 19:16:35 -05:00
Naomi Luis
9ff34af7fa copybit_c2d: Disable blend during blit
When performing the copybit blit operation, do a blind blit of the
surfaces. The blending operation should be done when the stretch operation
is invoked.
2011-09-19 19:16:35 -05:00
Kinjal Bhavsar
cc2834b226 msm7k: Use sanitized kernel headers
Add the exported sanitized kernel headers to include path in C2D/
copybit, gralloc and overlay HAL libraries.

(cherry picked from commit a70f426e8695cc5bbf8a45b987b5715784f7e924)

Change-Id: I1dbb79a086e9cb062e1264c1c354ac5ce1a05f27
2011-09-19 19:16:34 -05:00
Naomi Luis
05ff4bb661 copybit_c2d: Set the kgsl memory type as pmem for buffers with the PRIV_FLAGS_USES_PMEM_ADSP flag
Gralloc buffers which have the PRIV_FLAGS_USES_PMEM_ADSP
flag are allocated from a pmem region.

Set the kgsl memory type to PMEM to reflect this change.

Change-Id: Id5b84277ddec5cc9550aa97d2789df4d1bc2b2b5
2011-09-19 19:16:33 -05:00
Naomi Luis
7725e18ca3 libcopybit: Add copybit and copybit_c2d changes from Gingerbread
Change-Id: I39ccc7579f89d08eae809b47e434601aee6973a2
2011-09-19 19:16:32 -05:00
Mathias Agopian
6c2bc88a03 remove unused YUV formats
Change-Id: Ia590a9cb9a02bf62f35da344f29775d1256e3da7
2010-07-01 21:19:31 -07:00
Jean-Baptiste Queru
ec040bb3a1 Add tags and notices where appropriate.
Also tweak copyright notices as appropriate.

Bug: 2084753
Change-Id: Ifbf795b8b16dbc45cf5ac9a72b97f2b74cbf3550
2010-03-19 15:50:23 -07:00
Mathias Agopian
e55ffb9bb8 gralloc and copybit now can properly handle EBI or SMI GPU surfaces
up until now we relied on the EBI region map_offset being zero, which
prevented us to use SMI for surfaces, as their map_offset is different.
the copybit hal needs the map_offset to figure out which region to use.

Change-Id: I920b31ecb77a7b0943dfcd8e3362e2c38ac83297
2010-03-18 18:16:45 -07:00
Mathias Agopian
a5ffced80a add support for YCbCr (as opposed to YCrCb) to copybit 2010-02-17 18:02:17 -08:00
Mathias Agopian
f238b9e88c temporary hack to map the correct yuv format to the current (broken) mdp constants 2010-02-16 19:44:06 -08:00
Mathias Agopian
ef686c51fd should help [2223746] qsd8k MDP locks up, logs show copyBits failed (Connection timed out) in Passion camera zoom level 1
make sure to return an error when mdp limits are exceeded
2009-11-11 16:28:21 -08:00
Mathias Agopian
9e8b8a119d enable mdp debugging on error, also check for invalid inputs 2009-11-09 20:15:50 -08:00
Mathias Agopian
b73f40535f fix[2222341] Soft reset while going back from camcorder settings
add a way to convert a mapped "pushbuffer" buffer to a gralloc handle
which then can be safely used by surfaceflinger

also make sure to not send empty rectangles to the MDP.
2009-10-30 14:52:52 -07:00
Dima Zavin
d24467414b copybit: hack to always request premultiplied alpha blend.
The kernel will only do it for images with an alpha plane.

Change-Id: Idcba41945ed7d17daae0a5bcc48c64a82a49dded
Signed-off-by: Dima Zavin <dima@android.com>
2009-09-24 01:10:49 -07:00
Dima Zavin
03f9cb24dd libcopybit: Fix typo, and the build
Change-Id: I4f75e7ee4eff4f6159099de92ae3b4501ad7474a
Signed-off-by: Dima Zavin <dima@android.com>
2009-09-08 18:49:41 -07:00
Mathias Agopian
f2d52d61f9 QSD8K supports 8x scaling 2009-09-08 16:18:51 -07:00
Mathias Agopian
1e11826433 fix a bug with RGBX_8888 surfaces would be rendered incorrectly by the MDP. 2009-08-21 18:19:16 -07:00
Mathias Agopian
5eabeaf821 add support for RGBX_8888. HOWEVER MDP doesn't support it yet, so we use XRGB which looks wrong for now 2009-08-07 20:56:29 -07:00
Mathias Agopian
32a0f80413 make sure to use the right 32-bit pixelformat on msm7k when using the gpu 2009-08-07 19:09:35 -07:00
Mathias Agopian
641eb403cc really fix the build 2009-07-31 16:49:29 -07:00
Mathias Agopian
06bd510731 should fix qsd8k builds 2009-07-31 16:33:08 -07:00