Permalink
Browse files

Merge pull request #1 from lumag/master

Dumb bo kms update
  • Loading branch information...
2 parents f45fb49 + 7b041ea commit 7f4378d6313a480900fed785556534eb8180d9a7 @geomatsi geomatsi committed Oct 11, 2012
Showing with 4 additions and 15 deletions.
  1. +2 −2 CMakeLists.txt
  2. +2 −13 drm_info.c
View
@@ -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})
+target_link_libraries(drm_dumb_bo_libkms ${KMS_LIBRARY} ${DRM_LIBRARY})
View
@@ -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);

0 comments on commit 7f4378d

Please sign in to comment.