diff options
author | Dave Barnish <dave.barnish@arm.com> | 2013-04-22 16:09:22 +0100 |
---|---|---|
committer | Dave Barnish <dave.barnish@arm.com> | 2013-04-25 15:34:45 +0100 |
commit | 982518c9f26222820982c2b10ec8c06b31698fc2 (patch) | |
tree | 19154d510cb248f2ac0dc56c68514cd5b925f1e8 /src/armsoc_dumb.c | |
parent | e0e9ba96e86f80798c1c4d32bdd386e6903cafb9 (diff) |
Improve ScreenInit & CloseScreen
In ARMSOCScreenInit and CloseScreen retain drm mastership while
creating/destroying scanout buffer.
Failures destroying scanout buffer produce errors instead of asserts.
Clarify usage of CloseScreen & FreeScreen.
Exa CloseScreen now frees exa driver pointer.
Change-Id: Icbce4f311e99d0af7702310fd45a064bb5d8b320
Diffstat (limited to 'src/armsoc_dumb.c')
-rw-r--r-- | src/armsoc_dumb.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/armsoc_dumb.c b/src/armsoc_dumb.c index 3f80006..5ac3a58 100644 --- a/src/armsoc_dumb.c +++ b/src/armsoc_dumb.c @@ -183,13 +183,16 @@ static void armsoc_bo_del(struct armsoc_bo *bo) if (bo->fb_id) { res = drmModeRmFB(bo->dev->fd, bo->fb_id); - assert(res == 0); + if(res) { + xf86DrvMsg(-1, X_ERROR, "drmModeRmFb failed %d : %s\n", res, strerror(errno)); + } } - destroy_dumb.handle = bo->handle; res = drmIoctl(bo->dev->fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroy_dumb); - assert(res == 0); + if(res) { + xf86DrvMsg(-1, X_ERROR, "destroy dumb failed %d : %s\n", res, strerror(errno)); + } free(bo); } |