]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915: reduce intel_wakeref.h dependencies
authorJani Nikula <jani.nikula@intel.com>
Wed, 26 Mar 2025 11:54:52 +0000 (13:54 +0200)
committerJani Nikula <jani.nikula@intel.com>
Tue, 1 Apr 2025 08:48:18 +0000 (11:48 +0300)
Forward declare struct drm_printer instead of including drm/drm_print.h,
as we only need the pointer. Turns out quite a few places depend on this
include implicitly. Make them explicit.

Some of the includes are just stale and unnecessary. Group the forward
declarations together while at it.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250326115452.2090275-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
20 files changed:
drivers/gpu/drm/i915/display/dvo_ch7017.c
drivers/gpu/drm/i915/display/dvo_ch7xxx.c
drivers/gpu/drm/i915/display/dvo_ivch.c
drivers/gpu/drm/i915/display/dvo_ns2501.c
drivers/gpu/drm/i915/display/dvo_sil164.c
drivers/gpu/drm/i915/display/dvo_tfp410.c
drivers/gpu/drm/i915/display/icl_dsi.c
drivers/gpu/drm/i915/display/intel_color.c
drivers/gpu/drm/i915/display/intel_combo_phy.c
drivers/gpu/drm/i915/display/intel_dkl_phy.c
drivers/gpu/drm/i915/display/intel_dvo.c
drivers/gpu/drm/i915/display/intel_hti.c
drivers/gpu/drm/i915/display/intel_load_detect.c
drivers/gpu/drm/i915/display/intel_lspcon.c
drivers/gpu/drm/i915/display/intel_pmdemand.c
drivers/gpu/drm/i915/display/intel_snps_phy.c
drivers/gpu/drm/i915/display/intel_tc.c
drivers/gpu/drm/i915/display/intel_vdsc.c
drivers/gpu/drm/i915/display/intel_vrr.c
drivers/gpu/drm/i915/intel_wakeref.h

index 206818f9ad49e6a6876d4e179f34ce7d8369fd06..f10c0fb8d2c89c10e86cef4421e4a0014f984c05 100644 (file)
@@ -25,6 +25,8 @@
  *
  */
 
+#include <drm/drm_print.h>
+
 #include "intel_display_types.h"
 #include "intel_dvo_dev.h"
 
index 10ab3cc73e586492aa7bc0d767d7fcd57f72db25..49f02aca818bb8f6a55712661e43c11f173ab519 100644 (file)
@@ -26,6 +26,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 **************************************************************************/
 
+#include <drm/drm_print.h>
+
 #include "intel_display_types.h"
 #include "intel_dvo_dev.h"
 
index d9c3152d4338fbf3ba97ac69c3bd11a285c10c4e..0713b27094124b4bd9eea58b949589003bce4565 100644 (file)
@@ -29,6 +29,8 @@
  *
  */
 
+#include <drm/drm_print.h>
+
 #include "intel_display_types.h"
 #include "intel_dvo_dev.h"
 
index 92d32d6b5bceba6f12a003e1397c5d92e0999dae..80b71bd6a83719777f0a1230f1e161ad86ad0c4d 100644 (file)
@@ -26,6 +26,8 @@
  *
  */
 
+#include <drm/drm_print.h>
+
 #include "intel_display_types.h"
 #include "intel_dvo_dev.h"
 
index b42c717085f316a1e887340a36b5bd6090099789..017b617a8069e0f8a7bf1f098200b0f40052ca37 100644 (file)
@@ -26,6 +26,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 **************************************************************************/
 
+#include <drm/drm_print.h>
+
 #include "intel_display_types.h"
 #include "intel_dvo_dev.h"
 
index 280699438526790b76f0bbf7a5d73aa109546558..ed560e3438db989cb3bab81506e06e7672a93123 100644 (file)
@@ -25,6 +25,8 @@
  *
  */
 
+#include <drm/drm_print.h>
+
 #include "intel_display_types.h"
 #include "intel_dvo_dev.h"
 
index ef9a9d780bfc2d728850c1f7d725267cac06b7ee..b69c713fb79a9b3b2f1aa0fb3b6eadbd0fc1e911 100644 (file)
@@ -29,6 +29,7 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_fixed.h>
 #include <drm/drm_mipi_dsi.h>
+#include <drm/drm_print.h>
 #include <drm/drm_probe_helper.h>
 
 #include "i915_reg.h"
index bbf6df7ebb955fdebdb446f7996b0ca9cc5a256a..98dddf72c0eb9749d5b3c4a90edb73216615bbfd 100644 (file)
@@ -22,6 +22,8 @@
  *
  */
 
+#include <drm/drm_print.h>
+
 #include "i915_utils.h"
 #include "i9xx_plane_regs.h"
 #include "intel_color.h"
index 17eea244cc833fd8c834dd4a5bb48490cc835e86..f5cc38dbe5590730029708dd79d6c7ff8113e7cc 100644 (file)
@@ -3,6 +3,8 @@
  * Copyright © 2018 Intel Corporation
  */
 
+#include <drm/drm_print.h>
+
 #include "i915_reg.h"
 #include "i915_utils.h"
 #include "intel_combo_phy.h"
index 0813fb9b5823ff6e28947c1b92c4668b9cba53c6..dad7192132ad9259f2600f9ea9ea3139b2e03d68 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <drm/drm_device.h>
+#include <drm/drm_print.h>
 
 #include "intel_de.h"
 #include "intel_display.h"
index 602e76ddf788132154c020ea45a57c37d7a282c5..b61520353c926a715c31a16bb9bfdd907521bd6d 100644 (file)
@@ -31,6 +31,7 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_edid.h>
+#include <drm/drm_print.h>
 #include <drm/drm_probe_helper.h>
 
 #include "i915_reg.h"
index fb6b84f6a81dd42e520529b23b33978a102c40d6..dc454420c134e679b4bc7d1c030997f61d2dd5fa 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <drm/drm_device.h>
+#include <drm/drm_print.h>
 
 #include "intel_de.h"
 #include "intel_display.h"
index 86cc03a4413c2de584349d8fc844dce3fabd17e9..aad52d0d83e1ef3bb7f32103a838437ca56028a4 100644 (file)
@@ -6,6 +6,7 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_atomic_uapi.h>
+#include <drm/drm_print.h>
 
 #include "intel_atomic.h"
 #include "intel_crtc.h"
index 63c1afa30b05d8c0018aa99d3477d05bab51e62c..f94b7eeae20f581d1e331e74150f1bb04af19a71 100644 (file)
@@ -27,6 +27,7 @@
 #include <drm/display/drm_hdmi_helper.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_edid.h>
+#include <drm/drm_print.h>
 
 #include "i915_reg.h"
 #include "i915_utils.h"
index 63301a01906cc75b17c9bf2f41b274c356aa2706..d22b5469672d87b27ac97d722f0883aab0a22f4c 100644 (file)
@@ -5,6 +5,8 @@
 
 #include <linux/bitops.h>
 
+#include <drm/drm_print.h>
+
 #include "i915_reg.h"
 #include "i915_utils.h"
 #include "intel_atomic.h"
index b9acd9fe160cde7de682b48648eb183a0549b014..2b53ac9f493582f49b6ecaf655126ea6b79b029f 100644 (file)
@@ -5,6 +5,8 @@
 
 #include <linux/math.h>
 
+#include <drm/drm_print.h>
+
 #include "i915_reg.h"
 #include "i915_utils.h"
 #include "intel_ddi.h"
index 426a3c8529a395d05ca7fdfb045b5d01f1f833ec..2c6c18434a4ca777acecdf298b3751b147857748 100644 (file)
@@ -3,6 +3,8 @@
  * Copyright © 2019 Intel Corporation
  */
 
+#include <drm/drm_print.h>
+
 #include "i915_reg.h"
 #include "i915_utils.h"
 #include "intel_atomic.h"
index 470c170897e5f415782cbab78773e98df2cf540a..8e799e225af17054760447599d387f6ed4ef1468 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <drm/display/drm_dsc_helper.h>
 #include <drm/drm_fixed.h>
+#include <drm/drm_print.h>
 
 #include "i915_utils.h"
 #include "intel_crtc.h"
index 7359d66fc091aff27ce3df99b6b6ea6c933c52b0..633a66f6b73be366cb7c26de936899bbcd85a2af 100644 (file)
@@ -4,6 +4,8 @@
  *
  */
 
+#include <drm/drm_print.h>
+
 #include "i915_reg.h"
 #include "intel_de.h"
 #include "intel_display_types.h"
index 48836ef52d40474239f8c5cb185fa0223f84d538..a2894a56e18fc3cf22613a670befc7481746bb8a 100644 (file)
@@ -7,8 +7,6 @@
 #ifndef INTEL_WAKEREF_H
 #define INTEL_WAKEREF_H
 
-#include <drm/drm_print.h>
-
 #include <linux/atomic.h>
 #include <linux/bitfield.h>
 #include <linux/bits.h>
 #include <linux/mutex.h>
 #include <linux/refcount.h>
 #include <linux/ref_tracker.h>
-#include <linux/slab.h>
-#include <linux/stackdepot.h>
 #include <linux/timer.h>
 #include <linux/workqueue.h>
 
+struct drm_printer;
+struct intel_runtime_pm;
+struct intel_wakeref;
+
 typedef struct ref_tracker *intel_wakeref_t;
 
 #define INTEL_REFTRACK_DEAD_COUNT 16
@@ -32,9 +32,6 @@ typedef struct ref_tracker *intel_wakeref_t;
 #define INTEL_WAKEREF_BUG_ON(expr) BUILD_BUG_ON_INVALID(expr)
 #endif
 
-struct intel_runtime_pm;
-struct intel_wakeref;
-
 struct intel_wakeref_ops {
        int (*get)(struct intel_wakeref *wf);
        int (*put)(struct intel_wakeref *wf);