imx: make use of loader_open_render_node(..) helper
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Thu, 9 Aug 2018 05:12:24 +0000 (07:12 +0200)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Fri, 31 Aug 2018 19:47:13 +0000 (21:47 +0200)
Gets rid of hard-coded gpu device path.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/winsys/imx/drm/imx_drm_winsys.c

index cd72610b955f63c54fc8b9d598af1440a3670be5..4bd21250315e39ebac19a7b982784a33d42ffb6c 100644 (file)
@@ -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)