From d883cccfd3bc743fd980669d40b67833affb899f Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 1 Apr 2021 14:21:37 +0300 Subject: [PATCH] platforms/drm: Minor coding style fixes This reformats some code according to the KF coding style. --- src/plugins/platforms/drm/drm_gpu.cpp | 8 +++++++- src/plugins/platforms/drm/drm_object.cpp | 4 ++-- src/plugins/platforms/drm/drm_object.h | 2 +- src/plugins/platforms/drm/drm_object_connector.cpp | 6 +++--- src/plugins/platforms/drm/drm_object_connector.h | 2 +- src/plugins/platforms/drm/drm_object_crtc.cpp | 10 +++++----- src/plugins/platforms/drm/drm_object_crtc.h | 2 +- src/plugins/platforms/drm/drm_object_plane.cpp | 4 ++-- src/plugins/platforms/drm/drm_object_plane.h | 2 +- 9 files changed, 23 insertions(+), 17 deletions(-) diff --git a/src/plugins/platforms/drm/drm_gpu.cpp b/src/plugins/platforms/drm/drm_gpu.cpp index a5fe5d50ee..d835f32dd7 100644 --- a/src/plugins/platforms/drm/drm_gpu.cpp +++ b/src/plugins/platforms/drm/drm_gpu.cpp @@ -36,7 +36,13 @@ namespace KWin { -DrmGpu::DrmGpu(DrmBackend *backend, QByteArray devNode, int fd, int drmId) : m_backend(backend), m_devNode(devNode), m_fd(fd), m_drmId(drmId), m_atomicModeSetting(false), m_gbmDevice(nullptr) +DrmGpu::DrmGpu(DrmBackend *backend, QByteArray devNode, int fd, int drmId) + : m_backend(backend) + , m_devNode(devNode) + , m_fd(fd) + , m_drmId(drmId) + , m_atomicModeSetting(false) + , m_gbmDevice(nullptr) { uint64_t capability = 0; diff --git a/src/plugins/platforms/drm/drm_object.cpp b/src/plugins/platforms/drm/drm_object.cpp index ce1837fccc..675c9f04f0 100644 --- a/src/plugins/platforms/drm/drm_object.cpp +++ b/src/plugins/platforms/drm/drm_object.cpp @@ -19,9 +19,9 @@ namespace KWin * Definitions for class DrmObject */ -DrmObject::DrmObject(DrmGpu *gpu, uint32_t object_id) +DrmObject::DrmObject(DrmGpu *gpu, uint32_t objectId) : m_gpu(gpu) - , m_id(object_id) + , m_id(objectId) { } diff --git a/src/plugins/platforms/drm/drm_object.h b/src/plugins/platforms/drm/drm_object.h index 3924368494..d02048a2f5 100644 --- a/src/plugins/platforms/drm/drm_object.h +++ b/src/plugins/platforms/drm/drm_object.h @@ -31,7 +31,7 @@ public: * @param object_id provided by the kernel * @param fd of the DRM device */ - DrmObject(DrmGpu *gpu, uint32_t object_id); + DrmObject(DrmGpu *gpu, uint32_t objectId); virtual ~DrmObject(); /** diff --git a/src/plugins/platforms/drm/drm_object_connector.cpp b/src/plugins/platforms/drm/drm_object_connector.cpp index ff816a7eae..6de4538cd6 100644 --- a/src/plugins/platforms/drm/drm_object_connector.cpp +++ b/src/plugins/platforms/drm/drm_object_connector.cpp @@ -18,9 +18,9 @@ namespace KWin { -DrmConnector::DrmConnector(DrmGpu *gpu, uint32_t connector_id) - : DrmObject(gpu, connector_id) - , m_conn(drmModeGetConnector(gpu->fd(), connector_id)) +DrmConnector::DrmConnector(DrmGpu *gpu, uint32_t connectorId) + : DrmObject(gpu, connectorId) + , m_conn(drmModeGetConnector(gpu->fd(), connectorId)) { for (int i = 0; i < m_conn->count_encoders; ++i) { m_encoders << m_conn->encoders[i]; diff --git a/src/plugins/platforms/drm/drm_object_connector.h b/src/plugins/platforms/drm/drm_object_connector.h index 41752eb9dc..4dbec891a6 100644 --- a/src/plugins/platforms/drm/drm_object_connector.h +++ b/src/plugins/platforms/drm/drm_object_connector.h @@ -20,7 +20,7 @@ namespace KWin class DrmConnector : public DrmObject { public: - DrmConnector(DrmGpu *gpu, uint32_t connector_id); + DrmConnector(DrmGpu *gpu, uint32_t connectorId); ~DrmConnector() override; bool init() override; diff --git a/src/plugins/platforms/drm/drm_object_crtc.cpp b/src/plugins/platforms/drm/drm_object_crtc.cpp index dfb574a4ed..6f06609800 100644 --- a/src/plugins/platforms/drm/drm_object_crtc.cpp +++ b/src/plugins/platforms/drm/drm_object_crtc.cpp @@ -17,11 +17,11 @@ namespace KWin { -DrmCrtc::DrmCrtc(DrmGpu *gpu, uint32_t crtc_id, DrmBackend *backend, int resIndex) - : DrmObject(gpu, crtc_id), - m_crtc(drmModeGetCrtc(gpu->fd(), crtc_id)), - m_resIndex(resIndex), - m_backend(backend) +DrmCrtc::DrmCrtc(DrmGpu *gpu, uint32_t crtcId, DrmBackend *backend, int resIndex) + : DrmObject(gpu, crtc_id) + , m_crtc(drmModeGetCrtc(gpu->fd(), crtcId)) + , m_resIndex(resIndex) + , m_backend(backend) { } diff --git a/src/plugins/platforms/drm/drm_object_crtc.h b/src/plugins/platforms/drm/drm_object_crtc.h index 5abc24ee15..00811d9a5d 100644 --- a/src/plugins/platforms/drm/drm_object_crtc.h +++ b/src/plugins/platforms/drm/drm_object_crtc.h @@ -25,7 +25,7 @@ class DrmGpu; class DrmCrtc : public DrmObject { public: - DrmCrtc(DrmGpu *gpu, uint32_t crtc_id, DrmBackend *backend, int resIndex); + DrmCrtc(DrmGpu *gpu, uint32_t crtcId, DrmBackend *backend, int resIndex); bool init() override; diff --git a/src/plugins/platforms/drm/drm_object_plane.cpp b/src/plugins/platforms/drm/drm_object_plane.cpp index 9f9413d437..7916c9e53d 100644 --- a/src/plugins/platforms/drm/drm_object_plane.cpp +++ b/src/plugins/platforms/drm/drm_object_plane.cpp @@ -15,8 +15,8 @@ namespace KWin { -DrmPlane::DrmPlane(DrmGpu *gpu, uint32_t plane_id) - : DrmObject(gpu, plane_id) +DrmPlane::DrmPlane(DrmGpu *gpu, uint32_t planeId) + : DrmObject(gpu, planeId) { } diff --git a/src/plugins/platforms/drm/drm_object_plane.h b/src/plugins/platforms/drm/drm_object_plane.h index 71850168d7..73fa7fa7da 100644 --- a/src/plugins/platforms/drm/drm_object_plane.h +++ b/src/plugins/platforms/drm/drm_object_plane.h @@ -23,7 +23,7 @@ class DrmPlane : public DrmObject { Q_GADGET public: - DrmPlane(DrmGpu *gpu, uint32_t plane_id); + DrmPlane(DrmGpu *gpu, uint32_t planeId); enum class PropertyIndex : uint32_t { Type = 0,