summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-05-08 14:38:45 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-05-09 10:34:33 -0500
commit8067b0146a4e27f2b2550dc9d0029a86bbf7b566 (patch)
tree993e7930c7b08a25d48051dc5f47974ebdbc1bfc /src/lib
parentcee4d928cf94d9a97c8a21ac36483e6a70a0745c (diff)
ecore_drm2: Fix dmabuf fb destroy
I missed the fact that it'd run through the existing non-gbm path on destroy, resulting in a (probably harmless) bad ioctl
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_fb.c3
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_private.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c
index ea20bb2fbd..5de93f8ff7 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -149,7 +149,7 @@ ecore_drm2_fb_destroy(Ecore_Drm2_Fb *fb)
149 149
150 if (fb->id) sym_drmModeRmFB(fb->fd, fb->id); 150 if (fb->id) sym_drmModeRmFB(fb->fd, fb->id);
151 151
152 if (!fb->gbm) 152 if (!fb->gbm && !fb->dmabuf)
153 { 153 {
154 drm_mode_destroy_dumb darg; 154 drm_mode_destroy_dumb darg;
155 155
@@ -608,6 +608,7 @@ ecore_drm2_fb_dmabuf_import(int fd, int width, int height, int depth, int bpp, u
608 if (sym_drmPrimeFDToHandle(fd, dmabuf_fd[i], &fb->handles[i])) 608 if (sym_drmPrimeFDToHandle(fd, dmabuf_fd[i], &fb->handles[i]))
609 goto fail; 609 goto fail;
610 610
611 fb->dmabuf = EINA_TRUE;
611 fb->fd = fd; 612 fb->fd = fd;
612 fb->w = width; 613 fb->w = width;
613 fb->h = height; 614 fb->h = height;
diff --git a/src/lib/ecore_drm2/ecore_drm2_private.h b/src/lib/ecore_drm2/ecore_drm2_private.h
index 860bb70c66..1b82ad5d42 100644
--- a/src/lib/ecore_drm2/ecore_drm2_private.h
+++ b/src/lib/ecore_drm2/ecore_drm2_private.h
@@ -702,6 +702,7 @@ struct _Ecore_Drm2_Fb
702 void *gbm_bo; 702 void *gbm_bo;
703 703
704 Eina_Bool gbm : 1; 704 Eina_Bool gbm : 1;
705 Eina_Bool dmabuf : 1;
705 Eina_Bool busy : 1; 706 Eina_Bool busy : 1;
706 707
707 void *mmap; 708 void *mmap;