initial support for drmDMA

This commit is contained in:
Vincent Wei
2023-07-11 16:59:21 +08:00
parent 4c2b20c49f
commit 209a0c6ab0
3 changed files with 180 additions and 12 deletions
+6
View File
@@ -119,6 +119,12 @@ typedef struct _DrmSurfaceBuffer {
*/
uint32_t fb_id;
/**
* The DMA buffer index if the buffer was allocated via drmDMA().
* Since 5.0.13.
*/
int dma_idx;
/** The DRM format of the buffer. */
uint32_t drm_format;
/** The bits per pixel */
+161 -11
View File
File diff suppressed because it is too large Load Diff
+13 -1
View File
@@ -65,6 +65,12 @@
typedef struct drm_mode_info DrmModeInfo;
enum {
DRM_DBLBUF_NONE = 0,
DRM_DBLBUF_MEMCPY,
DRM_DBLBUF_DMA,
};
typedef struct GAL_PrivateVideoData {
/* For compositing schema, we force to use double buffering */
#ifdef _MGSCHEMA_COMPOSITING
@@ -100,9 +106,15 @@ typedef struct GAL_PrivateVideoData {
uint32_t cap_cursor_width;
uint32_t cap_cursor_height;
uint32_t cap_dumb:1;
uint32_t dbl_buff:1;
uint32_t dbl_buff:2;
uint32_t scanout_buff_id;
/* Use DMA for real buffer */
drm_context_t context;
int dma_bufs_idx;
int dma_bufs_siz;
drmBufMapPtr dma_bufs_map;
void* exdrv_handle;
DrmDriverOps* driver_ops;
DrmDriver* driver;