ecore_drm2_fb_create(int fd, int width, int height, int depth, int bpp, unsigned int format)
{
Ecore_Drm2_Fb *fb;
- drm_mode_create_dumb carg;
- drm_mode_destroy_dumb darg;
- drm_mode_map_dumb marg;
+ struct drm_mode_create_dumb carg;
+ struct drm_mode_destroy_dumb darg;
+ struct drm_mode_map_dumb marg;
int ret;
EINA_SAFETY_ON_TRUE_RETURN_VAL((fd < 0), NULL);
fb->format = format;
fb->ref = 1;
- memset(&carg, 0, sizeof(drm_mode_create_dumb));
+ memset(&carg, 0, sizeof(struct drm_mode_create_dumb));
carg.bpp = bpp;
carg.width = width;
carg.height = height;
}
}
- memset(&marg, 0, sizeof(drm_mode_map_dumb));
+ memset(&marg, 0, sizeof(struct drm_mode_map_dumb));
marg.handle = fb->handles[0];
ret = sym_drmIoctl(fd, DRM_IOCTL_MODE_MAP_DUMB, &marg);
if (ret)
map_err:
sym_drmModeRmFB(fd, fb->id);
add_err:
- memset(&darg, 0, sizeof(drm_mode_destroy_dumb));
+ memset(&darg, 0, sizeof(struct drm_mode_destroy_dumb));
darg.handle = fb->handles[0];
sym_drmIoctl(fd, DRM_IOCTL_MODE_DESTROY_DUMB, &darg);
err:
EAPI Ecore_Drm2_Fb *
ecore_drm2_fb_gbm_create(int fd, int width, int height, int depth, int bpp, unsigned int format, unsigned int handle, unsigned int stride, void *bo)
{
- drm_mode_map_dumb marg;
+ struct drm_mode_map_dumb marg;
Ecore_Drm2_Fb *fb;
int ret;
}
/* mmap it if we can so screenshots are easy */
- memset(&marg, 0, sizeof(drm_mode_map_dumb));
+ memset(&marg, 0, sizeof(struct drm_mode_map_dumb));
marg.handle = fb->handles[0];
ret = sym_drmIoctl(fd, DRM_IOCTL_MODE_MAP_DUMB, &marg);
if (!ret)
if (!fb->gbm && !fb->dmabuf)
{
- drm_mode_destroy_dumb darg;
+ struct drm_mode_destroy_dumb darg;
- memset(&darg, 0, sizeof(drm_mode_destroy_dumb));
+ memset(&darg, 0, sizeof(struct drm_mode_destroy_dumb));
darg.handle = fb->handles[0];
sym_drmIoctl(fb->fd, DRM_IOCTL_MODE_DESTROY_DUMB, &darg);
}
_ecore_drm2_fb_destroy(fb);
}
-
EAPI void
ecore_drm2_fb_discard(Ecore_Drm2_Fb *fb)
{