Commit Graph

115 Commits

Author SHA1 Message Date
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
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
Sushil Chauhan
6686c80f64 sde: Add support for RGBX_8888 UBWC format
1. Add support for RGBX_8888 UBWC in display engine and gralloc APIs.
2. Set the appropriate rotator output format for RGB* UBWC formats.
3. Move the UBWC aligned format enums in their appropriate range.

Change-Id: I0107f10894f9edbe657fce29b99f6e909c675150
2015-04-15 18:22:24 -07:00
Linux Build Service Account
6fc33505bd Merge "gralloc: App support for new secure system heap and flags" 2015-04-14 03:25:44 -07:00
Shalaj Jain
1f9725a296 gralloc: App support for new secure system heap and flags
Add support for new secure system heap and corresponding flags
for all pixel buffers. Keep the old mm heap for secure display
buffers.

Change-Id: Ic0ee7783a2d1ff420c34396f7cc4bd5ac3058c44
2015-03-30 14:41:36 -07:00
Mansoor Aftab
e9912a6857 gralloc: Add Raw10 support in allocator
CRs-Fixed: 810651
Change-Id: I231979626e073887ae42d5bec2d25138c3dd763f
2015-03-23 11:26:20 -07:00
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
Sushil Chauhan
4686c97328 gralloc: Add support for NV12_UBWC in getYUVPlaneInfo api
Add support for NV12_UBWC HAL pixel format in getYUVPlaneInfo api to
enable GRALLOC_MODULE_PERFORM_GET_YUV_PLANE_INFO for this format.

Change-Id: I94389ddc45cba94124b36fb3ecb0b947250c0681
2015-03-11 18:15:28 -07:00
Sushil Chauhan
a9d47001c9 gralloc: Change private usage flags from enums to defines
1. It helps in checking gralloc private usage flags at compile time.
2. Define GRALLOC_MODULE_PERFORM_GET_UBWC_FLAG to enable client to
   query the value of "PRIV_FLAGS_UBWC_ALIGNED" flag at run time.
3. Add ADRENO_PIXELFORMAT_NV12_EXT in defined Adreno Pixel formats
   to fix NV12_UBWC HAL pixel format conversion to Adreno format.

Change-Id: I78ccac98f1bd1bfbd2aa596ceb7a293f3d2e5f6e
2015-02-23 13:12:22 -08:00
Linux Build Service Account
09ca40a8d3 Merge "gralloc: Allow UBWC for explicitly defined UBWC HAL pixel format" 2015-02-01 14:29:37 -08:00
Sushil Chauhan
81594f6d66 gralloc: Allow UBWC for explicitly defined UBWC HAL pixel format
1. Allow UBWC allocation, if client is using an explicitly defined
UBWC HAL pixel format OR if client sets UBWC gralloc usage flag and
GPU supports the format.

2. EGL wants gralloc to set PRIV_FLAGS_UBWC_ALIGNED bit in private
handle flags, only if GPU supports UBWC for that format.

Change-Id: I4194a046217cbc4c0a8ac2b2fb4b73ebd5076fc2
2015-01-30 10:21:19 -08:00