add prime_fd and name fields for DrmSurface object and info

This commit is contained in:
Vincent Wei
2019-11-25 17:12:17 +08:00
parent 873e88313b
commit cd558b1739
3 changed files with 13 additions and 3 deletions
+6 -2
View File
@@ -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;
+5 -1
View File
@@ -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. */
+2
View File
@@ -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;