Skip to content

Commit

Permalink
Merge pull request geomatsi#1 from lumag/master
Browse files Browse the repository at this point in the history
Dumb bo kms update
  • Loading branch information
geomatsi committed Oct 11, 2012
2 parents f45fb49 + 7b041ea commit 7f4378d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
15 changes: 2 additions & 13 deletions drm_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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);
Expand All @@ -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 {
Expand All @@ -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;
}


Expand All @@ -255,9 +247,6 @@ int main(int argc, char *argv[])
}


destroy_gbm_device:
gbm_device_destroy(gbm);

close_fd:
close(fd);

Expand Down

0 comments on commit 7f4378d

Please sign in to comment.