Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+30 -7
+2
drivers/gpu/drm/i915/display/intel_acpi.c
··· 9 9 #include <linux/acpi.h> 10 10 #include <acpi/video.h> 11 11 12 + #include <drm/drm_print.h> 13 + 12 14 #include "i915_utils.h" 13 15 #include "intel_acpi.h" 14 16 #include "intel_display_core.h"
+7 -1
drivers/gpu/drm/i915/display/intel_atomic_plane.c
··· 40 40 #include <drm/drm_gem.h> 41 41 #include <drm/drm_gem_atomic_helper.h> 42 42 43 - #include "i915_drv.h" 44 43 #include "i915_config.h" 44 + #include "i915_drv.h" 45 + #include "i915_vma.h" 45 46 #include "i9xx_plane_regs.h" 46 47 #include "intel_atomic_plane.h" 47 48 #include "intel_cdclk.h" ··· 1532 1531 } 1533 1532 1534 1533 return 0; 1534 + } 1535 + 1536 + u32 intel_plane_ggtt_offset(const struct intel_plane_state *plane_state) 1537 + { 1538 + return i915_ggtt_offset(plane_state->ggtt_vma); 1535 1539 }
+2
drivers/gpu/drm/i915/display/intel_atomic_plane.h
··· 88 88 struct intel_crtc *crtc); 89 89 int intel_atomic_check_planes(struct intel_atomic_state *state); 90 90 91 + u32 intel_plane_ggtt_offset(const struct intel_plane_state *plane_state); 92 + 91 93 #endif /* __INTEL_ATOMIC_PLANE_H__ */
+2
drivers/gpu/drm/i915/display/intel_display_power_map.c
··· 3 3 * Copyright © 2022 Intel Corporation 4 4 */ 5 5 6 + #include <drm/drm_print.h> 7 + 6 8 #include "i915_reg.h" 7 9 #include "intel_display_core.h" 8 10 #include "intel_display_power_map.h"
+1 -6
drivers/gpu/drm/i915/display/intel_display_types.h
··· 40 40 #include <drm/drm_rect.h> 41 41 #include <drm/drm_vblank_work.h> 42 42 #include <drm/intel/i915_hdcp_interface.h> 43 + #include <uapi/drm/i915_drm.h> 43 44 44 - #include "i915_vma.h" 45 45 #include "i915_vma_types.h" 46 46 #include "intel_bios.h" 47 47 #include "intel_display.h" ··· 2102 2102 return crtc_state->uapi.color_mgmt_changed || 2103 2103 intel_crtc_needs_fastset(crtc_state) || 2104 2104 intel_crtc_needs_modeset(crtc_state); 2105 - } 2106 - 2107 - static inline u32 intel_plane_ggtt_offset(const struct intel_plane_state *plane_state) 2108 - { 2109 - return i915_ggtt_offset(plane_state->ggtt_vma); 2110 2105 } 2111 2106 2112 2107 static inline struct intel_frontbuffer *
+2
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
··· 34 34 * for some reason. 35 35 */ 36 36 37 + #include <drm/drm_print.h> 38 + 37 39 #include "i915_utils.h" 38 40 #include "intel_backlight.h" 39 41 #include "intel_display_core.h"
+2
drivers/gpu/drm/i915/display/intel_dp_test.c
··· 6 6 #include <drm/display/drm_dp.h> 7 7 #include <drm/display/drm_dp_helper.h> 8 8 #include <drm/drm_edid.h> 9 + #include <drm/drm_file.h> 10 + #include <drm/drm_print.h> 9 11 #include <drm/drm_probe_helper.h> 10 12 11 13 #include "i915_reg.h"
+1
drivers/gpu/drm/i915/display/intel_dp_tunnel.c
··· 4 4 */ 5 5 6 6 #include <drm/display/drm_dp_tunnel.h> 7 + #include <drm/drm_print.h> 7 8 8 9 #include "intel_atomic.h" 9 10 #include "intel_display_core.h"
+2
drivers/gpu/drm/i915/display/intel_fbdev.c
··· 43 43 #include <drm/drm_fourcc.h> 44 44 #include <drm/drm_gem.h> 45 45 #include <drm/drm_gem_framebuffer_helper.h> 46 + #include <drm/drm_print.h> 46 47 47 48 #include "i915_drv.h" 49 + #include "i915_vma.h" 48 50 #include "intel_bo.h" 49 51 #include "intel_display_types.h" 50 52 #include "intel_fb.h"
+1
drivers/gpu/drm/i915/display/intel_frontbuffer.c
··· 59 59 60 60 #include "i915_active.h" 61 61 #include "i915_drv.h" 62 + #include "i915_vma.h" 62 63 #include "intel_bo.h" 63 64 #include "intel_display_trace.h" 64 65 #include "intel_display_types.h"
+1
drivers/gpu/drm/i915/display/intel_panel.c
··· 32 32 #include <linux/pwm.h> 33 33 34 34 #include <drm/drm_edid.h> 35 + #include <drm/drm_print.h> 35 36 36 37 #include "intel_backlight.h" 37 38 #include "intel_connector.h"
+2
drivers/gpu/drm/i915/display/intel_pfit.c
··· 3 3 * Copyright © 2024 Intel Corporation 4 4 */ 5 5 6 + #include <drm/drm_print.h> 7 + 6 8 #include "i915_reg.h" 7 9 #include "i915_utils.h" 8 10 #include "intel_de.h"
+2
drivers/gpu/drm/i915/display/intel_quirks.c
··· 5 5 6 6 #include <linux/dmi.h> 7 7 8 + #include <drm/drm_print.h> 9 + 8 10 #include "intel_display_core.h" 9 11 #include "intel_display_types.h" 10 12 #include "intel_quirks.h"
+1
drivers/gpu/drm/xe/display/xe_fb_pin.c
··· 5 5 6 6 #include <drm/ttm/ttm_bo.h> 7 7 8 + #include "i915_vma.h" 8 9 #include "intel_display_types.h" 9 10 #include "intel_dpt.h" 10 11 #include "intel_fb.h"