Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 31dab2d9da5a0b131f329b57f774e24d1266f1b9
      
https://github.com/WebKit/WebKit/commit/31dab2d9da5a0b131f329b57f774e24d1266f1b9
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2026-04-15 (Wed, 15 Apr 2026)

  Changed paths:
    M Source/WebCore/platform/graphics/gbm/DMABufBuffer.cpp
    M Source/WebCore/platform/graphics/gbm/GBMVersioning.h
    M Source/WebCore/platform/graphics/skia/SkiaGPUAtlas.cpp
    M Source/cmake/OptionsGTK.cmake
    M Source/cmake/OptionsWPE.cmake

  Log Message:
  -----------
  [GBM] REGRESSION(310393@main): Always use DRM_RDWR when exporting dma-buf FDs 
for GPU buffer mapping
https://bugs.webkit.org/show_bug.cgi?id=312266

Reviewed by Adrian Perez de Castro.

gbm_bo_get_fd_for_plane() in older Mesa versions does not always pass
DRM_RDWR to drmPrimeHandleToFD, which results in FDs that cannot be
mmap'd for writing. This silently breaks GPU buffer write operations.

Remove the conditional polyfill for gbm_bo_get_fd_for_plane() and
instead use a local getMappableFDForPlane() lambda that always goes
through drmPrimeHandleToFD with DRM_CLOEXEC | DRM_RDWR, ensuring
mmap support regardless of the Mesa version.

Also upgrade the GPU buffer write scope failure in SkiaGPUAtlas to a
RELEASE_ASSERT, since a failed mmap now indicates a hard error that
should not be silently ignored.

Not testable using the current CI infra.

 * Source/WebCore/platform/graphics/gbm/DMABufBuffer.cpp:
 (WebCore::DMABufBufferAttributes::fromGBMBufferObject):
 * Source/WebCore/platform/graphics/gbm/GBMVersioning.h:
 (gbm_bo_get_fd_for_plane): Deleted.
 * Source/WebCore/platform/graphics/skia/SkiaGPUAtlas.cpp:
 (WebCore::SkiaGPUAtlas::uploadImages):
 * Source/cmake/OptionsGTK.cmake:
 * Source/cmake/OptionsWPE.cmake:

Canonical link: https://commits.webkit.org/311266@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to