Skip to content

Conversation

siwei-li
Copy link
Contributor

@siwei-li siwei-li commented Sep 30, 2024

f98baf3

[WPE] WPE Platform: add a connect method to WPEDisplayDRM to use a custom device file
https://bugs.webkit.org/show_bug.cgi?id=265654

Reviewed by Carlos Garcia Campos.

Adding a wpe_display_drm_connect() to the DRM platform's API, so that
the DRM device to connect to may be specified by the device name.

* Source/WebKit/WPEPlatform/wpe/drm/WPEDisplayDRM.cpp:
(wpeDisplayDRMSetup): a setup function to be called by the two functions
below
(wpeDisplayDRMConnect):
(wpe_display_drm_connect):
* Source/WebKit/WPEPlatform/wpe/drm/WPEDisplayDRM.h:

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

29dec7b

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug 🧪 wpe-wk2 ✅ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ⏳ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress 🧪 api-gtk
loading 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2
✅ 🛠 🧪 unsafe-merge loading-orange 🛠 tv ✅ 🛠 mac-safer-cpp
⏳ 🛠 tv-sim
⏳ 🛠 watch
⏳ 🛠 watch-sim

@siwei-li siwei-li requested review from zdobersek and a team as code owners September 30, 2024 15:49
@siwei-li siwei-li force-pushed the eng/WPE-WPE-Platform-add-a-connect-method-to-WPEDisplayDRM-to-use-a-custom-device-file branch from 930b4e6 to 809d3e8 Compare September 30, 2024 15:54
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* wpe_display_headless_new_for_device:
* wpe_display_headless_new_for_device: (skip)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use a different error here, DRM device "%s" not found, or something similar.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
g_set_error(error, WPE_DISPLAY_ERROR, WPE_DISPLAY_ERROR_NOT_SUPPORTED, "DRM device not supported");
g_set_error_literal(error, WPE_DISPLAY_ERROR, WPE_DISPLAY_ERROR_NOT_SUPPORTED, "DRM device not supported");

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
g_set_error(error, WPE_DISPLAY_ERROR, WPE_DISPLAY_ERROR_NOT_SUPPORTED, "No DRM devices found");
g_set_error_literal(error, WPE_DISPLAY_ERROR, WPE_DISPLAY_ERROR_NOT_SUPPORTED, "No DRM devices found");

Comment on lines 250 to 255
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's no primary or render node, we should initialize to a null CString.

@siwei-li siwei-li force-pushed the eng/WPE-WPE-Platform-add-a-connect-method-to-WPEDisplayDRM-to-use-a-custom-device-file branch from 809d3e8 to 25e89ac Compare October 16, 2024 15:53
Comment on lines +441 to +442
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add g_return_val_if_fail(WPE_IS_DISPLAY_DRM(display), FALSE);

@siwei-li siwei-li force-pushed the eng/WPE-WPE-Platform-add-a-connect-method-to-WPEDisplayDRM-to-use-a-custom-device-file branch from 25e89ac to 29dec7b Compare October 21, 2024 19:06
@carlosgcampos carlosgcampos added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Oct 22, 2024
…stom device file

https://bugs.webkit.org/show_bug.cgi?id=265654

Reviewed by Carlos Garcia Campos.

Adding a wpe_display_drm_connect() to the DRM platform's API, so that
the DRM device to connect to may be specified by the device name.

* Source/WebKit/WPEPlatform/wpe/drm/WPEDisplayDRM.cpp:
(wpeDisplayDRMSetup): a setup function to be called by the two functions
below
(wpeDisplayDRMConnect):
(wpe_display_drm_connect):
* Source/WebKit/WPEPlatform/wpe/drm/WPEDisplayDRM.h:

Canonical link: https://commits.webkit.org/285545@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WPE-WPE-Platform-add-a-connect-method-to-WPEDisplayDRM-to-use-a-custom-device-file branch from 29dec7b to f98baf3 Compare October 22, 2024 05:47
@webkit-commit-queue
Copy link
Collaborator

Committed 285545@main (f98baf3): https://commits.webkit.org/285545@main

Reviewed commits have been landed. Closing PR #34453 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit f98baf3 into WebKit:main Oct 22, 2024
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants