Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

drm_info: no point in pinging gbm, disable it

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
  • Loading branch information...
commit 01dfa0879f349c47520de7a404d53c9bcc34a370 1 parent f45fb49
@lumag authored
Showing with 3 additions and 14 deletions.
  1. +1 −1  CMakeLists.txt
  2. +2 −13 drm_info.c
View
2  CMakeLists.txt
@@ -71,6 +71,6 @@ include_directories(${GL_INCLUDE_DIR})
# set libraries paths
target_link_libraries(test ${EGL_LIBRARY} ${DRM_LIBRARY} ${GBM_LIBRARY} ${GL_LIBRARY})
-target_link_libraries(drm_info ${DRM_LIBRARY} ${GBM_LIBRARY} ${GL_LIBRARY})
+target_link_libraries(drm_info ${DRM_LIBRARY})
target_link_libraries(drm_dumb_bo ${DRM_LIBRARY})
target_link_libraries(drm_dumb_bo_libkms ${KMS_LIBRARY})
View
15 drm_info.c
@@ -28,9 +28,9 @@
#include <unistd.h>
#include <string.h>
#include <stdio.h>
+#include <stdint.h>
#include <fcntl.h>
-#include <gbm.h>
#include <drm.h>
#include <xf86drmMode.h>
@@ -188,7 +188,6 @@ int main(int argc, char *argv[])
drmModeEncoder *encoder;
drmModeRes *resources;
- struct gbm_device *gbm;
int i, fd, ret;
fd = open(device_name, O_RDWR);
@@ -198,13 +197,6 @@ int main(int argc, char *argv[])
goto exit;
}
- gbm = gbm_create_device(fd);
- if (gbm == NULL) {
- fprintf(stderr, "couldn't create gbm device\n");
- ret = -1;
- goto close_fd;
- }
-
/* From xf86drmMode.h:
typedef struct _drmModeRes {
@@ -231,7 +223,7 @@ int main(int argc, char *argv[])
if (!resources) {
fprintf(stderr, "drmModeGetResources failed\n");
ret = -1;
- goto destroy_gbm_device;
+ goto close_fd;
}
@@ -255,9 +247,6 @@ int main(int argc, char *argv[])
}
-destroy_gbm_device:
- gbm_device_destroy(gbm);
-
close_fd:
close(fd);
Please sign in to comment.
Something went wrong with that request. Please try again.