Commit graph

21 commits

Author SHA1 Message Date
Konsta
d500d5ee8d gbm_mesa: Add android makefiles and init/vintf fragments
* APEX is based on cuttlefish implementation [1].

[1]: https://android.googlesource.com/device/google/cuttlefish/+/refs/tags/android-16.0.0_r1/guest/hals/gralloc/
2026-07-15 22:37:40 -04:00
Yiwei Zhang
9f2c22f6e9 ANDROID: drop arcvm targets from blueprint
...since generic is the one to use going forward.

Bug: N/A
Test: presubmit
Change-Id: Idd427e4619ef44e126c6b8c245571df5cc02f1e5
2025-06-30 23:08:29 +00:00
Dominik Behr
035900982f remove mediatek suffix entries
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
2025-06-18 17:20:32 -07:00
Dominik Behr
a1e715acd8 cros_gralloc: add support for mt8186
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
2025-03-27 19:25:18 -07:00
Kiyoung Kim
6210dc3d16 Define vintf_fragments as modules
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
2024-08-12 13:48:01 +09:00
Ryo Hashimoto
860fbc8f83 Revert "gralloc: Use libminigbm_gralloc4_utils in allocator4/mapper4"
This reverts commit 5e26e6df86.

Reason for revert: b/225254942

Change-Id: I219e87de627fd00092ab9f66dc6cacb1a34b01bb
2022-03-18 09:33:05 +00:00
Jason Macnak
5e26e6df86 gralloc: Use libminigbm_gralloc4_utils in allocator4/mapper4
... and also alphabetize.

Bug: b/223410512
Test: cvd start
Test: vts -m VtsHalGraphicsAllocatorAidl_TargetTest
Test: vts -m VtsHalGraphicsMapperV4_0Target
Test: cvd start --gpu_mode=gfxstream
Test: vts -m VtsHalGraphicsAllocatorAidl_TargetTest
Test: vts -m VtsHalGraphicsMapperV4_0Target
Change-Id: I5ce5d93e137f37b326bd428f53288d8fb5478651
2022-03-16 14:01:16 -07:00
Jason Macnak
3b5bd44f32 gralloc: Add libminigbm_gralloc4_utils
... to support upcoming refactoring.

Bug: b/223410512
Test: presubmit
Change-Id: I66795dc0ddb69edeb80cfd4ff6dbb4fec78d8424
2022-03-16 14:01:16 -07:00
Lev Rumyantsev
95b765d807 Revert "gralloc: Adds Minigbm AIDL allocator"
Revert submission 17143242-cherrypick-minigbm-allocator-aidl-twsnybob5q

Reason for revert: b/224637687
Reverted Changes:
Iaf309fcbd:Add Minigbm Gralloc AIDL allocator
Idd114498c:gralloc: Adds Minigbm AIDL allocator

Change-Id: Ia8002ec629a16286e9efcca3cb8fb5a105dd86e5
2022-03-15 20:18:54 +00:00
Jason Macnak
7d0aa67904 gralloc: Adds Minigbm AIDL allocator
The switch from HIDL to AIDL does not introduce any new interface
methods.

Bug: b/223410512
Test: cvd start
Test: vts -m VtsHalGraphicsAllocatorAidl_TargetTest
Test: vts -m VtsHalGraphicsMapperV4_0Target
Test: cvd start --gpu_mode=gfxstream
Test: vts -m VtsHalGraphicsAllocatorAidl_TargetTest
Test: vts -m VtsHalGraphicsMapperV4_0Target
Change-Id: Idd114498c79bd48502e370c6144d8f08693e3781
2022-03-10 14:42:35 -08:00
Satoshi Niwa
731b55a950 minigbm: Rename variant from "virgl" to "arcvm"
It's possible to switch its backend from virtgpu_virgl to another
one later. b/195673105#comment33

Bug: 195673105
Test: mma
Change-Id: I32396118fe20e220604ad36893e9a6c690e9fd4f
2021-11-05 06:24:26 +09:00
Satoshi Niwa
7658cd6a0e minigbm: Android.bp: Add virgl varient of gralloc.minigbm
Mostly copied from msm varients,
except for cflags:["-DVIRTIO_GPU_NEXT"]

Bug: 195673105
Test: mma
Change-Id: If5b1b46cbb248f26ec7720d012a679a902236707
2021-11-04 17:49:05 +09:00
Nataraj Deshpande
a4cc189fc9 minigbm: Andorid.bp: Add intel varients to gralloc4
gralloc4 built with libminigbm_gralloc.so and gralloc0
with libminigbm_gralloc_intel.so, causes mismatch hence
leading to get_buffer failure during CTS tests.

The commit helps to have same instance of default libraries
shared between gralloc0 and gralloc4 and fixes get_buffer
failure on intel platform.

Change-Id: I82e8b942f4a817c97cbc58efc64d55fd960767af
Signed-off-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
2021-08-27 13:51:31 -07:00
Roman Stratiienko
0a3c16b677 minigbm: Wrap cros_gralloc code into shared library
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
2021-07-09 14:46:30 -07:00
Roman Stratiienko
a264847ff5 minigbm: Cleanup Android.bp
Goals:
1. Cleanup
2. Allow the declaration and configuration of targets outside the tree

Out-of-tree Android.bp example:
'''
cc_binary {
    name: "android.hardware.graphics.allocator@4.0-service.minigbm_vc4",
    init_rc: ["allocator.minigbm_vc4.rc"],
    defaults: ["minigbm_gralloc4_allocator_defaults"],
    cflags: ["-DDRV_VC4"],
}

cc_library_shared {
    name: "android.hardware.graphics.mapper@4.0-impl.minigbm_vc4",
    defaults: ["minigbm_gralloc4_common_defaults"],
    cflags: ["-DDRV_VC4"],

    srcs: [":minigbm_gralloc4_mapper_files"],
}
'''

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: Ia535814c361d3625aa7f31c79674ff1ad965e1c0
2021-06-23 18:43:02 +03:00
John Stultz
d5f571990c minigbm: Android.bp: Add msm varients of gralloc.minigbm and libminigbm_cros_gralloc
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
2021-04-27 21:11:04 +00:00
John Stultz
893f7f144a minigbm: Andorid.bp: Use cc_defaults in defining libminigbm_cros_gralloc and users
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
2021-04-27 21:11:04 +00:00
Bob Badour
bcc2498bb3 [LSC] Add LOCAL_LICENSE_KINDS to external/minigbm
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
2021-02-14 10:37:21 -08:00
Roman Stratiienko
92b511087d cros_gralloc: add vintf_fragments for gralloc4
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I0c84a7fc3d75a836ab061ca24769a997cbafe844
2021-01-23 13:19:00 +02:00
Jason Macnak
96edf3270e Sync aosp and internal minigbm
The merge in aosp/1431491 did not re-apply many of the changes
from aosp/1431490 as intended.

Bug: b/171019648
Test: launch_cvd
Test: launch_cvd --gpu_mode=gfxstream
Merged-In: Id5222980cc2e7c284a846259c808bf79cf5f2a75
Change-Id: I3a0136b6303a1b1c5e27f7e225466438e3de0616
2020-10-28 12:10:27 -07:00
Marissa Wall
1476c7ea85 gralloc4: adds gralloc4 support
Implements the Allocator 4.0 and Mapper 4.0 interfaces.

Some notable features of the 4.0 interface:
- buffer metadata getter/setters
- buffer flushing
- buffer debugging (buffer listing and buffer id)

Exempt-From-Owner-Approval: OWNERS.android is not being parsed

Bug: b/146515640
Test: m && launch_cvd
Test: m && launch_cvd --gpu_mode=drm_virgl
Change-Id: I27f020b4f661890bcc2817deb09ffb9af1c76f1b
2020-05-29 18:46:11 +00:00