summaryrefslogtreecommitdiff
path: root/gralloc
AgeCommit message (Collapse)Author
2021-02-12[LSC] Add LOCAL_LICENSE_KINDS to device/linaro/hikeyandroid-s-preview-1Bob Badour
Added SPDX-license-identifier-Apache-2.0 to: audio/Android.mk bluetooth/Android.bp hifi/debug-hifi/Android.mk libmemtrack/Android.mk mali/bifrost/Android.mk mali/utgard/Android.mk recovery/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: power/Android.mk Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-MIT legacy_unencumbered to: Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL-2.0 to: gralloc/Android.bp gralloc/Android.mk gralloc960/Android.bp gralloc960/Android.mk Added SPDX-license-identifier-GPL-2.0 to: wpan/uim/Android.mk Added SPDX-license-identifier-MIT to: hifi/xaf/host-apf/Android.bp hifi/xaf/host-apf/Android.mk Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I5414686a8063382cbec9a7d8b125c2a55c68c474
2020-09-22HiKey/HiKey960: Fix up new dmabuf_system_heap_device sepolicy falloutJohn Stultz
Hridya recently got some patches merged to add new default sepolicy for the dmabuf_system_heap_device (/dev/dma_heap/system). However, since HiKey960 already had its own policy for /dev/dma_heap/system, this causes conflicts which break gralloc as well as future system use of the dmabuf heaps. So refactor the policy to avoid relabeling the system heap, or labeling the /dev/dma_heap/ directory. Also add permissions for gralloc to access the new dmabuf_system_heap_device, and take care to open the dmabuf heaps as READONLY, as RW isn't necessary and the policy limits to RO. Signed-off-by: John Stultz <john.stultz@linaro.org> Change-Id: I574f9231f1d04f3b36b4f75145f2e698b9009508
2020-04-27hikey: Add dma-heap.h to fix buildAlistair Delva
Copy this file from the hikey960 gralloc for now. This should be added to kernel-headers for supplementary UAPI in the future. Bug: 154966466 Change-Id: Ib8e276939753c2def3812b616a615daef76d28c1
2020-04-23gralloc: Extend hikey gralloc to use dmabuf heapsJohn Stultz
Extends the HiKey gralloc implementation to use the dmabuf heaps interface. Signed-off-by: John Stultz <john.stultz@linaro.org> Change-Id: I92d32bdfb6fbe951c7b7fc38d4b6699550904cb1
2020-04-23gralloc: Clean up previous ion api rework for hikey grallocJohn Stultz
Some of the work done for the ION 4.12+ ABI change could be done in a cleaner fashion. This tries to consolidate the logic so we have less conditional switching depending on if we're using legacy code or not, and also utilizes ion_alloc_fd() to simplify the older ion_alloc usage. This is useful as groundwork for switching to DMABUF heaps Signed-off-by: John Stultz <john.stultz@linaro.org> Change-Id: Ie917406646a5eb802800d3f0eaff95fa591af0db
2019-04-25Modify gralloc0 implementationValerie Hau
Add validateBufferSize and getTransportSize Bug: 131089111 Test: build, boot Change-Id: I1eb01fe01af5b0f6b6d3dbccd522eb73bd436053
2019-03-29Move hwcomposer.drm_hikey and hwcomposer.drm_hikey960android-q-preview-6android-q-preview-5android-q-preview-4android-q-preview-2.5Colin Cross
Prevent external/drm_hwcomposer from referencing device/linaro/hikey, which may not exist in all trees, by compiling most of drm_hwcomposer as a static library and then compiling just the source files that are affected by device-specific #defines and #includes in device/linary/hikey/gralloc*. Fixes: 129543119 Test: m hwcomposer.drm_hikey hwcomposer.drm_hikey960 MODULES-IN-external-drm_hwcomposer Change-Id: Idaac809ba271b27998f89c877ede46def9a417a4
2019-02-28hikey: gralloc: Add element to allow upstream drm_hwc to build w/ HiKeyJohn Stultz
Upstream drm_hwc merged some changes to support AFBC which is only supported on HiKey960. In doing so they utilize a hikey960 gralloc private handle field that doesn't exist on HiKey. Thus this patch adds the internal_format field as a union element on format. This is a union element so we don't change the structure size and since internal_format isn't used in drm_hwc when building with w/ HiKey there is no effect on the values it aliases. Change-Id: Ie73706d8f3acfaf3bfa5c187c0365d505da044d2 Signed-off-by: John Stultz <john.stultz@linaro.org>
2018-07-11hikey: gralloc: Allow use of CMA heap instead of fbdevJohn Stultz
This allows the hikey gralloc to use the ion CMA heap instead of the fbdev device. This is needed to move to the drm_hwcomposer with FBDEV_EMULATION disabled. This enables support for both legacy kernels using older ion interface and 4.12+ and newer kernels with the newer ion interface. Change-Id: I87d86d7d4f21a40e5c64c2473aea5bb4c5947de0 Signed-off-by: John Stultz <john.stultz@linaro.org>
2018-07-11hikey: gralloc: Add union alias and additional fields to improve interop w/ ↵John Stultz
hikey960 gralloc Since we use the gralloc_priv.h for hikey960 and hikey, try to align the variable names a bit using a union. This allows drm_hwcomposer importer to need less conditionally built code. Also add logic to provide a byte_stride value, which the hikey960 gralloc and drm_hwcomposer uses. Change-Id: I9a26cd244b1790afbf74138504bb0eedd44d94d4 Signed-off-by: John Stultz <john.stultz@linaro.org>
2018-07-11hikey: gralloc: Change to allow gralloc_priv.h to be sharedJohn Stultz
Change how we include files, so that other projects can inlcude the gralloc_priv.h file here. Change-Id: I07537e2b4794595d3c2e0a0b150bad1ab9d63ca8 Signed-off-by: John Stultz <john.stultz@linaro.org>
2018-07-11gralloc/gralloc960: Drop linux/ion.h references as its goneJohn Stultz
Bionic dropped the linux/ion.h header, so make sure we don't try to include it and cause build errors. Change-Id: I6af15f1bd2b53e7d5dd29a93295bfc09df36ab62 Signed-off-by: John Stultz <john.stultz@linaro.org>
2018-06-16hikey: gralloc: Treble changesJohn Stultz
This patch provides gralloc changes that are needed to work with FULL_TREBLE enabled Credit for this patch goes to Vishal Bhoj <vishal.bhoj@linaro.org> who basically was the original author and magician who got things working. I've only refactored and split up his changes to help with the submissions. Change-Id: I567bce33f7eb476dd38bbbe3a9a07c01b5c395f6 Signed-off-by: John Stultz <john.stultz@linaro.org>
2018-03-30Workaround: copy ion_4.12.h from libionSumit Semwal
libion adds a temporary header for 4.12 headers with new ION ABI interface. Since it's internal to libion being temporary, for now, copy it here. This will need to be removed once header situation in libion is sorted. Test: tested with both new and old kernels. Change-Id: I7a81deaeb143b39ab1697ea90b670a65bf597084 Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
2018-03-30hikey: gralloc Update for new ION interfaceLaura Abbott
4.12+ kernels have an updated ION interface; this adapts hikey's gralloc to work seemlessly with both old and new kernels' interfaces. Test: validated with both new and old kernels on hikey, with aosp master Change-Id: Ia019fd7f3f5b3e9765c8f26032ff0063e5391f56 Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> [sumits: maintain compatibility with older kernels]
2018-03-30gralloc: add support for HAL_PIXEL_FORMAT_BLOBYongqin Liu
so that we could have CtsNativeHardwareTestCases pass Test: manually cts with hikey Change-Id: Ia5b3fec3f11f3c0e94e4d5208bb9d04ef872e2ad Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2018-03-30gralloc: Fixup r8p1 gralloc to build for hikeyJohn Stultz
Apply some changes to the r8p1 gralloc code to get it building for hikey and silence warnings. Change-Id: Iaf8dfc13f7922d7ca850acacf2856a9302ed3f09 Signed-off-by: John Stultz <john.stultz@linaro.org>
2018-03-30gralloc: Import utgard r8p1 gralloc updateJohn Stultz
This imports the utgard r8p1 gralloc update. No changes made, so its not expected to build properly Change-Id: I7c8948f36fe2d6b265eaad9f23bcb9a1a28be08f Signed-off-by: John Stultz <john.stultz@linaro.org>
2018-01-22Include what we use.Dan Albert
Test: mma Bug: None Change-Id: I704787703c2fde533bda066e7c49d9f0c6bd2f26 Exempt-From-Owner-Approval: Janitorial
2017-12-06hikey: gralloc: Clean up warningsDmitry Shmidt
Test: Manual Change-Id: I331536fe42a7ba3b580dfa8bd899d99d72093a67 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2017-12-06gralloc: add support for HAL_PIXEL_FORMAT_BLOBYongqin Liu
so that we could have CtsNativeHardwareTestCases pass Test: manually cts with hikey Change-Id: Icaa6062d7eecc1b41b2b3374accdbbe39f4e3bc0 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2017-10-12Workaround: copy ion_4.12.h from libionSumit Semwal
libion adds a temporary header for 4.12 headers with new ION ABI interface. Since it's internal to libion being temporary, for now, copy it here. This will need to be removed once header situation in libion is sorted. Test: tested with both new and old kernels. Change-Id: If1f4cef26df2d2f173fe158da30d6ca64a3226c3 Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
2017-10-12hikey: gralloc Update for new ION interfaceLaura Abbott
4.12+ kernels have an updated ION interface; this adapts hikey's gralloc to work seemlessly with both old and new kernels' interfaces. Test: validated with both new and old kernels on hikey, with aosp master Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> [sumits: maintain compatibility with older kernels] Change-Id: Ic30470004b48f14765fdee8179de6d17f7b448b5
2017-10-06hikey: Add hikey32 target for arm32Dmitry Shmidt
Change-Id: I3db05ce6678bd50efb4839f1eca634cccf0b8891 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2017-05-30HiKey960: Properly integrate mali bifrost gralloc for HiKey960John Stultz
This properly integrates the mali bifrost gralloc implementation for HiKey960. This change depends on a pristine libGLES_mali.so which needs an updated arm vendor package. However, after this change, the hisi vendor package is no longer necessary. Change-Id: I7a01911a911525ba6f2dae6cfb0adc1d22412c06 Signed-off-by: John Stultz <john.stultz@linaro.org>
2017-05-08gralloc: fix numFds for framebuffer handlesChia-I Wu
It is an error to claim one fd, while the fd is -1. Bug: 37550237 Test: boots Change-Id: I7ad0d7c2bbe0bff8f462666bbf5fab38e9115578
2017-05-08gralloc: make register framebuffer no-opChia-I Wu
Bug: 37550237 Test: boots Change-Id: Iccc7a5dd5bb9deb980783ccc15ad8f50243c21b4
2017-05-08gralloc: do not use private_handle_t::ion_hndChia-I Wu
This makes private_handle_t native_handle_clone friendly when GRALLOC_ARM_UMP_MODULE is not defined. Bug: 37550237 Test: boots Change-Id: I6c489eb4f8f6791ab91ddffe55d9ce3dc96509a0
2017-05-08gralloc: make fbdev fd a shallow copyChia-I Wu
We never free private_module_t::framebuffer once it is initialized. We can use a shallow copy of the fbdev dev. Bug: 37550237 Test: boots Change-Id: I552b40c0a59d9f4ec5442e3a284f115a88061c3e
2017-05-03hikey: Compile gralloc only for hikeyDmitry Shmidt
Test: Manual Bug: 37957838 Change-Id: I1f639b31eb9c95f0845b0571b5535f5d44aabff7 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2017-05-03hikey: Check framebuffer memory allocationandroid-wear-o-preview-4android-wear-o-preview-3android-o-preview-2Jinguang Dong
Resolve the crash when the framebuffer dev malloc failed Test: Compiles and device boots up. Change-Id: Idb0d0038d351c1ac71c289799f7fd639728f40b7
2016-02-04gralloc: Update gralloc source to e219158a67fbfbedbac9John Stultz
This patch updates the gralloc source to: Subject: Add support for hikey Sha1: e219158a67fbfbedbac99e15809b948313aeb5fa From Xinliang's tree here: https://github.com/xin3liang/gralloc-mali.git Also inlcudes minor whitespace/style fixes and corrected LOCK_STATE_READ_MASK value, noticed in review on Gerrit. These changes are needed to support the r6p0 version of the binary mali graphics libraries. Change-Id: Ia33671447b36fd83da544af6da8ec6ce48e80b05 Signed-off-by: John Stultz <john.stultz@linaro.org>
2015-12-07Include gralloc sourcesVishal Bhoj
Change-Id: I1c77c89ea568ca69732b507ebab9f1696dec9398 Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>