-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat(server): Add Intel/AMD GPU support (#84)
## Description ### This is a DRAFT - Changes will be discussed and made upon requests! In nutshell, this adds support for running Nestri with Intel and AMD GPU's. Both integrated and dedicated. It took a few days to find a trick for having output without dummy plugs or connected displays, but I think I got it. `gpu-screen-recorder` requires a custom patch to skip the check for connected displays (as we're using a xrandr workaround which makes them stay "unconnected") Most likely fixes #68 ### Changes The NVIDIA sections have been split in their own code branches since there's some NVIDIA specific things I didn't feel approriate to poke more than necessary for the goal of this PR. Added a script with helper functions related to GPU discovery and gathering some basic info off from them (note: it might be better to declare the helper script arrays outside it's initially run function). The helper scripts rely on `lshw`. NVIDIA code was slightly adjusted to use the bus-id's provided by the helper functions to have some code re-use. Cleaned up few things on the side. --------- Co-authored-by: Kristian Ollikainen <[email protected]> Co-authored-by: Wanjohi <[email protected]>
- Loading branch information
1 parent
b12b262
commit cf69f6c
Showing
5 changed files
with
441 additions
and
60 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,28 @@ | ||
diff --git a/src/utils.c b/src/utils.c | ||
index e00f3c5..4f1f0bf 100644 | ||
--- a/src/utils.c | ||
+++ b/src/utils.c | ||
@@ -71,7 +71,7 @@ void for_each_active_monitor_output_x11(Display *display, active_monitor_callbac | ||
char display_name[256]; | ||
for(int i = 0; i < screen_res->noutput; ++i) { | ||
XRROutputInfo *out_info = XRRGetOutputInfo(display, screen_res, screen_res->outputs[i]); | ||
- if(out_info && out_info->crtc && out_info->connection == RR_Connected) { | ||
+ if(out_info && out_info->crtc) { | ||
XRRCrtcInfo *crt_info = XRRGetCrtcInfo(display, screen_res, out_info->crtc); | ||
if(crt_info && crt_info->mode) { | ||
const XRRModeInfo *mode_info = get_mode_info(screen_res, crt_info->mode); | ||
@@ -218,10 +218,10 @@ static void for_each_active_monitor_output_drm(const gsr_egl *egl, active_monito | ||
if(connector_type) | ||
++connector_type->count; | ||
|
||
- if(connector->connection != DRM_MODE_CONNECTED) { | ||
- drmModeFreeConnector(connector); | ||
- continue; | ||
- } | ||
+ //if(connector->connection != DRM_MODE_CONNECTED) { | ||
+ // drmModeFreeConnector(connector); | ||
+ // continue; | ||
+ //} | ||
|
||
if(connector_type) | ||
++connector_type->count_active; |
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
Oops, something went wrong.