diff --git a/include/exstubs.h b/include/exstubs.h index 182be4e1..9492c31f 100644 --- a/include/exstubs.h +++ b/include/exstubs.h @@ -24,7 +24,7 @@ and Graphics User Interface (GUI) support system for embedded systems and smart IoT devices. - Copyright (C) 2007~2018, Beijing FMSoft Technologies Co., Ltd. + Copyright (C) 2007~2019, Beijing FMSoft Technologies Co., Ltd. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -96,7 +96,11 @@ typedef struct _DrmDriver DrmDriver; * MiniGUI NEWGAL engine for hardware surface. */ typedef struct _DrmSurfaceBuffer { - /** The handle of the buffer */ + /** The prime fd of the buffer */ + int prime_fd; + /** The global name of the buffer */ + uint32_t name; + /** The local handle of the buffer */ uint32_t handle; /** The buffer identifier */ uint32_t id; diff --git a/include/gdi.h b/include/gdi.h index 0ba1e3ce..144cabd9 100644 --- a/include/gdi.h +++ b/include/gdi.h @@ -23,7 +23,7 @@ and Graphics User Interface (GUI) support system for embedded systems and smart IoT devices. - Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd. + Copyright (C) 2002~2019, Beijing FMSoft Technologies Co., Ltd. Copyright (C) 1998~2002, WEI Yongming This program is free software: you can redistribute it and/or modify @@ -13734,6 +13734,10 @@ MG_EXPORT int drmGetDeviceFD (GHANDLE video); * THe struct type defines the DRM surface information. */ typedef struct _DrmSurfaceInfo { + /** The prime fd of the buffer object. */ + int prime_fd; + /** The global name of the buffer object. */ + uint32_t name; /** The local handle of the buffer object. */ uint32_t handle; /** The buffer identifier. */ diff --git a/src/newgal/drm/drmvideo.c b/src/newgal/drm/drmvideo.c index 5485d5b1..9f2e67f2 100644 --- a/src/newgal/drm/drmvideo.c +++ b/src/newgal/drm/drmvideo.c @@ -1718,6 +1718,8 @@ BOOL __drm_get_surface_info (GAL_Surface *surface, DrmSurfaceInfo* info) DrmSurfaceBuffer* surface_buffer = (DrmSurfaceBuffer*)surface->hwdata; if (surface_buffer) { + info->prime_fd = surface_buffer->prime_fd; + info->name = surface_buffer->name; info->handle = surface_buffer->handle; info->id = surface_buffer->id; info->width = surface_buffer->width;