This repository has been archived by the owner on Jul 20, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patches: Add DisplayLink support (#15)
- Loading branch information
1 parent
91de8da
commit 422207d
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
This patch adds support is DisplayLink and the DisplayLink driver. | ||
The following comes from: | ||
https://github.com/muellerjoel/wlroots-displaylink | ||
diff --git a/render/egl.c b/render/egl.c | ||
index e3839c7d..558cff00 100644 | ||
--- a/render/egl.c | ||
+++ b/render/egl.c | ||
@@ -490,8 +490,21 @@ static int open_render_node(int drm_fd) { | ||
} | ||
wlr_log(WLR_DEBUG, "DRM device '%s' has no render node, " | ||
"falling back to primary node", render_name); | ||
+ | ||
+ drmVersion *render_version = drmGetVersion(drm_fd); | ||
+ if (render_version != NULL && render_version->name != NULL) { | ||
+ wlr_log(WLR_DEBUG, "DRM device version.name '%s'", render_version->name); | ||
+ if (strcmp(render_version->name, "evdi") == 0) { | ||
+ free(render_name); | ||
+ render_name = malloc(sizeof(char)*15); | ||
+ strcpy(render_name, "/dev/dri/card0"); | ||
+ } | ||
+ drmFreeVersion(render_version); | ||
+ } | ||
} | ||
|
||
+ wlr_log(WLR_DEBUG, "open_render_node() DRM device '%s'", render_name); | ||
+ | ||
int render_fd = open(render_name, O_RDWR | O_CLOEXEC); | ||
if (render_fd < 0) { | ||
wlr_log_errno(WLR_ERROR, "Failed to open DRM node '%s'", render_name); |