X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flibsystemd-terminal%2Fgrdev-internal.h;h=f455dd41724a9339829f607cc1eae589e20526d4;hp=7e69c49b635365e030dea1da5569f6cc59e005a3;hb=884964a9639649422d3613500cdacea48a4ccc91;hpb=650c5444273993f969b9cd7df9add6ab2df0414e diff --git a/src/libsystemd-terminal/grdev-internal.h b/src/libsystemd-terminal/grdev-internal.h index 7e69c49b6..f455dd417 100644 --- a/src/libsystemd-terminal/grdev-internal.h +++ b/src/libsystemd-terminal/grdev-internal.h @@ -22,6 +22,7 @@ #pragma once #include +#include #include #include #include @@ -39,6 +40,15 @@ typedef struct grdev_pipe grdev_pipe; typedef struct grdev_card_vtable grdev_card_vtable; typedef struct grdev_card grdev_card; +/* + * DRM cards + */ + +bool grdev_is_drm_card(grdev_card *card); +grdev_card *grdev_find_drm_card(grdev_session *session, dev_t devnum); +int grdev_drm_card_new(grdev_card **out, grdev_session *session, struct udev_device *ud); +void grdev_drm_card_hotplug(grdev_card *card, struct udev_device *ud); + /* * Displays */ @@ -50,7 +60,7 @@ enum { }; struct grdev_tile { - LIST_FIELDS(grdev_tile, childs_by_node); + LIST_FIELDS(grdev_tile, children_by_node); grdev_tile *parent; grdev_display *display; @@ -69,7 +79,7 @@ struct grdev_tile { } leaf; struct { - size_t n_childs; + size_t n_children; LIST_HEAD(grdev_tile, child_list); } node; }; @@ -84,6 +94,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(grdev_tile*, grdev_tile_free); struct grdev_display { grdev_session *session; char *name; + void *userdata; size_t n_leafs; grdev_tile *tile; @@ -132,9 +143,11 @@ struct grdev_pipe { grdev_tile *tile; grdev_display_cache *cache; + sd_event_source *vsync_src; uint32_t width; uint32_t height; + uint32_t vrefresh; size_t max_fbs; grdev_fb *front; @@ -161,6 +174,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(grdev_pipe*, grdev_pipe_free); void grdev_pipe_ready(grdev_pipe *pipe, bool running); void grdev_pipe_frame(grdev_pipe *pipe); +void grdev_pipe_schedule(grdev_pipe *pipe, uint64_t frames); /* * Cards