diff options
-rw-r--r-- | backend/drm/backend.c | 3 | ||||
-rw-r--r-- | backend/drm/drm.c | 3 | ||||
-rw-r--r-- | include/backend/drm.h (renamed from include/backend/drm/drm.h) | 34 | ||||
-rw-r--r-- | include/backend/drm/backend.h | 39 |
4 files changed, 33 insertions, 46 deletions
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 <wlr/common/list.h> #include <wlr/backend/interface.h> #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 <GLES3/gl3.h> #include <wayland-server.h> #include <wlr/backend/interface.h> -#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 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 <stdbool.h> +#include <stddef.h> #include <stdint.h> +#include <wayland-server.h> #include <xf86drmMode.h> #include <EGL/egl.h> +#include <libudev.h> #include <gbm.h> +#include <wlr/session.h> +#include <wlr/common/list.h> +#include <wlr/backend/drm.h> + #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 <stdbool.h> -#include <stddef.h> -#include <EGL/egl.h> -#include <gbm.h> -#include <libudev.h> -#include <wayland-server.h> - -#include <wlr/session.h> -#include <wlr/common/list.h> -#include <wlr/backend/drm.h> - -#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 |