drm/i915: relocate intel_plane_ggtt_offset() to intel_atomic_plane.c
authorJani Nikula <jani.nikula@intel.com>
Mon, 24 Feb 2025 16:00:48 +0000 (18:00 +0200)
committerJani Nikula <jani.nikula@intel.com>
Mon, 3 Mar 2025 11:44:42 +0000 (13:44 +0200)
With the primary goal of removing #include "i915_vma.h" from
intel_display_types.h, move intel_plane_ggtt_offset() to a proper
function in intel_atomic_plane.c. This reveals tons of implicit
dependencies all over the place that we pulled in via i915_vma.h. Fix
the fallout.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/70ac6d19518f355abf37ac8c4b0f1d18878be28c.1740412806.git.jani.nikula@intel.com
16 files changed:
drivers/gpu/drm/i915/display/intel_acpi.c
drivers/gpu/drm/i915/display/intel_atomic_plane.c
drivers/gpu/drm/i915/display/intel_atomic_plane.h
drivers/gpu/drm/i915/display/intel_display_power_map.c
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
drivers/gpu/drm/i915/display/intel_dp_link_training.c
drivers/gpu/drm/i915/display/intel_dp_test.c
drivers/gpu/drm/i915/display/intel_dp_tunnel.c
drivers/gpu/drm/i915/display/intel_fbdev.c
drivers/gpu/drm/i915/display/intel_frontbuffer.c
drivers/gpu/drm/i915/display/intel_link_bw.c
drivers/gpu/drm/i915/display/intel_panel.c
drivers/gpu/drm/i915/display/intel_pfit.c
drivers/gpu/drm/i915/display/intel_quirks.c
drivers/gpu/drm/xe/display/xe_fb_pin.c

index bbf8c5a8fdbdd17900137145dadf884c103fe8f9..1addd6288241372c035a9aebfb55f47c764aef47 100644 (file)
@@ -9,6 +9,8 @@
 #include <linux/acpi.h>
 #include <acpi/video.h>
 
+#include <drm/drm_print.h>
+
 #include "i915_utils.h"
 #include "intel_acpi.h"
 #include "intel_display_core.h"
index 05dcfa3bea7303cc1db86c2b1889a87d6fc3bb32..4a3a7125152ff8201dc2fb001dca57e72be7a4bc 100644 (file)
@@ -40,8 +40,9 @@
 #include <drm/drm_gem.h>
 #include <drm/drm_gem_atomic_helper.h>
 
-#include "i915_drv.h"
 #include "i915_config.h"
+#include "i915_drv.h"
+#include "i915_vma.h"
 #include "i9xx_plane_regs.h"
 #include "intel_atomic_plane.h"
 #include "intel_cdclk.h"
@@ -1532,3 +1533,8 @@ int intel_atomic_check_planes(struct intel_atomic_state *state)
 
        return 0;
 }
+
+u32 intel_plane_ggtt_offset(const struct intel_plane_state *plane_state)
+{
+       return i915_ggtt_offset(plane_state->ggtt_vma);
+}
index 65edd88d28a9c532d6347fbd13b0f45698e9e5bb..6efac923dcbc757e6f68564cbef2919c920f13cb 100644 (file)
@@ -88,4 +88,6 @@ int intel_atomic_add_affected_planes(struct intel_atomic_state *state,
                                     struct intel_crtc *crtc);
 int intel_atomic_check_planes(struct intel_atomic_state *state);
 
+u32 intel_plane_ggtt_offset(const struct intel_plane_state *plane_state);
+
 #endif /* __INTEL_ATOMIC_PLANE_H__ */
index 0c8ac1af6db7e005b9bf5b33d1c2e4cebbde2524..e80e1fd611ca169e4e72e672173658fab9800ac5 100644 (file)
@@ -3,6 +3,8 @@
  * Copyright © 2022 Intel Corporation
  */
 
+#include <drm/drm_print.h>
+
 #include "i915_reg.h"
 #include "intel_display_core.h"
 #include "intel_display_power_map.h"
index 053be62a5be13d84fecf07250da8aeffd1938298..259cc20c5233908d6a8b4c9000bd04ec103b4e47 100644 (file)
@@ -40,8 +40,8 @@
 #include <drm/drm_rect.h>
 #include <drm/drm_vblank_work.h>
 #include <drm/intel/i915_hdcp_interface.h>
+#include <uapi/drm/i915_drm.h>
 
-#include "i915_vma.h"
 #include "i915_vma_types.h"
 #include "intel_bios.h"
 #include "intel_display.h"
@@ -2104,11 +2104,6 @@ intel_crtc_needs_color_update(const struct intel_crtc_state *crtc_state)
                intel_crtc_needs_modeset(crtc_state);
 }
 
-static inline u32 intel_plane_ggtt_offset(const struct intel_plane_state *plane_state)
-{
-       return i915_ggtt_offset(plane_state->ggtt_vma);
-}
-
 static inline struct intel_frontbuffer *
 to_intel_frontbuffer(struct drm_framebuffer *fb)
 {
index f53c8355d5bea5515e177e9ce2b508a1f98424e3..8173de8aec6335ae07fbb13379b595c779a3ef89 100644 (file)
@@ -34,6 +34,8 @@
  * for some reason.
  */
 
+#include <drm/drm_print.h>
+
 #include "i915_utils.h"
 #include "intel_backlight.h"
 #include "intel_display_core.h"
index 11953b03bb6aa2388e90d2caf5f02424db1895b8..581f1dab618eb4bfb9eabf463cdb96653288cca5 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/debugfs.h>
 
 #include <drm/display/drm_dp_helper.h>
+#include <drm/drm_print.h>
 
 #include "i915_utils.h"
 #include "intel_display_core.h"
index 614b90d6938f1bddaa4f4048aad11e1b8250fd01..bd61f3c3ec91175387a31712d90460390c22ce44 100644 (file)
@@ -6,6 +6,8 @@
 #include <drm/display/drm_dp.h>
 #include <drm/display/drm_dp_helper.h>
 #include <drm/drm_edid.h>
+#include <drm/drm_file.h>
+#include <drm/drm_print.h>
 #include <drm/drm_probe_helper.h>
 
 #include "i915_reg.h"
index 280f302967e3713b885d3794cf3d0e995c416e6f..faa2b7a46699d31127116ffdbd87766c0ae4cae9 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <drm/display/drm_dp_tunnel.h>
+#include <drm/drm_print.h>
 
 #include "intel_atomic.h"
 #include "intel_display_core.h"
index 301b5fd301a23d1894de7fcbcad3789bcd01b2b6..64fbd2461df37ce9b43602d0f8d4def797a8d42d 100644 (file)
 #include <drm/drm_fourcc.h>
 #include <drm/drm_gem.h>
 #include <drm/drm_gem_framebuffer_helper.h>
+#include <drm/drm_print.h>
 
 #include "i915_drv.h"
+#include "i915_vma.h"
 #include "intel_bo.h"
 #include "intel_display_types.h"
 #include "intel_fb.h"
index f023f5a4dba64e5455b3dc0176c4e5c60c36155c..ba2f88ca61173e8a68f3f9ce6d5b84d5ea500af7 100644 (file)
@@ -59,6 +59,7 @@
 
 #include "i915_active.h"
 #include "i915_drv.h"
+#include "i915_vma.h"
 #include "intel_bo.h"
 #include "intel_display_trace.h"
 #include "intel_display_types.h"
index f4d60e77aa18af993739e12d8846c2eeef640baf..a10cd399260750a9b95f00a0365678b0c195f787 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <drm/drm_fixed.h>
+#include <drm/drm_print.h>
 
 #include "intel_atomic.h"
 #include "intel_crtc.h"
index 4e6c5592c7ae2ec3ff346449d4cc61de2cb4c7f4..f5c972880391636abbbcd050c00b438143a5e4d3 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/pwm.h>
 
 #include <drm/drm_edid.h>
+#include <drm/drm_print.h>
 
 #include "intel_backlight.h"
 #include "intel_connector.h"
index 6fc58fbee2f94a906384f0434985081c7f40f35a..3c3ecf2885707573f3025623259c76a126c5d128 100644 (file)
@@ -3,6 +3,8 @@
  * Copyright © 2024 Intel Corporation
  */
 
+#include <drm/drm_print.h>
+
 #include "i915_reg.h"
 #include "i915_utils.h"
 #include "intel_de.h"
index 8b30e9fd936e72087ce902c58884fce83622f9f8..a32fae510ed27d75d50f0429d111ccc122e301d3 100644 (file)
@@ -5,6 +5,8 @@
 
 #include <linux/dmi.h>
 
+#include <drm/drm_print.h>
+
 #include "intel_display_core.h"
 #include "intel_display_types.h"
 #include "intel_quirks.h"
index 11a6b996d739be5bf63ad981d8e1be6c16136bf3..b69896baa20c3bbaaec16e8b6c17255ec5413a9f 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <drm/ttm/ttm_bo.h>
 
+#include "i915_vma.h"
 #include "intel_display_types.h"
 #include "intel_dpt.h"
 #include "intel_fb.h"