Commit Graph

125 Commits

Author SHA1 Message Date
Zhu Bin
e2422e0e7c gralloc: Add support for raw12
When the output of the sensor is raw12 format, errors occur
in gralloc. So raw12 format needs to be supported in gralloc.

Change-Id: If9f7808713bae2fb1efb774e65ae742ca20fb201
CRs-Fixed: 2005966
Signed-off-by: Zhu Bin <cbinz@codeaurora.org>
2017-02-21 14:49:02 +05:30
Linux Build Service Account
b89af0f155 Merge "sdm: Add support for new pixel formats in HAL" 2017-02-05 18:41:24 -08:00
Saurabh Shah
2693a50c65 gralloc: Remove conditional inclusion of msm_media_info.h
msm_media_info.h is conditionally included, but symbols within it
aren't. Since msm_media_info.h will always be available, remove
conditional inclusion.

Change-Id: I8e6cc8cb12899318e81a622b42f14e14fd0f9acb
2017-01-30 10:48:00 -08:00
Saurabh Shah
c5b2b70479 gralloc/qdutils: Remove unused gralloc code, add driver type check
Remove unused code related to macro tiling from galloc and qdutils.
Add API to check for driver type and query caps based on driver.

Change-Id: I36cfa5529395c69deb886080be1c904ff5c9ad15
CRs-fixed: 1109207
2017-01-28 07:23:10 -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
Ramkumar Radhakrishnan
3083fe9c47 libgralloc: Add gralloc support for P010 format
Add support to get the aligned width and size for P010 YUV format

Change-Id: I0e4908b2f0b2c8b668d4b58702421c89bb03b195
CRs-Fixed: 1102142
2017-01-03 18:49:24 -08:00
Sushil Chauhan
dfe55a2036 sdm: gralloc: Add support for Secure Camera use-case
1. Add support for Secure Camera use-case in SDM and gralloc.
2. Set the appropriate ION Heap ID, secure camera/preview ION flags
   and the alignment requirement for Secure Camera use-case.

CRs-Fixed: 1065934
Change-Id: I9e80f3093d598eec7bf717ddd0e3adbbc3382d5e
2016-11-04 06:54:20 -07:00
Prabhanjan Kandula
ebc8ce33bf gralloc0: Add 10 bit RGBs for address computation
Add missing address computaion of 10bit RGBs, which
are supported by Ubwc.

Change-Id: I94b49a03210af43b61bc7b133daae7d128a32ef0
2016-10-28 06:01:36 -07:00
Linux Build Service Account
81c6c49dc4 Merge "libgralloc: Store unaligned buffer resolution in private handle." 2016-09-28 05:18:45 -07:00
Arun Kumar K.R
fc2a27f237 gralloc: Store aligned width in pvt handle for TP10
- For TP10 Venus UBWC format, the Venus macro returns the
  stride, which is 4/3 times the width.
- Need to store the pixel width instead of stride
  in the private handle hence * 3/4

Change-Id: I2c1348c6b90f141ecef6cabf493780325f17db77
Crs-fixed: 1059165
2016-09-20 11:16:39 -07:00
Ramkumar Radhakrishnan
ba55eac6ae libgralloc: Store unaligned buffer resolution in private handle.
Add unaligned_width and unaligned_height in private_handle_t to store
the buffer resolution without alignment that client asked to allocate.

Change-Id: I28d757af4178f581e6a83dc06198106c85fc7262
CRs-Fixed: 1040942
2016-09-08 15:15:49 -07:00
Linux Build Service Account
8598d1e49e Merge "display-hal: Exclude HWC libs compilation." 2016-07-11 08:14:31 -07:00
Pullakavi Srinivas
c644266912 display-hal: Exclude HWC libs compilation.
This change introduces compilation flag to
compile standalone SDM libs.

Change-Id: I3f8cde50e1806c6cf157364657d77fd9a780d5e3
2016-07-01 16:20:31 +05:30
Jeykumar Sankaran
9bc1a783bf libgralloc: Enable UBWC output buffers for Writeback displays
While allocating output buffers for writeback display, check MDP
support for writeback UBWC format before assigning the format.

Change-Id: I97bb320ec89d60453c4c7e3dc5a2b5c2a18394dd
2016-06-30 12:05:38 -07:00
Linux Build Service Account
3abfa785bd Merge "qdutils: Query MDP caps for UBWC feature" 2016-05-25 07:28:56 -07:00
Sushil Chauhan
013614183e qdutils: Query MDP caps for UBWC feature
- querySDEInfo queries MDP caps to check if UBWC is supported on H/W.
- Gralloc calls querySDEInfo api to check if UBWC feature is enabled
  by MDP driver.

CRs-Fixed: 1013911
Change-Id: I9114c4d8286842f19619302484ee4690c59fcb29
2016-05-10 19:21:23 -07:00
Naseer Ahmed
6c6c58a991 gralloc: Handle RAW_OPAQUE formats similar to blob
Change-Id: I957b9d5902f6ea3714b46f3900e9f039b4667f0a
CRs-fixed: 1006155
2016-05-09 08:34:34 -07:00
Naseer Ahmed
de758fddeb gralloc: Fix gralloc protected allocations
Protected allocations need to be uncached and don't need the MM
heap flag set

Change-Id: Ib64169e601af1c70a951a06266e70b4e18fc88f5
2016-05-03 15:11:44 -04:00
Linux Build Service Account
7e0e63159d Merge "gralloc: Use PROTECTED flag for L1 allocations" 2016-04-22 08:39:23 -07:00
Naseer Ahmed
934a4c33e3 gralloc: Use PROTECTED flag for L1 allocations
This is in keeping with the gralloc spec.

Change-Id: Id796a55e2ea51d3abdf9274140dc0404a42e1cab
CRs-fixed: 999994
2016-04-21 10:43:47 -07:00
Ramakant Singh
c85cceef6e gralloc : Add singleton class for mdp capability
Many case reading the same mdp capability multiple times from
sys file causing delay in operation. Hence reading only once.

Change-Id: I1b94ca63074aba2f078fe6add5a8de628ca87740
2016-04-05 10:54:01 +05:30
Ramkumar Radhakrishnan
790357e660 libgralloc: Get appropriate width and height from metadata
Compute YUV plane info using buffer width and height from metadata for
UPDATE_BUFFER_GEOMETRY use case.

CRs-Fixed: 994771
Change-Id: Idb42b56be970942a79c07ceb337afa2f966e4fbc
2016-03-29 14:42:53 -07:00
Ramkumar Radhakrishnan
db89d1f64e libgralloc: Add support for 10 bit RGB/YUV formats.
Add 10 bit RGB/YUV HAL Pixel formats in gralloc library.

CRs-Fixed: 882953
Change-Id: I5c99bbd61d899408d6ff182b11ffb537bbde13c6
2016-03-17 19:09:50 -07:00
Ranjith Kagathi Ananda
36e000ae26 gralloc: Fix RAW10 stride
RAW10 stride should be aligned to 8 bytes and not 16 bytes

Change-Id: Ie1c6f3965a0b6ae1db399fc856b4deb55880463e
2016-03-03 09:38:18 -08:00
Manikanta Kanamarlapudi
cb44d976a0 libgralloc: disable UBWC for video encoder usecase
check for target specific system property "video.disable.ubwc"
to disable UBWC for the targets where encoder doesn't
support UBWC color-format.

Change-Id: Ifd050c3b44768870fc74a16e941e8286e3ea0c13
2016-02-10 22:13:14 -08:00
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
Kaushik Kanetkar
4cb337cbfd gralloc: Add HAL_PIXEL_FORMAT_BGR_565 format
- Define new format in gralloc_priv.h header
- Add support for HAL_PIXEL_FORMAT_BGR_565 while allocating buffers

CRs-fixed: 904907

Change-Id: I2cf3cdcfc5c89b11abc4ceb4daba77a5123ecf67
2015-09-10 12:07:12 -06:00
Linux Build Service Account
02f2f211d1 Merge "gralloc: Use adreno_utils api for NV21 and NV12 alignment" 2015-09-02 21:16:36 -07:00
Naomi Luis
cffc5bd986 gralloc: Modify check for uncompressed RGB buffers
The previous check for RGB formats skipped certain formats and hence
the alignment was incorrect.
Add a check for all non-compressed RGB formats before calling
getGpuAlignedWidthHeight

CRs-fixed: 888733

Change-Id: Icae4cfb92ceae5e593fd6c5658999fc90ef97ea1
2015-09-02 15:25:26 -06:00
Sushil Chauhan
521ce35904 gralloc: Use adreno_utils api for NV21 and NV12 alignment
Use adreno_utils api to get stride alignment requirement by GPU for
NV21 & NV12 formats. It is required to keep Camera & Gralloc in sync.

CRs-Fixed: 880927
Change-Id: Ie71f864c975e38fe4aa58735cc8ffe9dd0734f4f
2015-08-28 12:29:56 -07:00
Linux Build Service Account
2e8a5801b1 Merge "gralloc: Return aligned w,h for UPDATE_BUFFER_GEOMETRY" 2015-08-17 00:03:48 -07:00
Sushil Chauhan
7807d19bfe gralloc: De-couple the UBWC decision for GPU and Rotator
Allow UBWC, if an OpenGL client sets UBWC usage flag and GPU plus MDP
support the format. OR if a non-OpenGL client like Rotator, sets UBWC
usage flag and MDP supports the format. It de-couples the UBWC decision
for Rotator output buffer format from GPU.

Change-Id: I5e78b615f71c1781a40b8c137a37b111eb786323
2015-08-13 10:40:25 -07:00
Manoj Kumar AVM
8e1aa18e18 gralloc: Return aligned w,h for UPDATE_BUFFER_GEOMETRY
Return aligned width and height in case meta operation is
UPDATE_BUFFER_GEOMETRY.

CRs-Fixed: 880373
Change-Id: I3b263518d509f4de68c93692eace3cb0b2c69808
2015-08-12 16:00:26 -07:00
Ajay Dudani
4dc06493ae gralloc: Remove unsupported formats
- Remove RAW_SENSOR in favor of RAW16
- Remove use of sRGB format enums

Change-Id: I189a168f75a5573648aebdde3bbacb90f4cdc354
2015-08-04 16:55:57 -07:00
Arun Kumar K.R
7f0b24b427 gralloc: Use new secure display heap id and flags
Add support to use new heap id and flags for secure
display use case

Change-Id: Icca91a1aa60fab0eda5ff0396c0ae1b5f76f9151
2015-07-20 10:42:49 -07:00
Sushil Chauhan
e7acc3c916 sdm: Add support for LINEAR_FORMAT metadata operation
1. Define LINEAR_FORMAT operation in MetaData.
2. VENUS ouput buffer is linear for NV12_UBWC Interlaced video playback.
   So Video module performs LINEAR_FORMAT operation to set "linearFormat"
   metadata member to NV12 linear format in case of Interlaced video.
3. Handle LINEAR_FORMAT metadata operation in HWC wrapper and gralloc.

CRs-Fixed: 855474

Change-Id: I77dd72bec26f225de75adb6c214ccd90db239e3e
2015-06-29 15:21:58 -07:00
Ramkumar Radhakrishnan
29a36a54bc sdm: Remove unused libraries, files and functions
1. Remove unused libraries libhdmi, liboverlay and libhwcomposer.
2. Remove unused functions and files from libqdutils.
2. Add querySDEInfo() function in qdutisl to query SDE capability.

Change-Id: Ibea2dd2d22fecb420079e3b7cbbcc57d10f75d49
2015-06-22 12:14:53 -07:00
Linux Build Service Account
9aa25d5806 Merge "gralloc: Fix RAW16 stride" 2015-05-08 14:19:10 -07:00
Linux Build Service Account
4613ff9183 Merge "gralloc: UBWC aligned buffers are Macro Tiled" 2015-05-06 15:47:23 -07:00
Linux Build Service Account
7648232a7e Merge "hwc: Add support for YCrCb_420_SP_VENUS(NV21_VENUS)" 2015-05-06 11:38:07 -07:00
Shuzhen Wang
2a000b2f99 gralloc: Fix RAW16 stride
RAW16 stride should be multiple of 16 pixels, not 32.

Change-Id: Ic5f6920402ba9600b983e457cfc6863888345fe8
2015-05-06 09:54:06 -07:00
Sushil Chauhan
e61fac5be4 gralloc: UBWC aligned buffers are Macro Tiled
All UBWC aligned buffers are Macro tiled.

Change-Id: I71bb0269d337d1ca2017ce9665010f738674f1a8
2015-05-01 10:17:29 -07:00
Sushil Chauhan
c85b65b46e gralloc: Fix UBWC related issues
1. Fix the missed ALIGN in getUBwcMetaBufferSize api.
2. Fix de-reference of data address pointer in getRgbDataAddress api.

Change-Id: I5dae2b6f449bb9a5b0dcc23110a2efce36060a42
2015-04-30 11:05:36 -07:00
Linux Build Service Account
3eac1c3cd9 Merge "gralloc: Make all secure heaps and flags backward compatible" 2015-04-29 08:20:37 -07:00
Linux Build Service Account
0d269a4991 Merge "gralloc: Add gralloc perform api to query RGB data address" 2015-04-26 02:29:53 -07:00
Linux Build Service Account
0350e3e6a0 Merge "gralloc: Add debug.gralloc.gfx_ubwc_disable" 2015-04-24 23:48:25 -07:00
Shalaj Jain
3c49041532 gralloc: Make all secure heaps and flags backward compatible
Make all content protection and secure display heaps and flags
backward compatible. Honor the different requirements for master
side and slave side content protection and secure display.

Change-Id: I21a5170f2ae7ffd9c447e8af795e3665e673248f
2015-04-24 11:52:48 -07:00
Mohan Maiya
cbeab9e705 gralloc: Add debug.gralloc.gfx_ubwc_disable
This patch adds a new debug property
that can be used to disable UBWC compilant
allocations for graphics stack by gralloc.

Change-Id: I59e5994700730c73d62eec9f74ab6ded60c2d256
2015-04-20 10:17:50 -07:00
Sushil Chauhan
7dd3a4368f gralloc: Add gralloc perform api to query RGB data address
A client can call GRALLOC_MODULE_PERFORM_GET_RGB_DATA_ADDRESS api
to get RGB data address for any linear or UBWC aligned RGB buffer.

Change-Id: I3a7d25f504b7ba1dec79cc872cafbb38ddbb6bd2
2015-04-16 10:41:14 -07:00