All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/i915: relocate intel_plane_ggtt_offset() to intel_atomic_plane.c
Date: Fri, 28 Feb 2025 11:58:24 -0500	[thread overview]
Message-ID: <Z8HrMIbWmP91xlsY@intel.com> (raw)
In-Reply-To: <70ac6d19518f355abf37ac8c4b0f1d18878be28c.1740412806.git.jani.nikula@intel.com>

On Mon, Feb 24, 2025 at 06:00:48PM +0200, Jani Nikula wrote:
> 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.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_acpi.c              | 2 ++
>  drivers/gpu/drm/i915/display/intel_atomic_plane.c      | 8 +++++++-
>  drivers/gpu/drm/i915/display/intel_atomic_plane.h      | 2 ++
>  drivers/gpu/drm/i915/display/intel_display_power_map.c | 2 ++
>  drivers/gpu/drm/i915/display/intel_display_types.h     | 7 +------
>  drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c  | 2 ++
>  drivers/gpu/drm/i915/display/intel_dp_link_training.c  | 1 +
>  drivers/gpu/drm/i915/display/intel_dp_test.c           | 2 ++
>  drivers/gpu/drm/i915/display/intel_dp_tunnel.c         | 1 +
>  drivers/gpu/drm/i915/display/intel_fbdev.c             | 2 ++
>  drivers/gpu/drm/i915/display/intel_frontbuffer.c       | 1 +
>  drivers/gpu/drm/i915/display/intel_link_bw.c           | 1 +
>  drivers/gpu/drm/i915/display/intel_panel.c             | 1 +
>  drivers/gpu/drm/i915/display/intel_pfit.c              | 2 ++
>  drivers/gpu/drm/i915/display/intel_quirks.c            | 2 ++
>  drivers/gpu/drm/xe/display/xe_fb_pin.c                 | 1 +
>  16 files changed, 30 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_acpi.c b/drivers/gpu/drm/i915/display/intel_acpi.c
> index bbf8c5a8fdbd..1addd6288241 100644
> --- a/drivers/gpu/drm/i915/display/intel_acpi.c
> +++ b/drivers/gpu/drm/i915/display/intel_acpi.c
> @@ -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"
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> index 124cd9ddba0b..f481017cd1cf 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> @@ -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)

I'm now wondering if we should
git mv intel_atomic_plane.c intel_plane.c

anyway, for this patch itself and trusting the compiler a lot:

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> +{
> +	return i915_ggtt_offset(plane_state->ggtt_vma);
> +}
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.h b/drivers/gpu/drm/i915/display/intel_atomic_plane.h
> index 65edd88d28a9..6efac923dcbc 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.h
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.h
> @@ -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__ */
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power_map.c b/drivers/gpu/drm/i915/display/intel_display_power_map.c
> index 0c8ac1af6db7..e80e1fd611ca 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power_map.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power_map.c
> @@ -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"
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 4440521e3e9e..12723ba13eb6 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -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"
> @@ -2100,11 +2100,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)
>  {
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> index f53c8355d5be..8173de8aec63 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -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"
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> index 11953b03bb6a..581f1dab618e 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> @@ -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"
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_test.c b/drivers/gpu/drm/i915/display/intel_dp_test.c
> index 614b90d6938f..bd61f3c3ec91 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_test.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_test.c
> @@ -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"
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_tunnel.c b/drivers/gpu/drm/i915/display/intel_dp_tunnel.c
> index 280f302967e3..faa2b7a46699 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_tunnel.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_tunnel.c
> @@ -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"
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
> index 301b5fd301a2..64fbd2461df3 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
> @@ -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"
> diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> index 26128c610cb4..2e9d0cef9b59 100644
> --- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> +++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> @@ -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"
> diff --git a/drivers/gpu/drm/i915/display/intel_link_bw.c b/drivers/gpu/drm/i915/display/intel_link_bw.c
> index f4d60e77aa18..a10cd3992607 100644
> --- a/drivers/gpu/drm/i915/display/intel_link_bw.c
> +++ b/drivers/gpu/drm/i915/display/intel_link_bw.c
> @@ -4,6 +4,7 @@
>   */
>  
>  #include <drm/drm_fixed.h>
> +#include <drm/drm_print.h>
>  
>  #include "intel_atomic.h"
>  #include "intel_crtc.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index 4e6c5592c7ae..f5c972880391 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -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"
> diff --git a/drivers/gpu/drm/i915/display/intel_pfit.c b/drivers/gpu/drm/i915/display/intel_pfit.c
> index 4ee03d9d14ad..dae497221752 100644
> --- a/drivers/gpu/drm/i915/display/intel_pfit.c
> +++ b/drivers/gpu/drm/i915/display/intel_pfit.c
> @@ -3,6 +3,8 @@
>   * Copyright © 2024 Intel Corporation
>   */
>  
> +#include <drm/drm_print.h>
> +
>  #include "i915_reg.h"
>  #include "i915_utils.h"
>  #include "intel_display_core.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_quirks.c b/drivers/gpu/drm/i915/display/intel_quirks.c
> index 8b30e9fd936e..a32fae510ed2 100644
> --- a/drivers/gpu/drm/i915/display/intel_quirks.c
> +++ b/drivers/gpu/drm/i915/display/intel_quirks.c
> @@ -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"
> diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> index 11a6b996d739..b69896baa20c 100644
> --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
> +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> @@ -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"
> -- 
> 2.39.5
> 

  reply	other threads:[~2025-02-28 16:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 16:00 [PATCH 0/2] drm/i915: reduce display dependencies on core Jani Nikula
2025-02-24 16:00 ` [PATCH 1/2] drm/i915: relocate intel_plane_ggtt_offset() to intel_atomic_plane.c Jani Nikula
2025-02-28 16:58   ` Rodrigo Vivi [this message]
2025-02-24 16:00 ` [PATCH 2/2] drm/i915: split out i915_gtt_view_types.h from i915_vma_types.h Jani Nikula
2025-02-28 18:34   ` Teres Alexis, Alan Previn
2025-03-03 12:05     ` Jani Nikula
2025-02-28 18:51   ` Rodrigo Vivi
2025-02-24 21:10 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: reduce display dependencies on core Patchwork
2025-02-24 21:10 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-02-24 21:39 ` ✓ i915.CI.BAT: success " Patchwork
2025-02-24 23:19 ` ✓ CI.Patch_applied: " Patchwork
2025-02-24 23:19 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-24 23:20 ` ✓ CI.KUnit: success " Patchwork
2025-02-24 23:37 ` ✓ CI.Build: " Patchwork
2025-02-24 23:38 ` ✗ i915.CI.Full: failure " Patchwork
2025-02-24 23:40 ` ✓ CI.Hooks: success " Patchwork
2025-02-24 23:41 ` ✓ CI.checksparse: " Patchwork
2025-02-25  0:01 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-25  2:12 ` ✗ Xe.CI.Full: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z8HrMIbWmP91xlsY@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.