diff options
Diffstat (limited to 'xf86drmMode.h')
-rw-r--r-- | xf86drmMode.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/xf86drmMode.h b/xf86drmMode.h index 8e400340..c5f1b4a7 100644 --- a/xf86drmMode.h +++ b/xf86drmMode.h @@ -70,6 +70,7 @@ extern "C" { #define DRM_CONNECTOR_NAME_LEN 32 #define DRM_DISPLAY_MODE_LEN 32 #define DRM_PROP_NAME_LEN 32 +#define DRM_SOURCE_NAME_LEN 32 #define DRM_MODE_TYPE_BUILTIN (1<<0) #define DRM_MODE_TYPE_CLOCK_C ((1<<1) | DRM_MODE_TYPE_BUILTIN) @@ -307,6 +308,24 @@ typedef struct _drmModePlaneRes { uint32_t *planes; } drmModePlaneRes, *drmModePlaneResPtr; +typedef struct _drmModeSource { + uint32_t source_id; + char name[DRM_SOURCE_NAME_LEN]; + + uint32_t plane_id; + uint32_t possible_planes; + uint32_t count_formats; + uint32_t *formats; + + uint32_t width, height; + uint32_t pixel_format; +} drmModeSource, *drmModeSourcePtr; + +typedef struct _drmModeSourceRes { + uint32_t count_sources; + uint32_t *sources; +} drmModeSourceRes, *drmModeSourceResPtr; + extern void drmModeFreeModeInfo( drmModeModeInfoPtr ptr ); extern void drmModeFreeResources( drmModeResPtr ptr ); extern void drmModeFreeFB( drmModeFBPtr ptr ); @@ -315,6 +334,8 @@ extern void drmModeFreeConnector( drmModeConnectorPtr ptr ); extern void drmModeFreeEncoder( drmModeEncoderPtr ptr ); extern void drmModeFreePlane( drmModePlanePtr ptr ); extern void drmModeFreePlaneResources(drmModePlaneResPtr ptr); +extern void drmModeFreeSource( drmModeSourcePtr ptr ); +extern void drmModeFreeSourceResources(drmModeSourceResPtr ptr); /** * Retrives all of the resources associated with a card. @@ -434,6 +455,12 @@ extern int drmModeSetPlane(int fd, uint32_t plane_id, uint32_t crtc_id, uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h); +extern drmModeSourceResPtr drmModeGetSourceResources(int fd); +extern drmModeSourcePtr drmModeGetSource(int fd, uint32_t source_id); +extern int drmModeSetSource(int fd, uint32_t source_id, uint32_t plane_id, + uint32_t width, uint32_t height, + uint32_t pixel_format); + extern drmModeObjectPropertiesPtr drmModeObjectGetProperties(int fd, uint32_t object_id, uint32_t object_type); |