[Mesa-dev] [PATCH 4/4] imx: make use of loader_open_render_node(..) helper

Christian Gmeiner christian.gmeiner at gmail.com
Thu Aug 9 05:12:24 UTC 2018


Gets rid of hard-coded gpu device path.

Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
 src/gallium/winsys/imx/drm/imx_drm_winsys.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/winsys/imx/drm/imx_drm_winsys.c b/src/gallium/winsys/imx/drm/imx_drm_winsys.c
index cd72610b95..4bd2125031 100644
--- a/src/gallium/winsys/imx/drm/imx_drm_winsys.c
+++ b/src/gallium/winsys/imx/drm/imx_drm_winsys.c
@@ -26,6 +26,7 @@
 
 #include "imx_drm_public.h"
 #include "etnaviv/drm/etnaviv_drm_public.h"
+#include "loader/loader.h"
 #include "renderonly/renderonly.h"
 
 #include <fcntl.h>
@@ -36,7 +37,7 @@ struct pipe_screen *imx_drm_screen_create(int fd)
    struct renderonly ro = {
       .create_for_resource = renderonly_create_kms_dumb_buffer_for_resource,
       .kms_fd = fd,
-      .gpu_fd = open("/dev/dri/renderD128", O_RDWR | O_CLOEXEC)
+      .gpu_fd = loader_open_render_node("etnaviv")
    };
 
    if (ro.gpu_fd < 0)
-- 
2.17.1



More information about the mesa-dev mailing list