Everything now builds under the same minigbm name for all platforms.
Bug: 388092228
Test: Boot corsola to desktop
Flag: EXEMPT: desktop-only change
Change-Id: I00708383151f832bcccec1aad8091f422dfcf2c3
goldfish-opengl will be retired
Bug: 416327221
Test: presubmit
Change-Id: Ie7250187d9604f9c6f9d368a513493dc72aa5c58
Signed-off-by: Roman Kiryanov <rkir@google.com>
if the heap is available
Bug: b/406253026
Test: run android.graphics.cts.BitmapTest#testWrapHardwareBufferWithProtectedUsageFails
Flag: EXEMPT: desktop-only change
Change-Id: Ifbd1d75e63609e5e7c24e0ec6dce7aaba9f14b98
Add build changes for mt8186.
Add ARM metadata types: compression, plane fds and data type.
Add mediatek_drm.h which is not available.
Bug: 388092228
Test: boot corsola with minigbm gralloc/mapper
Change-Id: I1f1e8a57f37e26694320c3ddee01fbad453f854b
from the current libgbm build rule, so that one minigbm build rule
would work for all platforms based on the minigbm platform
soong config varible which is set in the device repository.
Test: boot to homescreen with both msm and generic minigbm
allocator and mapper versions
Change-Id: I939730626eb478f699b1b099054446f25bb7289c
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Suggested-by: Jason Macnak <natsu@google.com>
Previous to this CL, cros_codecs caused a build failure in soong
with the following message:
error: system/cros-codecs/Android.bp:17:1: module "libcros_codecs"
variant "android_arm64_armv8-2a_cortex-a55_rlib_rlib-std": depends
on //external/minigbm:libgbm_sys which is not visible to this module
You may need to add "//system/cros-codecs" to its visibility
This CL updates libgbm_sys's visibility with cros_codecs.
Bug: 389780527
Test: Build cros_codecs with libgbm_sys as a depedency.
Change-Id: Id4538880193adfda55d755449d1984d83b0a6919
minigbm has platform dependent compile flags that need to be set
correctly to work on the chipset (e.g. -DDRV_I915 on Intel devices). The
libminigbm_gralloc_* variants had set them, but the libgbm doesn't. This
CL introduces a Soong config variable "platform" under "minigbm"
namespace to control libgbm build variants, and apply the flags from
gralloc library to each variant.
Device .mk's can set it like:
$(call soong_config_set, minigbm, platform, intel)
Refer to
https://crsrc.org/o/src/third_party/chromiumos-overlay/media-libs/minigbm/minigbm-9999.ebuild
for ChromiumOS configuration of the compile flags.
Bug: 362894809
Test: m libgbm
Change-Id: I64d03604902072da85643c932832064a2425e25b
* 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
This provides the bindings necessary to use the Rust gbm crate within
Android source tree. Bindgen flags used in the rust_bindgen definition,
as well as the workaround described in wrapper.h were based on upstream
gbm-sys crate's build.rs [1].
Looking at other rust_bindgen modules, they are generally defined
alongside the native module they provide bindings to.
Details: go/drm-gbm-rust-crates-for-android
[1] 606c4260e0/gbm-sys/build.rs (L78)
Bug: b/328181805
Test: lunch aosp_cf_x86_64_only_phone-trunk_staging-userdebug && m
Test: m libgbm_sys
Change-Id: I3065f7fe35f4a86b72ac90c34476da6304155daf
Needed to make crosvm vendor available
Bug: 309149829
Test: build aosp_cf_x86_64_phone_trusty_vm-userdebug
Change-Id: I1872e332d907035acd914d50919461ac59405b68
After commit db3c6fcf02 ("gralloc: Hide dmabuf heap allocator
behind of a flag") landed, db845c started seeing boot failures
and the following sepolicy denials in the logcat:
allocator@4.0-s: type=1400 audit(0.0:446): avc: denied { read write } for path=2F6D656D66643A7072696D6553686164657243616368655F64737420726573657276656420726567696F6E202864656C6574656429 dev="tmpfs" ino=1378 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:hal_graphics_allocator_default_tmpfs:s0 tclass=file permissive=0
It seems disabling the the libdmabufheap allocator and falling
back to memfd is causing sepolicy troulbe which blocks
allocations from working.
This patch adds -DHAS_DMABUF_SYSTEM_HEAP to the
libminigbm_gralloc_msm target, which resolves the issue.
However its not clear if this is the best solution, as I suspect
other devices (_meson, etc) may also need this fix.
Fixes: db3c6fcf02 ("gralloc: Hide dmabuf heap allocator behind of a flag")
Signed-off-by: John Stultz <jstultz@google.com>
Change-Id: Id93c431ac3a449fc7057bec8dff82356b0668153
... to be used with https://crrev.com/c/3563512.
Bug: b/227375257
Test: cvd start
Test: vts -m VtsHalGraphicsMapperV4_0Target
Change-Id: Iae4e8e2447a4f76ed4d261f7d8bf7287dec7a4d9
... to pull in support for `gralloc->set(<metadata>)` for Cuttlefish
from https://crrev.com/c/3421048 and the related changes in the chain.
Bug: b/219757060
Test: cvd start
Test: cts dEQP-VK.api.external.memory.android_hardware_buffer.*
Test: vts -m VtsHalGraphicsMapperV4_0Target
Test: cvd start --gpu_mode=gfxstream
Test: cts dEQP-VK.api.external.memory.android_hardware_buffer.*
Test: vts -m VtsHalGraphicsMapperV4_0Target
Change-Id: I541d479da3b208c25666fcc50f89c790c361f1f6
Currently upstream video video drivers don't support
QCOM_COMPRESSED drm modifier, so disable it on NV12 bufffers in
the build for now.
Submitted to AOSP, as upstream doesn't include the Android.bp files.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I86730572d0253455c76552c99d135e3246be6052
It's possible to switch its backend from virtgpu_virgl to another
one later. b/195673105#comment33
Bug: 195673105
Test: mma
Change-Id: I32396118fe20e220604ad36893e9a6c690e9fd4f
... to update Minigbm for Cuttlefish to pull in https://crrev.com/c/3208931
to restrict 2D allocs to max supported SwiftShader size.
Bug: b/194426249
Test: `cts -m CtsNativeHardwareTestCases` with aosp/1845813
Change-Id: I9f538e48a72ec699617b9e653812f2b785c5e39a
... to update Minigbm for Cuttlefish to pull in clean ups for
supported combinations and to pull in restricting 2D allocs to
max supported SwiftShader/llvmpipe size.
Bug: b/201325625
Bug: b/194426249
Test: launch_cvd --gpu_mode=guest_swiftshader
Test: launch_cvd --gpu_mode=gfxstream
Change-Id: I11c71b95987cedbb27515e85559e00c5df8c0dd9
In some cases both gralloc4 and gralloc0 mapper APIs may
be used by the single process.
For example gralloc4/mapper is always used for importing buffers
by the framework. Later those buffers may be accessed via gralloc0
API (by mesa3d for example).
Wrapping cros_gralloc code into a shared library ensures both frontends
will use a single cros_gralloc_driver instance, thus making such scenarios
possible.
Bug: 191895066
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I17f8f781eed42051fbfa9cf34b53346b1ec7a41b
* changes:
minigbm: Android.bp: Add msm varients of gralloc.minigbm and libminigbm_cros_gralloc
minigbm: Andorid.bp: Use cc_defaults in defining libminigbm_cros_gralloc and users
In order to support msm devices, we need to enable -DDRV_MSM
as a build flag for both gralloc.minigbm and libminigbm_cros_gralloc.
This unfortunately requires new _msm post-fixed targets for both
gralloc.minigbm and libminigbm_cros_gralloc as well as for
the allocator and mapper HALs.
This feels a bit messy, but seems to be the only way to only
build with -DDRV_MSM on msm devices.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Ic43967bddd40bab4622f92faebb96e679a19891d
This splits out some cc_defaults for libminigbm_cros_gralloc and
users of that library. This is needed because the underlying
minigbm_defaults needs to be built with different cflags for
different hardware, so this change allows us to share the
default build values.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I2111c325d4a206b8889a9314a5204b34a38a1ee1
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
cros_gralloc/gralloc4/Android.bp
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
SPDX-license-identifier-MIT
to:
Android.bp
Added SPDX-license-identifier-BSD
to:
cros_gralloc/gralloc3/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Exempt-From-Owner-Approval: janitorial work
Change-Id: Iff770232cbc5f95eb6b015587cd670d10ad616d5
To do so, crosvm and its dependencies have the apex_available property
set to "//apex_available:platform", "com.android.virt" to explicitly
acknowledge the joining.
Bug: 174639241
Test: m com.android.virt
Change-Id: I11f02fea20b81f070ce5fb245eebb70421bb4e0b
... as being able to use cc_library in header_libs is not
intended and does not work on all branches which blocks
aosp/1497292.
Bug: b/173252016
Bug: b/171019648
Test: m
Change-Id: Ia569aa47d28fb3e89e9315b44b6634b7f21fcf0e
I removed the Android.bp files from upstream as they seemed
to get out of sync quickly. Let's just keep them in Android
repos.
Bug: b/161909468
Test: launch_cvd
Merged-In: I27f020b4f661890bcc2817deb09ffb9af1c76f1b
Change-Id: Id5222980cc2e7c284a846259c808bf79cf5f2a75