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
This commit is contained in:
Derek Foreman 2017-05-08 14:38:45 -05:00
parent cee4d928cf
commit 8067b0146a
2 changed files with 3 additions and 1 deletions

View File

@ -149,7 +149,7 @@ ecore_drm2_fb_destroy(Ecore_Drm2_Fb *fb)
if (fb->id) sym_drmModeRmFB(fb->fd, fb->id);
if (!fb->gbm)
if (!fb->gbm && !fb->dmabuf)
{
drm_mode_destroy_dumb darg;
@ -608,6 +608,7 @@ ecore_drm2_fb_dmabuf_import(int fd, int width, int height, int depth, int bpp, u
if (sym_drmPrimeFDToHandle(fd, dmabuf_fd[i], &fb->handles[i]))
goto fail;
fb->dmabuf = EINA_TRUE;
fb->fd = fd;
fb->w = width;
fb->h = height;

View File

@ -702,6 +702,7 @@ struct _Ecore_Drm2_Fb
void *gbm_bo;
Eina_Bool gbm : 1;
Eina_Bool dmabuf : 1;
Eina_Bool busy : 1;
void *mmap;