drm/i915: relocate intel_plane_ggtt_offset() to intel_atomic_plane.c

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
This commit is contained in:
Jani Nikula 2025-02-24 18:00:48 +02:00
parent fe7fad476e
commit 7c04b6c7e9
16 changed files with 30 additions and 7 deletions

View 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"

View 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);
}

View 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__ */

View 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"

View 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)
{

View 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"

View 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"

View 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"

View 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"

View File

@ -43,8 +43,10 @@
#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"

View 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"

View File

@ -4,6 +4,7 @@
*/
#include <drm/drm_fixed.h>
#include <drm/drm_print.h>
#include "intel_atomic.h"
#include "intel_crtc.h"

View 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"

View 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"

View 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"

View 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"