summaryrefslogtreecommitdiff
path: root/src/common_drm.h
diff options
context:
space:
mode:
authorRussell King <rmk@armlinux.org.uk>2017-02-25 11:06:17 +0000
committerRussell King <rmk@armlinux.org.uk>2017-02-25 17:16:10 +0000
commit8c9ffafc41e95dc2130ffbfe5b48fe2555a91f9b (patch)
tree6751907a1f471e824d3d630ccdc8f9b00e2c8786 /src/common_drm.h
parent77f88d4a1f54cd3a4fd34f8aa738cb7ea1084dbc (diff)
src: add universal plane support
Add universal plane support to the common drm implementation - this gets all planes and plane properties from the kernel for overlay planes, and stores the primary plane ID in our CRTC structure. Signed-off-by: Russell King <rmk@armlinux.org.uk>
Diffstat (limited to 'src/common_drm.h')
-rw-r--r--src/common_drm.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/common_drm.h b/src/common_drm.h
index 537c88d..62cbd17 100644
--- a/src/common_drm.h
+++ b/src/common_drm.h
@@ -17,6 +17,7 @@ struct common_crtc_info {
int drm_fd;
unsigned num;
drmModeCrtcPtr mode_crtc;
+ uint32_t primary_plane_id;
void *cursor_data;
uint32_t cursor_handle;
uint32_t rotate_fb_id;
@@ -35,6 +36,11 @@ struct drm_udev_info {
CloseScreenProcPtr CloseScreen;
};
+struct common_drm_plane {
+ drmModePlanePtr mode_plane;
+ drmModeObjectPropertiesPtr mode_props;
+};
+
struct common_drm_info {
int fd;
struct common_drm_device *dev;
@@ -61,6 +67,11 @@ struct common_drm_info {
struct drm_udev_info udev;
#endif
+ Bool has_universal_planes;
+ void *plane_property_hash;
+ unsigned int num_overlay_planes;
+ struct common_drm_plane *overlay_planes;
+
OptionInfoPtr Options;
CloseScreenProcPtr CloseScreen;
@@ -99,6 +110,11 @@ void common_drm_crtc_shadow_destroy(xf86CrtcPtr crtc);
Bool common_drm_init_mode_resources(ScrnInfoPtr pScrn,
const xf86CrtcFuncsRec *funcs);
+drmModePropertyPtr common_drm_plane_get_property(ScrnInfoPtr pScrn,
+ uint32_t prop_id);
+void common_drm_cleanup_plane_resources(ScrnInfoPtr pScrn);
+Bool common_drm_init_plane_resources(ScrnInfoPtr pScrn);
+
Bool common_drm_flip(ScrnInfoPtr pScrn, PixmapPtr pixmap,
struct common_drm_event *event, xf86CrtcPtr ref_crtc);
void common_drm_flip_pixmap(ScreenPtr pScreen, PixmapPtr a, PixmapPtr b);