diff options
author | Emil Velikov <[email protected]> | 2017-05-09 18:47:20 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-05-29 16:49:47 +0100 |
commit | 628af2bc9690f42957f9799dfc0dbd0614d38d4c (patch) | |
tree | 38eae45353ad63129c3cb2d8a346f29723e3033e /src/egl/drivers | |
parent | e183c552758ac47880f5518cdff9057d99df921b (diff) |
gbm: remove unneeded gbm_drm_device abstraction
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
Diffstat (limited to 'src/egl/drivers')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 2 | ||||
-rw-r--r-- | src/egl/drivers/dri2/platform_drm.c | 17 |
2 files changed, 7 insertions, 12 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 0be7132ac58..405db61d185 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -893,7 +893,7 @@ dri2_display_release(_EGLDisplay *disp) #ifdef HAVE_DRM_PLATFORM case _EGL_PLATFORM_DRM: if (dri2_dpy->own_device) { - gbm_device_destroy(&dri2_dpy->gbm_dri->base.base); + gbm_device_destroy(&dri2_dpy->gbm_dri->base); } break; #endif diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index 9cee91bbfcf..455225e56b0 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -232,13 +232,13 @@ get_back_bo(struct dri2_egl_surface *dri2_surf) return -1; if (dri2_surf->back->bo == NULL) { if (surf->base.modifiers) - dri2_surf->back->bo = gbm_bo_create_with_modifiers(&dri2_dpy->gbm_dri->base.base, + dri2_surf->back->bo = gbm_bo_create_with_modifiers(&dri2_dpy->gbm_dri->base, surf->base.width, surf->base.height, surf->base.format, surf->base.modifiers, surf->base.count); else - dri2_surf->back->bo = gbm_bo_create(&dri2_dpy->gbm_dri->base.base, + dri2_surf->back->bo = gbm_bo_create(&dri2_dpy->gbm_dri->base, surf->base.width, surf->base.height, surf->base.format, @@ -264,7 +264,7 @@ get_swrast_front_bo(struct dri2_egl_surface *dri2_surf) } if (dri2_surf->current->bo == NULL) - dri2_surf->current->bo = gbm_bo_create(&dri2_dpy->gbm_dri->base.base, + dri2_surf->current->bo = gbm_bo_create(&dri2_dpy->gbm_dri->base, surf->base.width, surf->base.height, surf->base.format, surf->base.flags); if (dri2_surf->current->bo == NULL) @@ -709,11 +709,6 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) } dri2_dpy->gbm_dri = gbm_dri_device(gbm); - if (dri2_dpy->gbm_dri->base.type != GBM_DRM_DRIVER_TYPE_DRI) { - err = "DRI2: gbm device using incorrect/incompatible type"; - goto cleanup; - } - dri2_dpy->fd = fd; dri2_dpy->driver_name = strdup(dri2_dpy->gbm_dri->driver_name); @@ -737,9 +732,9 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) dri2_dpy->gbm_dri->swrast_put_image2 = swrast_put_image2; dri2_dpy->gbm_dri->swrast_get_image = swrast_get_image; - dri2_dpy->gbm_dri->base.base.surface_lock_front_buffer = lock_front_buffer; - dri2_dpy->gbm_dri->base.base.surface_release_buffer = release_buffer; - dri2_dpy->gbm_dri->base.base.surface_has_free_buffers = has_free_buffers; + dri2_dpy->gbm_dri->base.surface_lock_front_buffer = lock_front_buffer; + dri2_dpy->gbm_dri->base.surface_release_buffer = release_buffer; + dri2_dpy->gbm_dri->base.surface_has_free_buffers = has_free_buffers; dri2_setup_screen(disp); |