Commit Graph

90 Commits

Author SHA1 Message Date
Naseer Ahmed
04a804a8f1 display: Use log.h from VNDK
Change-Id: I8aa8566036a44b1587f5cfe6c745e11a3dd19481
2018-03-06 20:41:14 -05:00
Naseer Ahmed
05a342ab83 display: Mark header modules as vendor
Change-Id: Iea70b19b2baf9827b3551b7ba16808fe89c48cf4
2017-08-08 13:05:37 -07:00
Naseer Ahmed
8502008020 display: Cleanup unused code
CRs-Fixed: 2048735
Change-Id: Ief7f8ae4006ab211272191b66bd4bd854d9098b2
2017-07-10 18:19:08 -04:00
Naseer Ahmed
725789e5e6 display: Use LOCAL_VENDOR_MODULE
Avoids hardcoding paths in vendor
Change-Id: I6411c27cebfd8bc1d65bc84942b4c2621f64e420
CRs-Fixed: 2048581
2017-05-29 11:13:02 -07:00
Naseer Ahmed
9c7ab94ed1 display: Move all opensource modules to vendor partition
Change-Id: I050988d96eccc1c3217a8f2030b333cd8d04c4d4
CRs-Fixed: 2010492
2017-03-29 17:49:46 -07:00
Naseer Ahmed
1e54952f4c Revert "display: Move all opensource modules to vendor partition"
This reverts commit 4c790408b1.

Change-Id: I32c48e300e8c641b196210c4412b635e1c1941f0
CRs-Fixed: 2013665
2017-03-01 18:50:25 -05:00
Naseer Ahmed
4c790408b1 display: Move all opensource modules to vendor partition
CRs-Fixed: 2010492

Change-Id: I80bb14624e9a47189777bd4c8f8847ca946df74c
2017-02-28 23:55:12 -05:00
Naseer Ahmed
e69031e9c7 gralloc1: Add remaining functionality
* Use private_0 flag
* Add some legacy flags to be used during transition
* Fix gralloc module version
* Adjust makefiles for gralloc1
* Add support for dump, num flex planes and lock flex.
* Use a unique ID for buffer descriptors
* Do not delete buffer handle, fix after verifying framework fix.
* Current gralloc1 clients do not conform to the lock() requirement
in the gralloc1 header. Tracked in b/33588773
* Add perform APIs to get the buffer size  and allocate a buffer
for use by SDM
* Fix reference counting
* Add a unique buffer ID
* Some cleanup in private_handle
* Create a wrapper class of private_handle to do refcounting
* Resolve implementation defined formats At allocation time, update buffer
descriptors to replace implementation defined formats with the ones we mean
to allocate
* Defer ion handle release
* Remove unused drm code.
* Add legacy constructor for private_handle_t used by some
clients

CRs-Fixed: 2007391
Change-Id: Ia9e816cec35ba45483a5b75d99f256325a010138
2017-02-17 09:19:23 -08:00
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
Prabhanjan Kandula
96e9234520 gralloc1 : initial implementation
Initial implementation of the gralloc1 APIs

Change-Id: I3b01595b0f9b30d9a08d02101fe42281556bd6a2
2016-05-11 00:49:41 +05:30
Naseer Ahmed
b8ecfbf5a7 display: Enable clang for all display modules
Change-Id: I71e3fa3f7d44253b8e01d1eafe086b1898d65a8e
2015-11-03 08:02:01 -05:00
radhakrishna
d7131e66d7 sdm: Add support for UBWC in C2D
Add support for UBWC in gralloc alloc_buffer api and copybit

Change-Id: I264114d51c2d3caeb1611139641d99ddb006a7ce
2015-10-29 00:00:58 -07: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
Naseer Ahmed
8d0d72ad40 gralloc: Deprecate old stuff.
1. Reclaim some old gralloc flags.
2. System heap allocation happens by default.
3. Remove some unused private flags.
4. Add heapid member to alloc_data to better line up with ion
   header
5. Remove check for MDSS_TARGET

Change-Id: I37be0a2fcd5fd4a14bb9ca235fcae41f6f3ec19e
2015-03-19 13:39:21 -04:00
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
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