egl: android: directly use dri2_create_image_dma_buf()

Make the function non static so that we can use it directly from the
android platform code.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
This commit is contained in:
Emil Velikov 2016-05-01 12:42:53 +01:00
parent 2cd687ce97
commit 38ef6f5f60
3 changed files with 6 additions and 3 deletions

View File

@ -1960,7 +1960,7 @@ dri2_check_dma_buf_format(const _EGLImageAttribs *attrs)
* *
* Therefore we must never close or otherwise modify the file descriptors. * Therefore we must never close or otherwise modify the file descriptors.
*/ */
static _EGLImage * _EGLImage *
dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx, dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
EGLClientBuffer buffer, const EGLint *attr_list) EGLClientBuffer buffer, const EGLint *attr_list)
{ {

View File

@ -361,6 +361,10 @@ dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx, EGLenum target, _EGLContext *ctx, EGLenum target,
EGLClientBuffer buffer, const EGLint *attr_list); EGLClientBuffer buffer, const EGLint *attr_list);
_EGLImage *
dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
EGLClientBuffer buffer, const EGLint *attr_list);
EGLBoolean EGLBoolean
dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp); dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp);

View File

@ -494,8 +494,7 @@ dri2_create_image_android_native_buffer(_EGLDriver *drv, _EGLDisplay *disp,
if (fourcc == -1 || pitch == 0) if (fourcc == -1 || pitch == 0)
return NULL; return NULL;
return dri2_create_image_khr(drv, disp, ctx, EGL_LINUX_DMA_BUF_EXT, return dri2_create_image_dma_buf(disp, ctx, NULL, attr_list);
NULL, attr_list);
} }
name = get_native_buffer_name(buf); name = get_native_buffer_name(buf);