Commit graph

1807 commits

Author SHA1 Message Date
Android Build Coastguard Worker
531e794179 Snap for 13412669 from 9596b87800 to 25Q4-release
Change-Id: Ia158bf7a3d76d775bf80636b30c2fcf1c17d6e39
2025-04-26 14:11:01 -07:00
Juston Li
9596b87800 Merge "UPSTREAM: xe: support BO_USE_GPU_DATA_BUFFER for image storage formats" into main 2025-04-23 10:15:39 -07:00
Juston Li
724084e75f UPSTREAM: xe: support BO_USE_GPU_DATA_BUFFER for image storage formats
Android gralloc via AIDL allows use of AHB-backed external memory for
storage images with usage AHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER; its
equivalents are VK_IMAGE_USAGE_STORAGE_BIT/BO_USE_GPU_DATA_BUFFER.

On older interfaces before gralloc 4.1/AIDL, BO_USE_GPU_DATA_BUFFER
is only allowed for BLOB formats; this adds it to combinations with
non-BLOB formats for the newer interfaces.

The image_storage_formats list is a subset of the formats being used
that support VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT which for anv is
power-of-two formats; here it ends up excluding the YCbCr formats.

Bug: 397763052
Test: dEQP-VK.wsi.android.[display_timing.*/ swapchain*]

Change-Id: I6b034790fa77f15fb341acfae4a45255231a5a14
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6442090
Commit-Queue: Juston Li <justonli@google.com>
Commit-Queue: ChromeOS Auto Runner <chromeos-auto-runner@chromeos-bot.iam.gserviceaccount.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Tested-by: Juston Li <justonli@google.com>
(cherry picked from commit db68fa51e4b7ed19546c80806da9f462c3b5c8d7)
2025-04-22 22:34:30 +00:00
Dominik Behr
1a29f8b3da cros_gralloc: AIDL fixes for pixelformats and getMetadata
- fix return values for getArmMetadata
- add some understanding of new AIDL pixelformats

Bug: b/388092228, b/397712115, b/377616165
Test: boot corsola with AIDL gralloc/stable c mapper
Flag: EXEMPT desktop-only

Change-Id: I66b2ec6af7227cfb4c92e9459aeeee00aaa14b8f
2025-04-21 16:47:40 -07:00
Android Build Coastguard Worker
4cdb40247a Snap for 13381573 from 88b88bfa69 to 25Q4-release
Change-Id: I5d778534637b07a179d8fe77914bed9a1faf11ff
2025-04-19 14:15:23 -07:00
Dominik Behr
88b88bfa69 Merge "mediatek: advertise support of protected buffers only" into main 2025-04-16 18:33:01 -07:00
Ryan Neph
96ed6058b5 UPSTREAM: xe: add missing rplp ids to match i915 backend
RPL is the only Xe-supported board that was missing PCI ids that were
present in the i915 backend. Add them to Xe backend for parity.

Reformatted adlp_ids to match other arrays, no functional changes.

BUG=b:410014030
TEST=ChromeOS CQ
TEST=Android Presubmit

Change-Id: I2714133456893b59ade7572e5634716953b2bbd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6454754
Reviewed-by: Matt Turner <msturner@google.com>
Auto-Submit: Ryan Neph <ryanneph@google.com>
Commit-Queue: ChromeOS Auto Retry <chromeos-auto-retry@chromeos-bot.iam.gserviceaccount.com>
Tested-by: Ryan Neph <ryanneph@google.com>
(cherry picked from commit 972cf6778f284cdf7350e0ab9492323ed4201ccf)
2025-04-15 13:44:18 -07:00
Dominik Behr
89677c4474 mediatek: advertise support of protected buffers only
if the heap is available

Bug: b/406253026
Test: run android.graphics.cts.BitmapTest#testWrapHardwareBufferWithProtectedUsageFails
Flag: EXEMPT: desktop-only change
Change-Id: Ifbd1d75e63609e5e7c24e0ec6dce7aaba9f14b98
2025-04-14 16:34:23 -07:00
Android Build Coastguard Worker
334c9ef696 Snap for 13350447 from 0df716da2c to 25Q4-release
Change-Id: Iee56780328864e47cb9597c6a5d5b34072355612
2025-04-12 14:15:15 -07:00
Andres Calderon Jaramillo
0df716da2c mediatek: Resolve DRM_FORMAT_FLEX_YCbCr_420_888 to NV12 outside MT8173
On Android, cros-codecs needs NV12 buffers that can be written to by the
CPU so that it can do MM21->NV12 de-tiling using libyuv. On Android, we
can't specify that we want NV12 buffers specifically using the gralloc
API. Instead, we ask for DRM_FORMAT_FLEX_YCbCr_420_888 and hope for the
best.

Before this CL, minigbm was returning YV12 buffers in this case on
corsola. This CL makes it so that on the mediatek backend,
DRM_FORMAT_FLEX_YCbCr_420_888 is always resolved to NV12 outside of
MT8173.

Bug: 408498122
Bug: 408503818
Test: adb -s $DUT shell codec -vpR /tmp/1080.mp4 on corsola
Test: vts-tradefed run vts --serial $DUT -m VtsHalMediaC2V1_0TargetVideoDecTest on corsola
Change-Id: Idbdba3434fdfdb0bf12aa7c92d1f9523e5870aba
2025-04-07 17:52:34 +00:00
Android Build Coastguard Worker
63b4210eed Snap for 13290005 from e528354222 to 25Q4-release
Change-Id: I8c97e4c8d20f9880a701d0f68e2dc4be68a8d59e
2025-03-29 14:15:56 -07:00
Treehugger Robot
e528354222 Merge "cros_gralloc: add support for mt8186" into main 2025-03-28 15:30:25 -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
Ryan Neph
07fbca84b1 Merge remote-tracking branch 'aosp/upstream-main' am: 455b745639
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3563267

Change-Id: I9e3e0aa4c46907d209ae0f30c5ae25c832ffa2c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-03-26 17:02:31 -07:00
Ryan Neph
455b745639 Merge remote-tracking branch 'aosp/upstream-main'
Bring in from upstream:
* d30ea066 (crrev/c/6394316) intel_defines: Add ADL-N PCI ids

Get these earlier missed changes from upstream:
* 3dd534cc Add padding for i915 cursor buffers
* aec65367 virtgpu_cross_domain: Hold a lock for all of bo_create

Bug: 403278247
Test: CI

Change-Id: I0abfa7707032a4601dc456628b20a30ea498e8ea
2025-03-26 15:24:03 -07:00
Treehugger Robot
a733122a10 Merge "minigbm: expand owners for desktop development" into main 2025-03-26 10:39:48 -07:00
Yiwei Zhang
9acaaad9a0 minigbm: expand owners for desktop development
To ease the desktop development, it's better to expand the existing
owners of minigbm. Unlike CrOS side, I'd like to keep the list minimal
so only introduce per-file for the hw backends under our control.

Bug: N/A
Test: build
Change-Id: I1f05842af9e35c669c28b9e45c443ff30c87d56e
2025-03-26 05:59:00 +00:00
Jeevaka Prabu Badrappan
d30ea0663a intel_defines: Add ADL-N PCI ids
Ref: https://patchwork.freedesktop.org/patch/578271/?series=129901&rev=1
Ref: bspec 68397

BUG=b:403278247
TEST=CI

Change-Id: I4588469defa166e58e733ae45af3247e2222c654
Signed-off-by: Jeevaka Prabu Badrappan <jeevaka.badrappan@intel.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6394316
Reviewed-by: Ryan Neph <ryanneph@google.com>
Tested-by: Ryan Neph <ryanneph@google.com>
Commit-Queue: Ryan Neph <ryanneph@google.com>
Reviewed-by: Lina Versace <linyaa@google.com>
2025-03-25 17:19:19 -07:00
Android Build Coastguard Worker
59055c7f1e Snap for 13258483 from 0c5b7a6dd0 to 25Q4-release
Change-Id: I6d9dc3d7cd498d1a7e5d8c4c85bf275184ca17ed
2025-03-22 16:15:44 -07:00
Andrew Wolfers
0c5b7a6dd0 Upgrade minigbm to 3dd534cca2
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update external/minigbm
For more info, check https://cs.android.com/android/platform/superproject/main/+/main:tools/external_updater/README.md

Bug: 378461707
Test: TreeHugger
Change-Id: Ia66fa770f9c0d8a3c7539602eaa324e7341163b8
2025-03-20 08:18:23 -07:00
John Stultz
c07a3f5090 Merge "cros_gralloc: move cflags select into minigbm_defaults build rule" into main am: fefcc1b9da
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3517291

Change-Id: Id93558ab8142bd5c4551a74fb04da999136588af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-03-20 01:24:11 -07:00
John Stultz
fefcc1b9da Merge "cros_gralloc: move cflags select into minigbm_defaults build rule" into main 2025-03-20 01:03:58 -07:00
Andrew Wolfers
3dd534cca2 Add padding for i915 cursor buffers
This change adds behavior to pad the requested buffer size when the
BO_USE_CURSOR flag is set. This change is required due to restrictions
on cursor planes with the i915 driver, where a buffer must be of a
particular size in order to be committed to a cursor plane. The exact
requirements can be queried from the DRM_CAP_CURSOR_{WIDTH|HEIGHT}
properties, which if provided, will specify a known acceptable cursor
buffer size. After this change, if the BO_USE_CURSOR flag is set and the
requested size is less than indicated capability, the resulting buffer
will be padded according to the difference.

Bug: b/378461707 , b/388014686
Change-Id: I451421cc784d1e3fdc83eb4e9762d6f0f4caea7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6282179
Tested-by: Andrew Wolfers <aswolfers@chromium.org>
Reviewed-by: Lina Versace <linyaa@google.com>
Commit-Queue: Andrew Wolfers <aswolfers@chromium.org>
2025-03-12 12:21:51 -07:00
Yongqin Liu
d99636bb60 cros_gralloc: move cflags select into minigbm_defaults build rule
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>
2025-03-07 00:39:34 +08:00
Android Build Coastguard Worker
e1204703c6 Snap for 13145626 from 97e14f6b24 to 25Q4-release
Change-Id: I08722bb892a105fffeb8a64476a9b1c5731d02ee
2025-03-01 14:14:46 -08:00
Lloyd Pique
aec6536741 virtgpu_cross_domain: Hold a lock for all of bo_create
In crosvm, the MinigbmDevice implementation of the Gralloc interface
assumes that a call to get_image_memory_requirements will be immediately
followed by a matching call to allocate_memory, as the implementation
stashes a buffer allocated by the first call to be returned by the
second.

However on Android multiple processes/threads can be making calls to
allocate memory via CrosGralloc. In particular if the device is
configured to use the cross-domain back-end, and two threads are trying
to allocate memory, the two requests to get the memory requirements for
an allocation can be submitted to crosvm followed by the two requests to
actually allocate memory.

When the assumption is violated, the crosvm code was raising an error
for the SECOND memory requirement request. However the error does not
propagate back to the virtgpu_cross_domain code here. The result is that
the request is understood to have succeeded, and the code here then
reads the size metadata from the response buffer, but that contains the
values from the FIRST memory requirement request. Those values may be

There is a fix for crosvm in review (https://crrev.com/c/6260975) to
not raise an error if the calls are not made in the expected order,
while still maintaining a single stashed buffer. However this means the
memory allocated for one of the two requests must be released, and would
have to be reallocated, at some extra runtime cost as allocating
graphics memory requires allocating physically contiguous memory.

The existing cross-domain code here acquired a simple mutex lock to
maintain a metadata cache, which was held for the duration of the first
call. This change extends the duration of the lock to the entire
allocation request so that the guest always makes the two requests in
the expected order.

BUG=b:395748805,b:355060470
TEST=ARCVM on Corsola starts up under high CPU stress

Change-Id: I6429ea28141ef440345a3eb442066173b3e04802
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6288246
Commit-Queue: Lloyd Pique <lpique@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Lloyd Pique <lpique@google.com>
2025-02-25 04:26:53 -08:00
Ram Muthiah
97e14f6b24 Merge "Revert "Add cuttlefish hwc3 to minigbm visibility"" into main 2025-02-21 12:48:41 -08:00
Ram Muthiah
e38686f7b1 Revert "Add cuttlefish hwc3 to minigbm visibility"
Revert submission 31743741-CF changes for Android Display Processing

Reason for revert: Testing if this resolves b/398170080

Reverted changes: /q/submissionid:31743741-CF+changes+for+Android+Display+Processing

Change-Id: I54d1c6c2b0d09d492c56bbeb063aa97edc0d0013
2025-02-21 11:17:01 -08:00
Neeraj Kerkar
7a4f70d667 Merge "Add cuttlefish hwc3 to minigbm visibility" into main 2025-02-21 02:54:56 -08:00
Neeraj Kerkar
b9de1bfa82 Add cuttlefish hwc3 to minigbm visibility
Bug: 337330263
Test: Tested by ag/31743741
Change-Id: Idebdcce7df839c9fde4b6be5d48f3fb7d36a36c9
2025-02-21 01:42:31 -08:00
Sadaf Ebrahimi
49347b18e7 Add janitors to the OWNERS file am: 3ad9bbdfda am: 62bb85b8ff
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3498986

Change-Id: I87a53c9d8ffbc1b49c53bd942b8b77ed11936e77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-18 14:58:16 -08:00
Treehugger Robot
f6530bc8f0 Merge "Revert "Add janitors to the OWNERS file"" into main am: 1f506673a4 am: 5e21151756
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3499375

Change-Id: Ia76ac2ad0b1feecffc4c23b3144c1ddeecfe7a8b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-18 14:57:53 -08:00
Sadaf Ebrahimi
62bb85b8ff Add janitors to the OWNERS file am: 3ad9bbdfda
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3498986

Change-Id: I62a356592238e48c49eb532a104a9a9e1a863ce3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-18 14:44:04 -08:00
Treehugger Robot
5e21151756 Merge "Revert "Add janitors to the OWNERS file"" into main am: 1f506673a4
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3499375

Change-Id: Ia7009e320d3cc4652e6f812f167103e7f0bb8951
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-18 14:32:12 -08:00
Sadaf Ebrahimi
3ad9bbdfda Add janitors to the OWNERS file
Test: TreeHugger
Change-Id: Ib3a298fc3516aef904d1dea55123e03274204eb2
2025-02-18 13:56:32 -08:00
Treehugger Robot
1f506673a4 Merge "Revert "Add janitors to the OWNERS file"" into main 2025-02-18 13:55:55 -08:00
Sadaf Ebrahimi
778a924b96 Revert "Add janitors to the OWNERS file"
This reverts commit a9ae53a8c4.

Reason for revert: I modified the wrong file. The correct CL is here aosp/3498986.

Change-Id: I669cb7b08725f3cb501dfa5311703746425771dc
2025-02-18 13:51:43 -08:00
Ryan Neph
1fb8e08858 Merge remote-tracking branch 'aosp/upstream-main' am: ff8028e708 am: e6f83856d4
Original change: undetermined

Change-Id: Ibf42ff4c58f51991f2b96dc89f3b22f21c97c6ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-11 16:58:49 -08:00
Ryan Neph
e6f83856d4 Merge remote-tracking branch 'aosp/upstream-main' am: ff8028e708
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3490650

Change-Id: I0cb9845add6d7d32b81275dd915e30bef2ca225f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-11 16:33:50 -08:00
Ryan Neph
ff8028e708 Merge remote-tracking branch 'aosp/upstream-main'
Bring in:
* e37e162 xe: add lnl/ptl pci ids (crrev/c/6254318)
* b4d0423 drv: remove unused #include <linux/dma-buf.h> (crrev/c/6250261)

Bug: 358427077
Test: Presubmit
Change-Id: I0d6422a1afd51dfa934a5fcc2116ddab3c2bc51e
2025-02-11 14:47:28 -08:00
Ryan Neph
e37e16203f xe: add lnl/ptl pci ids
IDs match those added to mesa in:
* https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29273
* https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838
* https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32149

Also sets the correct graphics_version but still uses the unsavory
is_mtl_or_newer flag, which will later be replaced by explicit version
testing at each special-case or initialization of per-version
capabilities.

Bug: b:358427077
Test: Builds, CQ
Change-Id: I5368c0a2da00a42c70f7c6cf7740fad5ca1cea2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6254318
Commit-Queue: Ryan Neph <ryanneph@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Lina Versace <linyaa@google.com>
Tested-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Matt Turner <msturner@google.com>
2025-02-11 14:24:15 -08:00
Ryan Neph
b4d04233b0 drv: remove unused #include <linux/dma-buf.h>
A leftover from prior refactor. Unnecessary and broke android builds.

Fixes: 3ab89b0 ("xe: add initial Xe kmd support for gen12 xelp")

BUG=b:358427077
TEST=Builds + CQ

Change-Id: I7ed2317409c2c381a244d714a26201662151adfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6250261
Commit-Queue: Ryan Neph <ryanneph@google.com>
Reviewed-by: Matt Turner <msturner@google.com>
Auto-Submit: Ryan Neph <ryanneph@google.com>
Commit-Queue: Matt Turner <msturner@google.com>
Tested-by: Ryan Neph <ryanneph@google.com>
2025-02-11 11:00:38 -08:00
Ryan Neph
998c523bc1 ANDROID: build Xe backend into intel targets am: ad502fed04 am: df3b0d2f98
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3486572

Change-Id: I2166927f187d00b9f9e3d6a0c9ef9d9a6fa65e96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-10 18:13:16 -08:00
Ryan Neph
df3b0d2f98 ANDROID: build Xe backend into intel targets am: ad502fed04
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3486572

Change-Id: I89cb688fa3e8a1ea5fdb28ebc762569e405184c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-10 17:49:06 -08:00
Ryan Neph
29e79865e1 Merge remote-tracking branch 'aosp/upstream-main' am: a394318df6 am: c134076de7
Original change: undetermined

Change-Id: Ifcec20386e8bbf35bf1617302ba9d1444fd1efaf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-10 17:13:15 -08:00
Ryan Neph
c134076de7 Merge remote-tracking branch 'aosp/upstream-main' am: a394318df6
Original change: https://android-review.googlesource.com/c/platform/external/minigbm/+/3486704

Change-Id: I7c15780aff431bb247e351dab5d2cf01118298ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-10 16:48:35 -08:00
Ryan Neph
ad502fed04 ANDROID: build Xe backend into intel targets
Bug: 358427077
Test: CQ

Change-Id: I61bbfdd6665622c7a56c773e0c450e2fb54a4380
2025-02-10 15:41:17 -08:00
Ryan Neph
a394318df6 Merge remote-tracking branch 'aosp/upstream-main'
To bring in Xe backend (crrev/c/6245163 and parents).

Bug: 358427077
Test: CQ
Change-Id: I27f9bdbcbf7e25a13209bf83f09be8c3724ad346
2025-02-10 15:27:48 -08:00
Ryan Neph
e2726068a7 xe: use WC memtype only for SCANOUT
Prefer WB memtype unless passed SCANOUT flag (then use WC).

BUG=b:358427077
TEST=drm-tests

Change-Id: Idc35fb901f176013b921d292c7a946f19b7ac826
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6245163
Reviewed-by: Matt Turner <msturner@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Tested-by: Ryan Neph <ryanneph@google.com>
Commit-Queue: Ryan Neph <ryanneph@google.com>
Reviewed-by: Lina Versace <linyaa@google.com>
2025-02-10 11:07:57 -08:00
Ryan Neph
4a5d3773fb xe: ensure YVU420_ANDROID total_size is aligned to pagesize
The Xe kmd requires it but it was missed when calculating the total_size
of YVU420_ANDROID buffers.

BUG=b:358427077
TEST=drm-tests

Change-Id: I2f201b9ba7d12a70074333f6ad4a0fbfeb77c3a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/6245162
Tested-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Matt Turner <msturner@google.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Commit-Queue: Ryan Neph <ryanneph@google.com>
Reviewed-by: Lina Versace <linyaa@google.com>
2025-02-10 11:07:55 -08:00