[Mesa-dev] [PATCH 16/28] XXX:st/omx: honour the configure --with-platform

Emil Velikov emil.l.velikov at gmail.com
Thu Dec 8 20:00:05 UTC 2016


From: Emil Velikov <emil.velikov at collabora.com>

Signed-off-by: Emil Velikov <emil.velikov at 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



More information about the mesa-dev mailing list