Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9264d2efac56a43095aa0ef675509c94ee96e530
https://github.com/WebKit/WebKit/commit/9264d2efac56a43095aa0ef675509c94ee96e530
Author: Nikolas Zimmermann <[email protected]>
Date: 2026-03-03 (Tue, 03 Mar 2026)
Changed paths:
M Source/WebCore/platform/graphics/gbm/MemoryMappedGPUBuffer.cpp
M Source/WebCore/platform/graphics/gbm/MemoryMappedGPUBuffer.h
Log Message:
-----------
[GTK][WPE] MemoryMappedGPUBuffer backed BitmapTexture occasionally hangs v3d
GPU driver
https://bugs.webkit.org/show_bug.cgi?id=306864
Reviewed by Carlos Garcia Campos.
Fix regression introduced in 308458@main, that broke GPU rendering on
rpi4: Stop holding the gbm_bo for the lifetime of MemoryMappedGPUBuffer.
There was a double-close problem, inducing a use-after-free in the
driver. Both GBM and EGL were trying to close the same GEM handle,
leading to v3d driver-level corruption, requiring a power cycle to
recover.
Fix by destroying the gbm_bo immediately after exporting its dma-buf
file descriptors in create(). Cleanup the MemoryMappedGPUBuffer code,
to make it easier to understand/debug.
Covered by existing tests that run on the perf bots.
* Source/WebCore/platform/graphics/gbm/MemoryMappedGPUBuffer.cpp:
(WebCore::MemoryMappedGPUBuffer::~MemoryMappedGPUBuffer):
(WebCore::MemoryMappedGPUBuffer::create):
(WebCore::MemoryMappedGPUBuffer::allocate):
(WebCore::MemoryMappedGPUBuffer::isLinear const):
(WebCore::MemoryMappedGPUBuffer::isVivanteSuperTiled const):
(WebCore::MemoryMappedGPUBuffer::createDMABufFromGBMBufferObject):
(WebCore::MemoryMappedGPUBuffer::mapIfNeeded):
(WebCore::MemoryMappedGPUBuffer::createEGLImageFromDMABuf):
(WebCore::MemoryMappedGPUBuffer::exportGBMBufferObjectAsDMABuf):
(WebCore::MemoryMappedGPUBuffer::allocatedSize const): Deleted.
* Source/WebCore/platform/graphics/gbm/MemoryMappedGPUBuffer.h:
(WebCore::MemoryMappedGPUBuffer::allocatedSize const):
Canonical link: https://commits.webkit.org/308550@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications