From 610b0493ac4a3bbde44378adf855c7202b1e59c4 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Sat, 30 Sep 2017 19:03:34 +1300 Subject: [PATCH] Rename files to remove pointless drm prefix --- backend/drm/backend.c | 2 +- backend/drm/drm.c | 14 +++++++------- backend/drm/{drm-atomic.c => iface_atomic.c} | 6 +++--- backend/drm/{drm-legacy.c => iface_legacy.c} | 6 +++--- backend/drm/{drm-properties.c => properties.c} | 2 +- backend/drm/{drm-util.c => util.c} | 2 +- backend/meson.build | 8 ++++---- include/backend/{ => drm}/drm.h | 6 +++--- .../backend/{drm-properties.h => drm/properties.h} | 0 include/backend/{drm-util.h => drm/util.h} | 0 10 files changed, 23 insertions(+), 23 deletions(-) rename backend/drm/{drm-atomic.c => iface_atomic.c} (98%) rename backend/drm/{drm-legacy.c => iface_legacy.c} (94%) rename backend/drm/{drm-properties.c => properties.c} (99%) rename backend/drm/{drm-util.c => util.c} (99%) rename include/backend/{ => drm}/drm.h (98%) rename include/backend/{drm-properties.h => drm/properties.h} (100%) rename include/backend/{drm-util.h => drm/util.h} (100%) diff --git a/backend/drm/backend.c b/backend/drm/backend.c index c394ed65..e046cea6 100644 --- a/backend/drm/backend.c +++ b/backend/drm/backend.c @@ -12,7 +12,7 @@ #include #include #include -#include "backend/drm.h" +#include "backend/drm/drm.h" static bool wlr_drm_backend_start(struct wlr_backend *_backend) { struct wlr_drm_backend *backend = (struct wlr_drm_backend *)_backend; diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 1a656172..cba41023 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -20,12 +20,12 @@ #include #include #include -#include "backend/drm.h" -#include "backend/drm-util.h" +#include "backend/drm/drm.h" +#include "backend/drm/util.h" bool wlr_drm_check_features(struct wlr_drm_backend *backend) { - extern const struct wlr_drm_interface legacy_iface; - extern const struct wlr_drm_interface atomic_iface; + extern const struct wlr_drm_interface iface_legacy; + extern const struct wlr_drm_interface iface_atomic; if (drmSetClientCap(backend->fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1)) { wlr_log(L_ERROR, "DRM universal planes unsupported"); @@ -34,13 +34,13 @@ bool wlr_drm_check_features(struct wlr_drm_backend *backend) { if (getenv("WLR_DRM_NO_ATOMIC")) { wlr_log(L_DEBUG, "WLR_DRM_NO_ATOMIC set, forcing legacy DRM interface"); - backend->iface = &legacy_iface; + backend->iface = &iface_legacy; } else if (drmSetClientCap(backend->fd, DRM_CLIENT_CAP_ATOMIC, 1)) { wlr_log(L_DEBUG, "Atomic modesetting unsupported, using legacy DRM interface"); - backend->iface = &legacy_iface; + backend->iface = &iface_legacy; } else { wlr_log(L_DEBUG, "Using atomic DRM interface"); - backend->iface = &atomic_iface; + backend->iface = &iface_atomic; } return true; diff --git a/backend/drm/drm-atomic.c b/backend/drm/iface_atomic.c similarity index 98% rename from backend/drm/drm-atomic.c rename to backend/drm/iface_atomic.c index 16c9c5c3..5bb2da9b 100644 --- a/backend/drm/drm-atomic.c +++ b/backend/drm/iface_atomic.c @@ -2,8 +2,8 @@ #include #include #include -#include "backend/drm.h" -#include "backend/drm-util.h" +#include "backend/drm/drm.h" +#include "backend/drm/util.h" struct atomic { drmModeAtomicReq *req; @@ -180,7 +180,7 @@ static bool atomic_crtc_move_cursor(struct wlr_drm_backend *backend, return atomic_end(backend->fd, &atom); } -const struct wlr_drm_interface atomic_iface = { +const struct wlr_drm_interface iface_atomic = { .conn_enable = atomic_conn_enable, .crtc_pageflip = atomic_crtc_pageflip, .crtc_set_cursor = atomic_crtc_set_cursor, diff --git a/backend/drm/drm-legacy.c b/backend/drm/iface_legacy.c similarity index 94% rename from backend/drm/drm-legacy.c rename to backend/drm/iface_legacy.c index 9b7cd301..856e9060 100644 --- a/backend/drm/drm-legacy.c +++ b/backend/drm/iface_legacy.c @@ -2,8 +2,8 @@ #include #include #include -#include "backend/drm.h" -#include "backend/drm-util.h" +#include "backend/drm/drm.h" +#include "backend/drm/util.h" static bool legacy_crtc_pageflip(struct wlr_drm_backend *backend, struct wlr_drm_output *output, struct wlr_drm_crtc *crtc, @@ -57,7 +57,7 @@ bool legacy_crtc_move_cursor(struct wlr_drm_backend *backend, return !drmModeMoveCursor(backend->fd, crtc->id, x, y); } -const struct wlr_drm_interface legacy_iface = { +const struct wlr_drm_interface iface_legacy = { .conn_enable = legacy_conn_enable, .crtc_pageflip = legacy_crtc_pageflip, .crtc_set_cursor = legacy_crtc_set_cursor, diff --git a/backend/drm/drm-properties.c b/backend/drm/properties.c similarity index 99% rename from backend/drm/drm-properties.c rename to backend/drm/properties.c index ef24476f..5bec3243 100644 --- a/backend/drm/drm-properties.c +++ b/backend/drm/properties.c @@ -5,7 +5,7 @@ #include #include #include -#include "backend/drm-properties.h" +#include "backend/drm/properties.h" /* * Creates a mapping between property names and an array index where to store diff --git a/backend/drm/drm-util.c b/backend/drm/util.c similarity index 99% rename from backend/drm/drm-util.c rename to backend/drm/util.c index 0f8ee18c..656c070a 100644 --- a/backend/drm/drm-util.c +++ b/backend/drm/util.c @@ -3,7 +3,7 @@ #include #include #include -#include "backend/drm-util.h" +#include "backend/drm/util.h" #include int32_t calculate_refresh_rate(drmModeModeInfo *mode) { diff --git a/backend/meson.build b/backend/meson.build index 9e3b6fed..630bc284 100644 --- a/backend/meson.build +++ b/backend/meson.build @@ -5,10 +5,10 @@ backend_files = files( 'session/session.c', 'drm/backend.c', 'drm/drm.c', - 'drm/drm-atomic.c', - 'drm/drm-legacy.c', - 'drm/drm-properties.c', - 'drm/drm-util.c', + 'drm/iface_atomic.c', + 'drm/iface_legacy.c', + 'drm/properties.c', + 'drm/util.c', 'libinput/backend.c', 'libinput/events.c', 'libinput/keyboard.c', diff --git a/include/backend/drm.h b/include/backend/drm/drm.h similarity index 98% rename from include/backend/drm.h rename to include/backend/drm/drm.h index 6987b0bc..43838495 100644 --- a/include/backend/drm.h +++ b/include/backend/drm/drm.h @@ -1,5 +1,5 @@ -#ifndef BACKEND_DRM_H -#define BACKEND_DRM_H +#ifndef BACKEND_DRM_DRM_H +#define BACKEND_DRM_DRM_H #include #include @@ -15,7 +15,7 @@ #include #include -#include "drm-properties.h" +#include "properties.h" struct wlr_drm_plane { uint32_t type; diff --git a/include/backend/drm-properties.h b/include/backend/drm/properties.h similarity index 100% rename from include/backend/drm-properties.h rename to include/backend/drm/properties.h diff --git a/include/backend/drm-util.h b/include/backend/drm/util.h similarity index 100% rename from include/backend/drm-util.h rename to include/backend/drm/util.h