From 773d6ea6e715d207bda3a53a9dfc8acf686035b0 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Thu, 9 Aug 2018 07:12:24 +0200 Subject: [PATCH] imx: make use of loader_open_render_node(..) helper Gets rid of hard-coded gpu device path. Signed-off-by: Christian Gmeiner Reviewed-by: Emil Velikov --- 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 cd72610b955..4bd21250315 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 @@ -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.30.2