diff --git a/backend/drm/backend.c b/backend/drm/backend.c index 7c2ff7fe..81a212d2 100644 --- a/backend/drm/backend.c +++ b/backend/drm/backend.c @@ -12,8 +12,7 @@ #include #include #include "backend/udev.h" -#include "backend/drm/backend.h" -#include "backend/drm/drm.h" +#include "backend/drm.h" #include "common/log.h" static bool wlr_drm_backend_init(struct wlr_backend_state *state) { diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 066edd67..d6a3f8a2 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -13,8 +13,7 @@ #include #include #include -#include "backend/drm/backend.h" -#include "backend/drm/drm.h" +#include "backend/drm.h" #include "common/log.h" #include "types.h" diff --git a/include/backend/drm/drm.h b/include/backend/drm.h similarity index 66% rename from include/backend/drm/drm.h rename to include/backend/drm.h index 443873fd..e75dff27 100644 --- a/include/backend/drm/drm.h +++ b/include/backend/drm.h @@ -1,14 +1,23 @@ -#ifndef DRM_H -#define DRM_H +#ifndef DRM_BACKEND_H +#define DRM_BACKEND_H #include +#include #include +#include #include #include +#include #include +#include +#include +#include + #include "backend/egl.h" -#include "backend.h" +#include "backend/udev.h" +#include "event.h" +#include "drm.h" struct wlr_drm_renderer { int fd; @@ -19,6 +28,25 @@ struct wlr_drm_renderer { bool wlr_drm_renderer_init(struct wlr_drm_renderer *renderer, int fd); void wlr_drm_renderer_free(struct wlr_drm_renderer *renderer); +struct wlr_backend_state { + int fd; + dev_t dev; + + struct wlr_backend *backend; + struct wl_event_source *drm_event; + + 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; +}; + enum wlr_drm_output_state { DRM_OUTPUT_DISCONNECTED, DRM_OUTPUT_NEEDS_MODESET, diff --git a/include/backend/drm/backend.h b/include/backend/drm/backend.h deleted file mode 100644 index 3f0bce73..00000000 --- a/include/backend/drm/backend.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef DRM_BACKEND_H -#define DRM_BACKEND_H - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "backend.h" -#include "backend/udev.h" -#include "event.h" -#include "drm.h" - -struct wlr_backend_state { - int fd; - dev_t dev; - - struct wlr_backend *backend; - struct wl_event_source *drm_event; - - 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; -}; - -#endif