[waffle] [PATCH] gbm: add WAFFLE_GBM_RENDER_NODE for multi-GPU systems
Marek Olšák
maraeo at gmail.com
Fri Sep 9 13:14:41 UTC 2016
From: Marek Olšák <marek.olsak at amd.com>
---
src/waffle/gbm/wgbm_display.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/waffle/gbm/wgbm_display.c b/src/waffle/gbm/wgbm_display.c
index 5c8af29..f622f39 100644
--- a/src/waffle/gbm/wgbm_display.c
+++ b/src/waffle/gbm/wgbm_display.c
@@ -104,9 +104,13 @@ static int
wgbm_get_default_fd(void)
{
int fd;
+ const char *render_node = getenv("WAFFLE_GBM_RENDER_NODE");
+
+ if (!render_node)
+ render_node = "renderD[0-9]*";
// Try opening render node first
- fd = wgbm_get_default_fd_for_pattern("renderD[0-9]*");
+ fd = wgbm_get_default_fd_for_pattern(render_node);
if (fd >= 0)
return fd;
--
2.7.4
More information about the waffle
mailing list