| commit | 5e14cbd03dd01f60ee6e7b2a9f78cd748d077d58 | [log] [tgz] |
|---|---|---|
| author | Mario Kleiner <mario.kleiner.de@fuchsia.infra.roller.fuchsia.infra.roller.gmail.com> | Wed Oct 29 18:57:11 2025 -0700 |
| committer | Copybara-Service <copybara-worker@google.com> | Wed Oct 29 19:00:22 2025 -0700 |
| tree | 2d12d101a943d46281d157351df6cdb0cae99e13 | |
| parent | edf11cbf766b2dae30e3adff74d1025a9c8f39c7 [diff] |
[roll] Roll fuchsia [roll] Roll third_party/mesa asahi: Set PIPE_BIND_SCANOUT in agx_resource_from_handle().
Commit 534a04d557f3 optimized agx_resource_from_handle() to lazily
defer assignment of a kms-ro renderonly_scanout object to an imported
resource until its kms winsys handle is actually queried by a caller
via agx_resource_get_handle(), to avoid unnecessary import into the
DCP display controller. Only resources with bind flag PIPE_BIND_SCANOUT
will get a renderonly_scanout object assigned during such queries.
Problem: This prevents Mesa GBM's gbm_bo_import() function from properly
importing dmabufs for direct scanout use by some Wayland compositors,
e.g., GNOME mutter.
gbm_bo_import() of dmabuf fd's (GBM_BO_IMPORT_FD / GBM_BO_IMPORT_FD_MODIFIER),
even with GBM_BO_USE_SCANOUT flag, will not mark an imported bo with the
PIPE_BIND_SCANOUT bind flag before internally assigning its KMS winsys
handle via screen->resource_get_handle() -> agx_resource_get_handle(),
causing silent failure of that query. Therefore gbm_bo_import() seems
to return a successfully created gbm_bo with all proper properties,
but gbm_bo_get_handle() and gbm_bo_get_handle_for_plane() will return
invalid handles. These invalid handles cause drmAddFbXXX ioctl calls to
fail, and therefore failure of direct scanout of wl_buffers.
Setting PIPE_BIND_SCANOUT for a resource in agx_resource_from_handle()
may retain the optimization and makes gbm_bo_get_handle[_for_plane]()
work. This fixes direct scanout of fullscreen wl_surface / wl_buffers
under at least GNOME mutter 48.
Original-Fixes: 534a04d557f3 ("asahi: Flip kmsro around to allocate on the GPU")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37538>
(cherry picked from commit fc44e708d71ea97f21aaa1e9274e4a89c032dd92)
Original-Revision: a555c018f9ae910a52e888ec6543ff9c257ecf8d
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1407825
Original-Revision: 81ec446e5cf38ed0c342e503c6523686ea1f00fb
GitOrigin-RevId: 93b2b8dc88fc22ca1c7fb83d1d49015b6cc0bc18
Change-Id: I3d1dd076ee04172d192ced6638b186c31596bad6
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.