Igalia / meta-webkit

Yocto / OpenEmbedded layer for WebKit based engines and browsers
MIT License
125 stars 69 forks source link

About the benchmark result for cog/wpewebkit and chromium-ozone-wayland on iMX8M Mini #300

Closed black53421 closed 1 year ago

black53421 commented 3 years ago

Test Environment

  • CPU run as 1.8GHz
  • 2G RAM
  • 1920x1080@60 MIPI-DSI to HDMI Display Output
  • Yocto zeus (NXP's 5.4.70_2.3.0 Yocto BSP)
  • iMX8MM only support wayland, so I test on wayland
  • cog 0.10.0 + wpewebkit 2.32.3 + libwpe 0.10.0 + wepbackend-fdo 0.10 + proprietary Vivante driver
  • chromium-ozone-wayland 83.0.4103.116

Benchmark Result

Q&A

  • Cog got better result on JavaScript, but it had poor performance for 3D rendering. Is there any way I can do to improve this?

Thank you

clopez commented 3 years ago

Here are some things you can try:

black53421 commented 3 years ago

Thanks for your information!

black53421 commented 2 years ago

I already compiled the open source graphic driver (mesa 21.0.3) in my Yocto environment and Cog could run on Weston successfully. However, I has some trouble in making Cog runs over the framebuffer. It show the following warning message when I use -P drm: (cog:1003): Cog-DRM-WARNING **: 03:33:52.139: failed to create framebuffer: No such file or directory

The following is the message while I set G_MESSAGES_DEBUG=all and LIBGL_DEBUG=verbose: (Weston is disabled while testing with drm.)

root@imx8mm-ddr4-evk:~# cog -P drm https://webglsamples.org/aquarium/aquarium.html
(cog:1003): Cog-DEBUG: 03:33:50.471: platform_setup: Platform name: drm
(cog:1003): Cog-DEBUG: 03:33:50.473: platform_setup: Platform plugin: libcogplatform-drm.so
(cog:1003): Cog-DRM-DEBUG: 03:33:50.479: init_config: overriding device_scale value, using 1.00 from shell
(cog:1003): Cog-DRM-DEBUG: 03:33:50.481: init_drm: enumerated device 0xaaaac3538660, available_nodes 5
(cog:1003): Cog-DRM-DEBUG: 03:33:50.481: init_drm:   DRM_NODE_PRIMARY: /dev/dri/card1
(cog:1003): Cog-DRM-DEBUG: 03:33:50.481: init_drm:   DRM_NODE_RENDER: /dev/dri/renderD128
(cog:1003): Cog-DRM-DEBUG: 03:33:50.481: init_drm: enumerated device 0xaaaac3538bc0, available_nodes 1
(cog:1003): Cog-DRM-DEBUG: 03:33:50.481: init_drm:   DRM_NODE_PRIMARY: /dev/dri/card0
(cog:1003): Cog-DRM-DEBUG: 03:33:50.482: init_drm: using device 0xaaaac3538bc0, DRM_NODE_PRIMARY /dev/dri/card0
(cog:1003): Cog-DRM-DEBUG: 03:33:50.482: init_drm: 1 connectors available
(cog:1003): Cog-DRM-DEBUG: 03:33:50.488: init_drm:  connector id 35, type 11, connected, 9 usable modes
(cog:1003): Cog-DRM-DEBUG: 03:33:50.488: init_drm:    [0]: '1920x1080', 1920x1080@60, flags 5, type 72 (preferred)
(cog:1003): Cog-DRM-DEBUG: 03:33:50.488: init_drm:    [1]: '1920x1080', 1920x1080@60, flags 1048581, type 64
(cog:1003): Cog-DRM-DEBUG: 03:33:50.488: init_drm:    [2]: '1920x1080', 1920x1080@50, flags 1048581, type 64
(cog:1003): Cog-DRM-DEBUG: 03:33:50.488: init_drm:    [3]: '1920x1080', 1920x1080@30, flags 1048581, type 64
(cog:1003): Cog-DRM-DEBUG: 03:33:50.488: init_drm:    [4]: '1280x720', 1280x720@60, flags 5, type 64
(cog:1003): Cog-DRM-DEBUG: 03:33:50.488: init_drm:    [5]: '1280x720', 1280x720@60, flags 1048581, type 64
(cog:1003): Cog-DRM-DEBUG: 03:33:50.488: init_drm:    [6]: '1280x720', 1280x720@50, flags 5, type 64
(cog:1003): Cog-DRM-DEBUG: 03:33:50.488: init_drm:    [7]: '1280x720', 1280x720@50, flags 1048581, type 64
(cog:1003): Cog-DRM-DEBUG: 03:33:50.488: init_drm:    [8]: '800x600', 800x600@75, flags 5, type 64
(cog:1003): Cog-DRM-DEBUG: 03:33:50.494: init_drm: using connector id 35, type 11
(cog:1003): Cog-DRM-DEBUG: 03:33:50.494: init_drm: using mode [0] '1920x1080'
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/root/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/root/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/root/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/root/.drirc: No such file or directory.
drmOpenDevice: node name is /dev/dri/renderD128
drmOpenDevice: open result is 15, (OK)
drmGetBusid returned 'NULL'
(cog:1003): Cog-DEBUG: 03:33:50.547: platform_setup: Platform = 0xaaaac34d4930

(cog:1003): GLib-GIO-WARNING **: 03:33:50.559: Your application does not implement g_application_activate() and has no handlers connected to the 'activate' signal.  It should do one of these.
(process:1009): GLib-GIO-DEBUG: 03:33:50.560: Failed to initialize portal (GNetworkMonitorPortal) for gio-network-monitor: Not using portals
(process:1009): GLib-GIO-DEBUG: 03:33:50.577: Failed to initialize networkmanager (GNetworkMonitorNM) for gio-network-monitor: NetworkManager not running
(process:1009): GLib-GIO-DEBUG: 03:33:50.578: _g_io_module_get_default: Found default implementation netlink (GNetworkMonitorNetlink) for ?gio-network-monitor?
(process:1009): GLib-GIO-DEBUG: 03:33:50.582: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ?gio-vfs?
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/root/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/root/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/root/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/root/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/root/.drirc: No such file or directory.
drmOpenDevice: node name is /dev/dri/renderD128
drmOpenDevice: open result is 18, (OK)
drmGetBusid returned 'NULL'
Cog-Core-Message: 03:33:50.755: <https://webglsamples.org/aquarium/aquarium.html> Load started.
(process:1009): GLib-GIO-DEBUG: 03:33:50.791: _g_io_module_get_default: Found default implementation gnutls (GTlsBackendGnutls) for ?gio-tls-backend?
(process:1009): GLib-GIO-DEBUG: 03:33:50.794: _g_io_module_get_default: Found default implementation dummy (GDummyProxyResolver) for ?gio-proxy-resolver?
(process:1009): GLib-GIO-DEBUG: 03:33:50.863: GSocketClient: Starting new address enumeration
(process:1009): GLib-GIO-DEBUG: 03:33:51.090: GSocketClient: Address enumeration succeeded
(process:1009): GLib-GIO-DEBUG: 03:33:51.090: GSocketClient: Starting TCP connection attempt
(process:1009): GLib-GIO-DEBUG: 03:33:51.135: GSocketClient: TCP connection successful
(process:1009): GLib-GIO-DEBUG: 03:33:51.135: GSocketClient: Starting application layer connection
(process:1009): GLib-GIO-DEBUG: 03:33:51.135: GSocketClient: Connection successful!
(process:1009): GLib-Net-DEBUG: 03:33:51.137: CLIENT[0xaaaae5e84200]: Starting asynchronous TLS handshake
(process:1009): GLib-Net-DEBUG: 03:33:51.138: CLIENT[0xaaaae5e84200]: Asynchronous TLS handshake thread starts
(process:1009): GLib-Net-DEBUG: 03:33:51.138: CLIENT[0xaaaae5e84200]: TLS handshake thread starts
(process:1009): GLib-Net-DEBUG: 03:33:51.138: CLIENT[0xaaaae5e84200]: claiming operation OP_HANDSHAKE
(process:1009): GLib-Net-DEBUG: 03:33:51.138: CLIENT[0xaaaae5e84200]: claiming operation OP_HANDSHAKE succeeded
(process:1009): GLib-Net-DEBUG: 03:33:51.196: CLIENT[0xaaaae5e84200]: verifying peer certificate
(process:1009): GLib-Net-DEBUG: 03:33:51.206: CLIENT[0xaaaae5e84200]: TLS handshake thread succeeded
(process:1009): GLib-Net-DEBUG: 03:33:51.206: CLIENT[0xaaaae5e84200]: yielding operation OP_HANDSHAKE
(process:1009): GLib-Net-DEBUG: 03:33:51.207: CLIENT[0xaaaae5e84200]: Asynchronous TLS handshake thread completed
(process:1009): GLib-Net-DEBUG: 03:33:51.207: CLIENT[0xaaaae5e84200]: finishing TLS handshake
(process:1009): GLib-Net-DEBUG: 03:33:51.207: CLIENT[0xaaaae5e84200]: TLS handshake has finished successfully
(process:1009): GLib-Net-DEBUG: 03:33:51.208: CLIENT[0xaaaae5e84200]: starting to write 383 bytes to TLS connection
(process:1009): GLib-Net-DEBUG: 03:33:51.208: CLIENT[0xaaaae5e84200]: claiming operation OP_WRITE
(process:1009): GLib-Net-DEBUG: 03:33:51.208: CLIENT[0xaaaae5e84200]: claiming operation OP_WRITE succeeded
(process:1009): GLib-Net-DEBUG: 03:33:51.208: CLIENT[0xaaaae5e84200]: yielding operation OP_WRITE
(process:1009): GLib-Net-DEBUG: 03:33:51.208: CLIENT[0xaaaae5e84200]: successfully write 383 bytes to TLS connection
(process:1009): GLib-Net-DEBUG: 03:33:51.208: CLIENT[0xaaaae5e84200]: starting to read data from TLS connection
(process:1009): GLib-Net-DEBUG: 03:33:51.208: CLIENT[0xaaaae5e84200]: claiming operation OP_READ
(process:1009): GLib-Net-DEBUG: 03:33:51.208: CLIENT[0xaaaae5e84200]: claiming operation OP_READ succeeded
(process:1009): GLib-Net-DEBUG: 03:33:51.210: CLIENT[0xaaaae5e84200]: yielding operation OP_READ
(process:1009): GLib-Net-DEBUG: 03:33:51.210: CLIENT[0xaaaae5e84200]: reading data from TLS connection has failed: WOULD_BLOCK
(process:1009): GLib-Net-DEBUG: 03:33:51.599: CLIENT[0xaaaae5e84200]: starting to read data from TLS connection
(process:1009): GLib-Net-DEBUG: 03:33:51.600: CLIENT[0xaaaae5e84200]: claiming operation OP_READ
(process:1009): GLib-Net-DEBUG: 03:33:51.600: CLIENT[0xaaaae5e84200]: claiming operation OP_READ succeeded
(process:1009): GLib-Net-DEBUG: 03:33:51.600: CLIENT[0xaaaae5e84200]: yielding operation OP_READ
(process:1009): GLib-Net-DEBUG: 03:33:51.600: CLIENT[0xaaaae5e84200]: successfully read 980 bytes from TLS connection
(process:1009): GLib-Net-DEBUG: 03:33:51.603: CLIENT[0xaaaae5e84200]: starting to close the TLS connection
(process:1009): GLib-Net-DEBUG: 03:33:51.603: CLIENT[0xaaaae5e84200]: claiming operation OP_CLOSE_BOTH
(process:1009): GLib-Net-DEBUG: 03:33:51.603: CLIENT[0xaaaae5e84200]: claiming operation OP_CLOSE_BOTH succeeded
(process:1009): GLib-Net-DEBUG: 03:33:51.604: CLIENT[0xaaaae5e84200]: yielding operation OP_CLOSE_BOTH
(process:1009): GLib-Net-DEBUG: 03:33:51.604: CLIENT[0xaaaae5e84200]: the TLS connection has been closed successfully
(WPEWebProcess:1011): GLib-GIO-DEBUG: 03:33:51.640: _g_io_module_get_default: Found default implementation gnutls (GTlsBackendGnutls) for ?gio-tls-backend?
(cog:1003): GLib-GIO-DEBUG: 03:33:51.679: _g_io_module_get_default: Found default implementation gnutls (GTlsBackendGnutls) for ?gio-tls-backend?
Cog-Core-Message: 03:33:51.689: <https://webglsamples.org/aquarium/aquarium.html> Loading...

(cog:1003): Cog-DRM-WARNING **: 03:33:52.139: failed to create framebuffer: No such file or directory
Cog-Core-Message: 03:33:54.756: <https://webglsamples.org/aquarium/aquarium.html> Loaded successfully.

NOTE: I add "PACKAGECONFIG_append_pn-cog = " drm" in my local.conf to enable drm support.

Do I need modify the configuration for other recipes (such as mesa)?

Thanks.

clopez commented 2 years ago

Not sure what is happening and what leads to that error, but checking the log, it seems to me that it fails to open /dev/dri/card1 which seems to be the device with the render node associated (/dev/dri/renderD128) in this case. Can you double-check that this devices are with rw permissions ? Run: chmod 660 /dev/dri/*

black53421 commented 2 years ago

I found someone had mentioned a similar issue #144 in Igalia/cog. After checking the mesa in GitLab, I found there is a patch for this issue. I could run Cog with -P drm parameter after apply this patch. Unfortunately, the screen only show garbage data, so I still investigate it. Do you have any idea for this?

NOTE: kmscube and glmark2 could work.

gnulux commented 2 years ago

@black53421 : I'm trying to build a Yocto image for imx8mp board . Would you please to share your local.conf which include mesa driver , cog + wayland ?

Thanks

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stale for 7 days with no activity.