Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e3ab4a2e6678b8bc55ef4a6c8ea6526ab83ffd80
https://github.com/WebKit/WebKit/commit/e3ab4a2e6678b8bc55ef4a6c8ea6526ab83ffd80
Author: Nikolas Zimmermann <[email protected]>
Date: 2025-07-08 (Tue, 08 Jul 2025)
Changed paths:
M Source/WebKit/WPEPlatform/wpe/drm/WPEDisplayDRM.cpp
Log Message:
-----------
[WPE] Memory-mapped GPU buffers fail under DRM platform
https://bugs.webkit.org/show_bug.cgi?id=294995
Reviewed by Carlos Garcia Campos.
When using the DRM platform on i.MX systems with separate GPU and IPU, memory-
mapped GPU buffers failed to initialize properly. The DRM implementation
correctly chooses the first KMS-capable device (e.g. /dev/dri/card1) for
display buffer allocation. However, it incorrectly propagates the same node
to DRMDeviceManager as 'drmRenderNode' -- which is meant to be associated with
the "main device". For an overview about the terminology (main device vs. target
device), see:
https://wayland.app/protocols/linux-dmabuf-v1#zwp_linux_dmabuf_feedback_v1.
Memory-mapped GPU buffers are still able to allocate gbm_bos from card1,
and export them as dma-bufs -- but trying to mmap() will fail, with
EACCESS permission denied error. That operation is only possible for
buffers allocated using the "main device".
The Wayland platform handles this correctly by listening to `main_device` and
`tranche_target_device' linux-dmabuf-v1 events. The GPU is correctly used as
'main device', whereas the display-controller is used as 'target device' --
fix DRM to behave in a similar way. If the chosen DRM device has no associated
render node, then try to use the first DRM render node instead of not selecting
a render node.
Covered by existing tests, under DRM backend + linear tile textures
activated.
* Source/WebKit/WPEPlatform/wpe/drm/WPEDisplayDRM.cpp:
(findTargetDevice):
(findFirstRenderNodeName):
(wpeDisplayDRMSetup):
(findDevice): Deleted.
Canonical link: https://commits.webkit.org/297131@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes