Define vintf_fragments as modules if the file is shared among multiple
modules to avoid any conflicts.
Bug: 322089980
Test: aosp_cf_x86_64_phone build succeeded
Change-Id: I653ed96587445a3e0126b3eee415edce7b657939
... except when running with software rendering as apps do not
know that they would need to request additional CPU_* usage
for GPU_* usage.
Bug: b/356845188
Test: cts -m CtsNativeHardwareTestCases
Change-Id: I3536d80469d2187550558e9d02795896de4f9827
This reverts commit b7a9a2b7d5.
Reason for revert: Crash resolved by Ieb07b5bbc206f07f69e4afba921149f49d6fe8c4
Bug: 349870098
Change-Id: I49848f6e7311c1f44e6c988cb42107ed79da3a6b
This includes changes I63a5352e, Ia34b7d3a, I2685813f and I07e60729
mediatek: Add MT8196
minigbm: Reduce allocation size for MT2T allocations
minigbm: #define MINIGBM_HAS_GBM_BO_GET_MAP_INFO
Add depth buffer support for virtgpu virgl
Change-Id: I125c0b751f86b217a6ffbf7ec3fd2a1ddf848461
Bug: b:347022601
Test: Ran app that export/import depth through AHB with cf
Change-Id: I07e60729b18a9f15e0d795c33c462ba4b4f255b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5636740
Tested-by: Jean-François Thibert <jfthibert@google.com>
Reviewed-by: Dawn Han <dawnhan@google.com>
Commit-Queue: Jean-François Thibert <jfthibert@google.com>
Reviewed-by: Jason Macnak <natsu@google.com>
* changes:
gralloc: Avoid using std::optional in shared memory metadata
gralloc: Move buffer metadata accessing into cros_gralloc_buffer
gralloc: Move buffer metadata initialization into common layer
Android.bp files are maintained in the AOSP fork repository.
Change-Id: I492e0c2154b22cd4cda85e379df2578b352c23df
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4961034
Commit-Queue: Jason Macnak <natsu@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Jason Macnak <natsu@google.com>
... to pull in https://crrev.com/c/4897926.
Bug: b/300616292
Bug: b/300194143
Bug: b/294661992
Test: launch Cuttlefish, run SurfaceFlinger_test, inspect
tracing around lifetime of cros_gralloc_driver
Change-Id: I72c9164c2194af87bab0800fd821b4bc0934f245
... to ensure the lifetime of the underlying cros_gralloc_driver
matches those of the various Mapper* interfaces. Without this, the
the destruction of the static cros_gralloc_driver `s_instance`
could race with a potential CrosGralloc4Mapper user on another
thread which is still alive at the time of exit() (for example,
a buffer being cleaned up on a libhwbinder worker thread).
Bug: b/300616292
Bug: b/300194143
Bug: b/294661992
Test: launch Cuttlefish, run SurfaceFlinger_test, inspect
tracing around lifetime of cros_gralloc_driver
Change-Id: Id8e2dbff471c03f7b663952524905a06cc03fbc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4897926
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>
* aosp/upstream-main: (27 commits)
minigbm: add some validation check in cros_gralloc
minigbm: update format of mediatek.c
Revert "i915: Vertical align video encode buffers to macroblock size"
minigbm: drv: Fix MINIGBM_DEBUG usage on Android
mediatek: Add BO_USE_PROTECTED use_flag for gpu and video decoder
i915: Vertical align video encode buffers to macroblock size
Don't print verbose messages by default
virgl: Store format modifier in blob's bo meta
Fix convertToFenceHandle()
minigbm: update drv_get_os_option() to try getenv() first
Update usage to 64-bit
virtgpu_cross_domain: fix prop query for mt8183 camera quirk
virtgpu_virgl: use blobs for ABGR8888
minigbm: move camera work-around
mediatek: Add BO_USE_PROTECTED use_flag to support secure buffer allocation
i915: prefer tile4 for non-linear scanout buffers
i915: allow linear mapping for P010 scanout
minigbm: remove `close_gem_handle`
mediatek: Exclude MT8173's FP16 and 10-bit ABGR support
minigbm: Use clflushopt if supported
...
Change-Id: I38fb3f2c699205f73633e07d1824c4fd48dac5f5
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Add default set of minigbm SELinux policies, to suppress
audit of minigbm reading vendor.minigbm.debug property,
for the devices which do not use this property.
Change-Id: I277a553e869b7a53a85ca70064c2eef110afeee2
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
1. Check if the buffer handle
- Validate if the handle is null or not
- Check the size of the handle to make sure it will not cause oob read/write
2. Check num_planes to make sure it matches with numFds
3. Created b/291606090 for the follow up about updating cros_gralloc_driver level api to take cros_gralloc_handle_t
BUG=b:289303132
TEST=patch the change on rvc-arc and tested with ARCVM
Change-Id: Id03ec45f928fe6db62bb1722ee0dbc6c8831fd46
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4674736
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Dawn Han <dawnhan@google.com>
Tested-by: Dawn Han <dawnhan@google.com>
... to not return address to a local stack variable.
Noticed by dustingreen@
Bug: b/287536665
Test: cvd start && vts -m VtsHalGraphicsMapperV4_0Target
Change-Id: Iba486270a7ae3f8fbe50b41e3ea4c32aa0c4acad
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4615434
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Auto-Submit: Jason Macnak <natsu@google.com>
Tested-by: Jason Macnak <natsu@google.com>
Commit-Queue: Jason Macnak <natsu@google.com>
Move mt8183_camera_quirk_ into struct cross_domain_private.
Add a helper `drv_get_os_option` in `drv_helper` to query os option.
Advertise DRM_FORMAT_MTISP_SXYZW10 as supported format in virtgpu_cross_domain.c.
Implement cross domain's own resolve_format_and_use_flags entry point.
BUG=b:269982880
TEST=tested on a kukui machine after applying the change. Camera and
screen recording works fine.
Change-Id: Ia0d6e2cc701477aa6b9542de84e24f8aeb5a29e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4304961
Commit-Queue: Dawn Han <dawnhan@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Tested-by: Dawn Han <dawnhan@google.com>
The multi-planar formats are being allocated into a single plane,
and the minigbm exynos backend is dropped. So we can use `handle` instead of handles as of now.
Remove some of the helper functions that calculate the number of planes.
There is no need to check if there is more than one kernel buffer per buffer object.
Added a new function `drv_gem_close` in `drv_helpers` that can be used by `drv_gem_bo_destroy` and `drv_prime_bo_import`. It can be used to clean the unused gem_handle.
Bug=b:266776512
TEST=camera and screenshot work fine after deploying the change #strongbad
TEST=camera and screenshot work fine after deploying the change #kukui-arc-r
TEST=camera and screenshot work fine after deploying the change, tested a couple of apps in the Google Play Store, and checked file `dma_buf/bufinfo` to see there's no object leaking. #guybrush
Change-Id: Ib63559504e4cb8f1a32ae90170925146613d694f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4297873
Commit-Queue: Dawn Han <dawnhan@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Dawn Han <dawnhan@google.com>
Correct the formats in cros_gralloc_driver.
Bug=N/A
TEST=N/A
Change-Id: I59bc09ee04dd05ffbd83243d6c071eb018facab2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4324140
Tested-by: Dawn Han <dawnhan@google.com>
Commit-Queue: Dawn Han <dawnhan@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Add support for the MT8183 private camera format to gralloc. This is
done as a vendor specific workaround that bypasses the normal minigbm
format resolution, targeting kukui+ARCVM.
This is aimed at working around the fact that the virtgpu cross domain
backend needs to directly resolve formats itself. Proper support for
involving the host when resolving formats would be cleaner. However,
that would be a substantial amount of work for what is (hopefully) a
one-off situation.
BUG=b:158617858
TEST=testBasicOpaqueToJpegReprocessing on kukui-arc-r DUT
Change-Id: I8e1d74aac0a16babd7d7e2e630ff8affb3104e8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4258986
Tested-by: David Stevens <stevensd@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Blob formats (aka buffers) get represented as R8 textures with height
of one and width==size. These have no particular stride requirement,
even though the host might ask for a pitch that would make sense for
a 2D R8 texture with height greater than one.
Relax the validateBufferSize check for format_blob rather than set the
stride. As blob defined: buffers of this format must have a height of
1, so height doesn't need to be checked specifically.
BUG=b:269565421
TEST=CQ
Change-Id: I7a8d4dbf292330df0c24b502abd9dbf3dceac728
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4263402
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Variants of minigbm_create_default_device are open-coded in multiple
places. This should be used wherever minigbm can be assumed.
BUG=none
TEST=manual check that the function works
Change-Id: I3ad9897355ab72080fdca329674df09087b9adfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4163418
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Chia-I Wu <olv@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
CF doesn't support any additional options, so just reject
anything set on it.
Test: VtsHalGraphicsAllocatorAidl_TargetTest
Bug: 257075040
Change-Id: If86790bee805af27c2bf6fda3ed2b18351f5fd38