diff options
author | Changyeon Lee <cyeon.lee@samsung.com> | 2017-02-08 15:04:00 +0900 |
---|---|---|
committer | Changyeon Lee <cyeon.lee@samsung.com> | 2017-02-08 15:04:00 +0900 |
commit | 36bb377be7aadf12a79f0a45991b5187782ccd45 (patch) | |
tree | 8226a983c92bbbbb25f9945b7c168a8a049e330a | |
parent | 329a5c348f7f68c2e2c2c66f71f979e8025551d5 (diff) | |
download | libtbm-dumb-36bb377be7aadf12a79f0a45991b5187782ccd45.tar.gz libtbm-dumb-36bb377be7aadf12a79f0a45991b5187782ccd45.tar.bz2 libtbm-dumb-36bb377be7aadf12a79f0a45991b5187782ccd45.zip |
fixed using wrong drm fd
Change-Id: I9d2bdac16acd0ee393a33a4aa171a2e91eecdc88
-rw-r--r-- | src/tbm_bufmgr_dumb.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/tbm_bufmgr_dumb.c b/src/tbm_bufmgr_dumb.c index 9f4b0b9..613c725 100644 --- a/src/tbm_bufmgr_dumb.c +++ b/src/tbm_bufmgr_dumb.c @@ -1516,12 +1516,6 @@ init_tbm_bufmgr_priv (tbm_bufmgr bufmgr, int fd) if (!bufmgr) return 0; - ret = drmGetCap(fd, DRM_CAP_DUMB_BUFFER, &cap); - if (ret || cap == 0) { - TBM_DUMB_LOG ("error: drm buffer isn't supported !\n"); - return 0; - } - bufmgr_dumb = calloc (1, sizeof(struct _tbm_bufmgr_dumb)); if (!bufmgr_dumb) { @@ -1556,6 +1550,12 @@ init_tbm_bufmgr_priv (tbm_bufmgr bufmgr, int fd) } } + ret = drmGetCap(bufmgr_dumb->fd, DRM_CAP_DUMB_BUFFER, &cap); + if (ret || cap == 0) { + TBM_DUMB_LOG ("error: drm buffer isn't supported !\n"); + goto fail_get_cap; + } + //Create Hash Table bufmgr_dumb->hashBos = drmHashCreate (); @@ -1637,6 +1637,7 @@ fail_alloc_backend: drmHashDestroy(bufmgr_dumb->hashBos); if (bufmgr_dumb->device_name) free(bufmgr_dumb->device_name); +fail_get_cap: fail_get_device_name: if (tbm_backend_is_display_server()) tbm_drm_helper_unset_tbm_master_fd(); |