]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/i915: extract intel_combo_phy.h from i915_drv.h
authorJani Nikula <jani.nikula@intel.com>
Mon, 29 Apr 2019 12:29:38 +0000 (15:29 +0300)
committerJani Nikula <jani.nikula@intel.com>
Tue, 30 Apr 2019 12:05:07 +0000 (15:05 +0300)
It used to be handy that we only had a couple of headers, but over time
i915_drv.h has become unwieldy. Extract declarations to a separate
header file corresponding to the implementation module, clarifying the
modularity of the driver.

Ensure the new header is self-contained, and do so with minimal further
includes, using forward declarations as needed. Include the new header
only where needed, and sort the modified include directives while at it
and as needed.

No functional changes.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/6aea17072684dec0b04b6831c0c0e5a134edf87e.1556540890.git.jani.nikula@intel.com
drivers/gpu/drm/i915/Makefile.header-test
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_combo_phy.c
drivers/gpu/drm/i915/intel_combo_phy.h [new file with mode: 0644]
drivers/gpu/drm/i915/intel_runtime_pm.c

index bff153be3d043eb120f6c85843d64900ed9cbfcb..95e4ee821d6033a3bdb2c94ac87fc2bfb44bb70f 100644 (file)
@@ -19,6 +19,7 @@ header_test := \
        intel_bios.h \
        intel_cdclk.h \
        intel_color.h \
+       intel_combo_phy.h \
        intel_connector.h \
        intel_crt.h \
        intel_csr.h \
index 16b2ce746c251bbcec638fe89aac407bda6fd074..886a30243fe3b516b8ee197d1d1c8364fc9607e3 100644 (file)
@@ -3364,12 +3364,6 @@ void vlv_phy_pre_encoder_enable(struct intel_encoder *encoder,
 void vlv_phy_reset_lanes(struct intel_encoder *encoder,
                         const struct intel_crtc_state *old_crtc_state);
 
-/* intel_combo_phy.c */
-void icl_combo_phys_init(struct drm_i915_private *dev_priv);
-void icl_combo_phys_uninit(struct drm_i915_private *dev_priv);
-void cnl_combo_phys_init(struct drm_i915_private *dev_priv);
-void cnl_combo_phys_uninit(struct drm_i915_private *dev_priv);
-
 #define __I915_REG_OP(op__, dev_priv__, ...) \
        intel_uncore_##op__(&(dev_priv__)->uncore, __VA_ARGS__)
 
index 2bf4359d7e41d9cbc9cdc21edae2106ab267e2fb..5c7eb6cf3ccefae6798339559c71800a8d8c5842 100644 (file)
@@ -3,6 +3,7 @@
  * Copyright © 2018 Intel Corporation
  */
 
+#include "intel_combo_phy.h"
 #include "intel_drv.h"
 
 #define for_each_combo_port(__dev_priv, __port) \
diff --git a/drivers/gpu/drm/i915/intel_combo_phy.h b/drivers/gpu/drm/i915/intel_combo_phy.h
new file mode 100644 (file)
index 0000000..f7f1e5a
--- /dev/null
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#ifndef __INTEL_COMBO_PHY_H__
+#define __INTEL_COMBO_PHY_H__
+
+struct drm_i915_private;
+
+void icl_combo_phys_init(struct drm_i915_private *dev_priv);
+void icl_combo_phys_uninit(struct drm_i915_private *dev_priv);
+void cnl_combo_phys_init(struct drm_i915_private *dev_priv);
+void cnl_combo_phys_uninit(struct drm_i915_private *dev_priv);
+
+#endif /* __INTEL_COMBO_PHY_H__ */
index 379c1dc8799f1f1c190ec994d6462f7f5fa7594e..30e7cb9d5801c1858d359d8ba1c2c24a897b0292 100644 (file)
@@ -34,6 +34,7 @@
 #include "i915_drv.h"
 #include "i915_irq.h"
 #include "intel_cdclk.h"
+#include "intel_combo_phy.h"
 #include "intel_crt.h"
 #include "intel_csr.h"
 #include "intel_dp.h"