From: Thomas Zimmermann <tzimmermann@suse.de>
To: mripard@kernel.org, maarten.lankhorst@linux.intel.com,
airlied@linux.ie, daniel@ffwll.ch, jani.nikula@linux.intel.com
Cc: linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org,
Thomas Zimmermann <tzimmermann@suse.de>,
nouveau@lists.freedesktop.org, linux-tegra@vger.kernel.org,
freedreno@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org
Subject: [Intel-gfx] [PATCH v2 2/5] drm/dp: Move DP declarations into separate header file
Date: Wed, 15 Dec 2021 11:43:14 +0100 [thread overview]
Message-ID: <20211215104318.18866-3-tzimmermann@suse.de> (raw)
In-Reply-To: <20211215104318.18866-1-tzimmermann@suse.de>
Split the DP declarations from other helpers before moving the
DP functions into a separate module.
v2:
* forward-declare struct drm_dp_aux (Jani)
* add include guards in drm_dp_helper_internal.h
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/drm_crtc_helper_internal.h | 27 ------------------
drivers/gpu/drm/drm_dp_aux_dev.c | 2 +-
drivers/gpu/drm/drm_dp_helper.c | 2 +-
drivers/gpu/drm/drm_dp_helper_internal.h | 33 ++++++++++++++++++++++
drivers/gpu/drm/drm_dp_mst_topology.c | 2 +-
drivers/gpu/drm/drm_kms_helper_common.c | 1 +
6 files changed, 37 insertions(+), 30 deletions(-)
create mode 100644 drivers/gpu/drm/drm_dp_helper_internal.h
diff --git a/drivers/gpu/drm/drm_crtc_helper_internal.h b/drivers/gpu/drm/drm_crtc_helper_internal.h
index 61e09f8a8d0f..28e04e750130 100644
--- a/drivers/gpu/drm/drm_crtc_helper_internal.h
+++ b/drivers/gpu/drm/drm_crtc_helper_internal.h
@@ -28,36 +28,9 @@
#include <drm/drm_connector.h>
#include <drm/drm_crtc.h>
-#include <drm/drm_dp_helper.h>
#include <drm/drm_encoder.h>
#include <drm/drm_modes.h>
-/* drm_dp_aux_dev.c */
-#ifdef CONFIG_DRM_DP_AUX_CHARDEV
-int drm_dp_aux_dev_init(void);
-void drm_dp_aux_dev_exit(void);
-int drm_dp_aux_register_devnode(struct drm_dp_aux *aux);
-void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux);
-#else
-static inline int drm_dp_aux_dev_init(void)
-{
- return 0;
-}
-
-static inline void drm_dp_aux_dev_exit(void)
-{
-}
-
-static inline int drm_dp_aux_register_devnode(struct drm_dp_aux *aux)
-{
- return 0;
-}
-
-static inline void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux)
-{
-}
-#endif
-
/* drm_probe_helper.c */
enum drm_mode_status drm_crtc_mode_valid(struct drm_crtc *crtc,
const struct drm_display_mode *mode);
diff --git a/drivers/gpu/drm/drm_dp_aux_dev.c b/drivers/gpu/drm/drm_dp_aux_dev.c
index 06b374cae956..0618dfe16660 100644
--- a/drivers/gpu/drm/drm_dp_aux_dev.c
+++ b/drivers/gpu/drm/drm_dp_aux_dev.c
@@ -40,7 +40,7 @@
#include <drm/drm_dp_mst_helper.h>
#include <drm/drm_print.h>
-#include "drm_crtc_helper_internal.h"
+#include "drm_dp_helper_internal.h"
struct drm_dp_aux_dev {
unsigned index;
diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index 23f9073bc473..e995a0262ed7 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -35,7 +35,7 @@
#include <drm/drm_dp_mst_helper.h>
#include <drm/drm_panel.h>
-#include "drm_crtc_helper_internal.h"
+#include "drm_dp_helper_internal.h"
struct dp_aux_backlight {
struct backlight_device *base;
diff --git a/drivers/gpu/drm/drm_dp_helper_internal.h b/drivers/gpu/drm/drm_dp_helper_internal.h
new file mode 100644
index 000000000000..8917fc3af9ec
--- /dev/null
+++ b/drivers/gpu/drm/drm_dp_helper_internal.h
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: MIT */
+
+#ifndef DRM_DP_HELPER_INTERNAL_H
+#define DRM_DP_HELPER_INTERNAL_H
+
+struct drm_dp_aux;
+
+#ifdef CONFIG_DRM_DP_AUX_CHARDEV
+int drm_dp_aux_dev_init(void);
+void drm_dp_aux_dev_exit(void);
+int drm_dp_aux_register_devnode(struct drm_dp_aux *aux);
+void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux);
+#else
+static inline int drm_dp_aux_dev_init(void)
+{
+ return 0;
+}
+
+static inline void drm_dp_aux_dev_exit(void)
+{
+}
+
+static inline int drm_dp_aux_register_devnode(struct drm_dp_aux *aux)
+{
+ return 0;
+}
+
+static inline void drm_dp_aux_unregister_devnode(struct drm_dp_aux *aux)
+{
+}
+#endif
+
+#endif
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index 7f0ff96261cf..9f7b0b606924 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -45,7 +45,7 @@
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
-#include "drm_crtc_helper_internal.h"
+#include "drm_dp_helper_internal.h"
#include "drm_dp_mst_topology_internal.h"
/**
diff --git a/drivers/gpu/drm/drm_kms_helper_common.c b/drivers/gpu/drm/drm_kms_helper_common.c
index 47e92400548d..88260d26409c 100644
--- a/drivers/gpu/drm/drm_kms_helper_common.c
+++ b/drivers/gpu/drm/drm_kms_helper_common.c
@@ -29,6 +29,7 @@
#include <drm/drm_print.h>
+#include "drm_dp_helper_internal.h"
#include "drm_crtc_helper_internal.h"
MODULE_AUTHOR("David Airlie, Jesse Barnes");
--
2.34.1
next prev parent reply other threads:[~2021-12-15 10:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 10:43 [Intel-gfx] [PATCH v2 0/5] drm/dp: Move DisplayPort helpers into own module Thomas Zimmermann
2021-12-15 10:43 ` [Intel-gfx] [PATCH v2 1/5] drm/dp_mst: Remove trailing whitespace Thomas Zimmermann
2021-12-15 10:43 ` Thomas Zimmermann [this message]
2021-12-15 10:43 ` [Intel-gfx] [PATCH v2 3/5] drm/dp: Move DisplayPort helpers into separate helper module Thomas Zimmermann
2021-12-15 11:04 ` Jani Nikula
2021-12-15 11:12 ` Thomas Zimmermann
2022-01-11 10:21 ` Javier Martinez Canillas
2022-01-08 23:56 ` Michał Mirosław
2022-01-11 18:58 ` [Intel-gfx] [Nouveau] " Lyude Paul
2021-12-15 10:43 ` [Intel-gfx] [PATCH v2 4/5] drm/dp: Move public DisplayPort headers into dp/ Thomas Zimmermann
2021-12-15 10:43 ` [Intel-gfx] [PATCH v2 5/5] drm/dp: Move DisplayPort AUX bus helpers " Thomas Zimmermann
2021-12-15 12:05 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/dp: Move DisplayPort helpers into own module (rev2) Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211215104318.18866-3-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-tegra@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox