Closed Bug 1828071 Opened 1 year ago Closed 1 year ago

[Wayland] Update dmabuf setup

Categories

(Core :: Widget: Gtk, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

Details

Attachments

(3 files, 5 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Update dmabuf setup

To speed up Firefox start on Wayland don't use extra wl_registry for dmabuf but use nsWaylandDisplay ones.

In this patch we do:

  • Move GbmFormat setup from DMABufLibWrapper to nsWaylandDisplay
  • Make GbmFormat handlers static as we don't need per display setup
  • Get dmabuf pixel format configs on nsWaylandDisplay main thread handlers

Depends on D175466

There's no need to create nsDMABufDevice just to get/set dmabuf config.

Depends on D175468

Blocks: 1828255
Summary: Update dmabuf setup → [Wayland] Update dmabuf setup
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/328ba92c5afe
[Wayland] Move wl_registry from DMABufLibWrapper to nsWaylandDisplay r=emilio
https://hg.mozilla.org/integration/autoland/rev/12d28dd0b9e2
[Linux] Always configure nsDMABufDevice and remove GetAndConfigureDMABufDevice() for child processes r=emilio
https://hg.mozilla.org/integration/autoland/rev/1e49ad06cd44
[Linux] Use static preferences in nsDMABufDevice r=emilio

Backed out for causing leaks.

[task 2023-04-18T22:00:45.064Z] 22:00:45     INFO - leakcheck | Processing log file /tmp/tmp88hhnb7v.mozrunner/runtests_leaks.log
[task 2023-04-18T22:00:45.065Z] 22:00:45     INFO - TEST-INFO | leakcheck | default process: leak threshold set at 0 bytes
[task 2023-04-18T22:00:45.065Z] 22:00:45     INFO - TEST-INFO | leakcheck | tab process: leak threshold set at 0 bytes
[task 2023-04-18T22:00:45.065Z] 22:00:45     INFO - TEST-INFO | leakcheck | gmplugin process: leak threshold set at 20000 bytes
[task 2023-04-18T22:00:45.065Z] 22:00:45     INFO - TEST-INFO | leakcheck | gpu process: leak threshold set at 0 bytes
[task 2023-04-18T22:00:45.065Z] 22:00:45     INFO - TEST-INFO | leakcheck | vr process: leak threshold set at 0 bytes
[task 2023-04-18T22:00:45.065Z] 22:00:45     INFO - TEST-INFO | leakcheck | rdd process: leak threshold set at 0 bytes
[task 2023-04-18T22:00:45.065Z] 22:00:45     INFO - TEST-INFO | leakcheck | socket process: leak threshold set at 0 bytes
[task 2023-04-18T22:00:45.065Z] 22:00:45     INFO - TEST-INFO | leakcheck | sandboxbroker process: leak threshold set at 0 bytes
[task 2023-04-18T22:00:45.065Z] 22:00:45     INFO - TEST-INFO | leakcheck | forkserver process: leak threshold set at 0 bytes
[task 2023-04-18T22:00:45.066Z] 22:00:45     INFO - TEST-INFO | leakcheck | utility process: leak threshold set at 0 bytes
[task 2023-04-18T22:00:45.066Z] 22:00:45     INFO - leakcheck | Processing leak log file /tmp/tmp88hhnb7v.mozrunner/runtests_leaks_utility_pid1758.log
[task 2023-04-18T22:00:45.066Z] 22:00:45     INFO - TEST-PASS | leakcheck | utility no leaks detected!
[task 2023-04-18T22:00:45.066Z] 22:00:45     INFO - leakcheck | Processing leak log file /tmp/tmp88hhnb7v.mozrunner/runtests_leaks_tab_pid1704.log
[task 2023-04-18T22:00:45.067Z] 22:00:45     INFO - TEST-PASS | leakcheck | tab no leaks detected!
[task 2023-04-18T22:00:45.068Z] 22:00:45     INFO - leakcheck | Processing leak log file /tmp/tmp88hhnb7v.mozrunner/runtests_leaks_tab_pid1677.log
[task 2023-04-18T22:00:45.071Z] 22:00:45     INFO - TEST-PASS | leakcheck | tab no leaks detected!
[task 2023-04-18T22:00:45.072Z] 22:00:45     INFO - leakcheck | Processing leak log file /tmp/tmp88hhnb7v.mozrunner/runtests_leaks.log
[task 2023-04-18T22:00:45.072Z] 22:00:45     INFO - 
[task 2023-04-18T22:00:45.072Z] 22:00:45     INFO - == BloatView: ALL (cumulative) LEAK AND BLOAT STATISTICS, default process 1570
[task 2023-04-18T22:00:45.073Z] 22:00:45     INFO - 
[task 2023-04-18T22:00:45.073Z] 22:00:45     INFO -      |<----------------Class--------------->|<-----Bytes------>|<----Objects---->|
[task 2023-04-18T22:00:45.074Z] 22:00:45     INFO -      |                                      | Per-Inst   Leaked|   Total      Rem|
[task 2023-04-18T22:00:45.074Z] 22:00:45     INFO -    0 |TOTAL                                 |       47        8| 3623504        1|
[task 2023-04-18T22:00:45.078Z] 22:00:45     INFO - 1997 |nsStringBuffer                        |        8        8|  500589        1|
[task 2023-04-18T22:00:45.082Z] 22:00:45     INFO - 
[task 2023-04-18T22:00:45.083Z] 22:00:45     INFO - nsTraceRefcnt::DumpStatistics: 2146 entries
[task 2023-04-18T22:00:45.084Z] 22:00:45     INFO - TEST-INFO | leakcheck | default leaked 1 nsStringBuffer
[task 2023-04-18T22:00:45.084Z] 22:00:45     INFO - TEST-UNEXPECTED-FAIL | leakcheck | default 8 bytes leaked (nsStringBuffer)
[task 2023-04-18T22:00:45.085Z] 22:00:45     INFO - 
Flags: needinfo?(stransky)
Flags: needinfo?(stransky)
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/0b2180c4f9a5
[Wayland] Move wl_registry from DMABufLibWrapper to nsWaylandDisplay r=emilio
https://hg.mozilla.org/integration/autoland/rev/c2c5841b88e0
[Linux] Always configure nsDMABufDevice and remove GetAndConfigureDMABufDevice() for child processes r=emilio
https://hg.mozilla.org/integration/autoland/rev/c333d6127dfe
[Linux] Use static preferences in nsDMABufDevice r=emilio
https://hg.mozilla.org/integration/autoland/rev/b71c46d9b101
[Linux] Use plain string to keep dmabuf failure error r=emilio
https://hg.mozilla.org/integration/autoland/rev/9c6ea77a90eb
[Linux] Init DMABufLibWrapper in class declaration r=emilio
Regressions: 1829462
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 114 Branch → ---
Attachment #9329633 - Attachment is obsolete: true
Attachment #9329632 - Attachment is obsolete: true
Attachment #9328537 - Attachment is obsolete: true
Attachment #9328536 - Attachment is obsolete: true
Attachment #9328535 - Attachment is obsolete: true
  • Make dmabuf preferences static so we don't need GetDMABufDevice() to access them.
  • Configure GetDMABufDevice() when it's created.
  • Init dmabuf members directly in class.
  • Removed unused methods.
  • make nsDMABufDevice::GetDRMFd() to always open new connection to drm device.
  • don't export nsDMABufDevice::mDRMFd and use it for nsDMABufDevice::mGbmDevice only.
  • create nsDMABufDevice::mGbmDevice only if it's needed.

Depends on D176404

Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/500947e61bb8
[Linux] Update DMABuf setup r=emilio
https://hg.mozilla.org/integration/autoland/rev/6085d4c0ae98
[Linux] Don't share drm file descriptor for VA-API display and DRM device used to create textures r=emilio
https://hg.mozilla.org/integration/autoland/rev/b496ee4af4f0
[Linux] Rename nsDMABufDevice to DMABufDevice and nsGbmLib to GbmLib r=emilio
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch

(In reply to Pulsebot from comment #8)

Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/0b2180c4f9a5
[Wayland] Move wl_registry from DMABufLibWrapper to nsWaylandDisplay r=emilio
https://hg.mozilla.org/integration/autoland/rev/c2c5841b88e0
[Linux] Always configure nsDMABufDevice and remove
GetAndConfigureDMABufDevice() for child processes r=emilio
https://hg.mozilla.org/integration/autoland/rev/c333d6127dfe
[Linux] Use static preferences in nsDMABufDevice r=emilio
https://hg.mozilla.org/integration/autoland/rev/b71c46d9b101
[Linux] Use plain string to keep dmabuf failure error r=emilio
https://hg.mozilla.org/integration/autoland/rev/9c6ea77a90eb
[Linux] Init DMABufLibWrapper in class declaration r=emilio

As an FYI the following alert was generated by this patch
== Change summary for alert #38246 (as of Thu, 27 Apr 2023 14:26:17 GMT) ==

Regressions:

Ratio Test Platform Options Absolute values (old vs new)
32% glterrain linux1804-64-qr e10s fission stylo webgl-ipc webrender 2.23 -> 2.95
32% glterrain linux1804-64-shippable-qr e10s fission stylo webrender 2.22 -> 2.94
32% glterrain linux1804-64-shippable-qr e10s fission stylo webgl-ipc webrender 2.25 -> 2.96
31% glterrain linux1804-64-shippable-qr e10s fission stylo webgl-ipc webrender 2.24 -> 2.95

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=38246

I see that the patch was backed out but I wanted to let you know that the new patch you made on the 26th did not cause a performance regression with this test :)

The regression was caused by missing dmabuf WebGL backend on X11. That was fixed by new patches.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: