diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/backend/drm/backend.h | 5 | ||||
-rw-r--r-- | include/backend/udev.h (renamed from include/backend/drm/udev.h) | 13 | ||||
-rw-r--r-- | include/wlr/backend/drm.h | 3 | ||||
-rw-r--r-- | include/wlr/backend/udev.h | 9 |
4 files changed, 18 insertions, 12 deletions
diff --git a/include/backend/drm/backend.h b/include/backend/drm/backend.h index e603bccd..3f0bce73 100644 --- a/include/backend/drm/backend.h +++ b/include/backend/drm/backend.h @@ -13,7 +13,7 @@ #include <wlr/backend/drm.h> #include "backend.h" -#include "udev.h" +#include "backend/udev.h" #include "event.h" #include "drm.h" @@ -26,13 +26,14 @@ struct wlr_backend_state { struct wl_listener device_paused; struct wl_listener device_resumed; + struct wl_listener drm_invalidated; uint32_t taken_crtcs; list_t *outputs; struct wlr_drm_renderer renderer; struct wlr_session *session; - struct wlr_udev udev; + struct wlr_udev *udev; }; #endif diff --git a/include/backend/drm/udev.h b/include/backend/udev.h index 99c2c403..c5064279 100644 --- a/include/backend/drm/udev.h +++ b/include/backend/udev.h @@ -1,24 +1,19 @@ -#ifndef UDEV_H -#define UDEV_H +#ifndef _WLR_INTERNAL_UDEV_H +#define _WLR_INTERNAL_UDEV_H #include <libudev.h> - #include <wlr/session.h> #include <wayland-server.h> +#include <wlr/backend/udev.h> struct wlr_udev { struct udev *udev; struct udev_monitor *mon; char *drm_path; - struct wl_event_source *event; + struct wl_signal invalidate_drm; }; -struct wlr_drm_backend; -bool wlr_udev_init(struct wl_display *display, struct wlr_udev *udev); -void wlr_udev_free(struct wlr_udev *udev); int wlr_udev_find_gpu(struct wlr_udev *udev, struct wlr_session *session); -void wlr_udev_event(struct wlr_drm_backend *backend); - #endif diff --git a/include/wlr/backend/drm.h b/include/wlr/backend/drm.h index 2863f926..a486757d 100644 --- a/include/wlr/backend/drm.h +++ b/include/wlr/backend/drm.h @@ -4,8 +4,9 @@ #include <wayland-server.h> #include <wlr/session.h> #include <wlr/backend.h> +#include <wlr/backend/udev.h> struct wlr_backend *wlr_drm_backend_create(struct wl_display *display, - struct wlr_session *session); + struct wlr_session *session, struct wlr_udev *udev, int gpu_fd); #endif diff --git a/include/wlr/backend/udev.h b/include/wlr/backend/udev.h new file mode 100644 index 00000000..387a63e6 --- /dev/null +++ b/include/wlr/backend/udev.h @@ -0,0 +1,9 @@ +#ifndef _WLR_BACKEND_UDEV_H +#define _WLR_BACKEND_UDEV_H + +struct wlr_udev; + +struct wlr_udev *wlr_udev_create(struct wl_display *display); +void wlr_udev_destroy(struct wlr_udev *udev); + +#endif |