From: Emil Velikov <emil.veli...@collabora.com>

Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
---
Should we bother with the !HAVE_PLATFORM_DRM && OMX_RENDER_NODE message
? Should we error out, or continue with the other platforms ?
---
 src/gallium/state_trackers/omx/entrypoint.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/gallium/state_trackers/omx/entrypoint.c 
b/src/gallium/state_trackers/omx/entrypoint.c
index afcbd97..f68ede5 100644
--- a/src/gallium/state_trackers/omx/entrypoint.c
+++ b/src/gallium/state_trackers/omx/entrypoint.c
@@ -35,7 +35,12 @@
 #include <string.h>
 #include <stdbool.h>
 
+#if defined(HAVE_PLATFORM_X11)
 #include <X11/Xlib.h>
+#else
+#define XOpenDisplay(x) NULL
+#define XCloseDisplay(x)
+#endif
 
 #include "os/os_thread.h"
 #include "util/u_memory.h"
@@ -80,6 +85,11 @@ struct vl_screen *omx_get_screen(void)
    if (!omx_screen) {
       if (first_time) {
          omx_render_node = debug_get_option("OMX_RENDER_NODE", NULL);
+#ifndef HAVE_PLATFORM_DRM
+         if (omx_render_node) {
+            printf("attempting to use DRM, yet the build lacks DRM support. 
rebuild");
+            // fallback or exit ?
+#endif
          first_time = false;
       }
       if (omx_render_node) {
-- 
2.10.2

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to