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>, <lucas.demarchi@intel.com>
Subject: Re: [PATCH 06/10] drm/i915/display: include xe_bo.h, gem_object_types etc. where needed
Date: Fri, 31 May 2024 08:07:34 -0400	[thread overview]
Message-ID: <Zlm9huP2AvsNpCph@intel.com> (raw)
In-Reply-To: <e9ca3d6127ea22f252d9dbf30cfde99e37538c99.1717004739.git.jani.nikula@intel.com>

On Wed, May 29, 2024 at 08:48:10PM +0300, Jani Nikula wrote:
> Include what you use. The dependencies on the headers, and what they
> include, is a bit convoluted. Add xe compat gem/gem_object_types.h. Fix
> all the places needed.

it was indeed convoluted. Nice clean up here.

Although it introduces a new compat header, at least it organize things better
and clean up the main pain point of the compat headers...

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

> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_atomic_plane.c     |  1 +
>  drivers/gpu/drm/i915/display/intel_display_types.h    |  1 +
>  drivers/gpu/drm/i915/display/intel_fb.c               |  1 +
>  drivers/gpu/drm/i915/display/intel_fbdev.c            |  1 +
>  .../compat-i915-headers/gem/i915_gem_object_types.h   | 11 +++++++++++
>  drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h     |  4 ----
>  drivers/gpu/drm/xe/display/intel_fb_bo.c              |  2 ++
>  drivers/gpu/drm/xe/display/intel_fbdev_fb.c           |  9 ++++-----
>  drivers/gpu/drm/xe/display/xe_fb_pin.c                |  5 +++--
>  drivers/gpu/drm/xe/display/xe_plane_initial.c         |  1 +
>  10 files changed, 25 insertions(+), 11 deletions(-)
>  create mode 100644 drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object_types.h
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> index a2a827070c33..1143ba5b4f7c 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> @@ -32,6 +32,7 @@
>   */
>  
>  #include <linux/dma-fence-chain.h>
> +#include <linux/dma-resv.h>
>  
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_gem_atomic_helper.h>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 6fbfe8a18f45..4de86e299c91 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -47,6 +47,7 @@
>  #include <drm/i915_hdcp_interface.h>
>  #include <media/cec-notifier.h>
>  
> +#include "gem/i915_gem_object_types.h" /* for to_intel_bo() */
>  #include "i915_vma.h"
>  #include "i915_vma_types.h"
>  #include "intel_bios.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
> index b6638726949d..8069abf91c5e 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb.c
> +++ b/drivers/gpu/drm/i915/display/intel_fb.c
> @@ -9,6 +9,7 @@
>  #include <linux/dma-fence.h>
>  #include <linux/dma-resv.h>
>  
> +#include "gem/i915_gem_object.h"
>  #include "i915_drv.h"
>  #include "intel_display.h"
>  #include "intel_display_types.h"
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
> index 5ad0b4c8a0fd..37ae176bfeb0 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
> @@ -44,6 +44,7 @@
>  #include <drm/drm_gem_framebuffer_helper.h>
>  
>  #include "gem/i915_gem_mman.h"
> +#include "gem/i915_gem_object.h"
>  
>  #include "i915_drv.h"
>  #include "intel_display_types.h"
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object_types.h b/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object_types.h
> new file mode 100644
> index 000000000000..7d6bb1abab73
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object_types.h
> @@ -0,0 +1,11 @@
> +/* SPDX-License-Identifier: MIT */
> +/* Copyright © 2024 Intel Corporation */
> +
> +#ifndef __I915_GEM_OBJECT_TYPES_H__
> +#define __I915_GEM_OBJECT_TYPES_H__
> +
> +#include "xe_bo.h"
> +
> +#define to_intel_bo(x) gem_to_xe_bo((x))
> +
> +#endif
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> index 3e930ce25c90..7b3f53427b03 100644
> --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> +++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> @@ -12,11 +12,8 @@
>  
>  #include <drm/drm_drv.h>
>  
> -#include "gem/i915_gem_object.h"
> -
>  #include "soc/intel_pch.h"
>  #include "xe_device.h"
> -#include "xe_bo.h"
>  #include "xe_pm.h"
>  #include "i915_reg_defs.h"
>  #include "i915_utils.h"
> @@ -113,7 +110,6 @@ static inline struct drm_i915_private *kdev_to_i915(struct device *kdev)
>  #define IS_RAPTORLAKE_U(xe) ((xe)->info.subplatform == XE_SUBPLATFORM_ALDERLAKE_P_RPLU)
>  #define IS_ICL_WITH_PORT_F(xe) (xe && 0)
>  #define HAS_FLAT_CCS(xe) (xe_device_has_flat_ccs(xe))
> -#define to_intel_bo(x) gem_to_xe_bo((x))
>  
>  #define HAS_128_BYTE_Y_TILING(xe) (xe || 1)
>  
> diff --git a/drivers/gpu/drm/xe/display/intel_fb_bo.c b/drivers/gpu/drm/xe/display/intel_fb_bo.c
> index e18521acc516..b89cda053d2c 100644
> --- a/drivers/gpu/drm/xe/display/intel_fb_bo.c
> +++ b/drivers/gpu/drm/xe/display/intel_fb_bo.c
> @@ -4,10 +4,12 @@
>   */
>  
>  #include <drm/drm_modeset_helper.h>
> +#include <drm/ttm/ttm_bo.h>
>  
>  #include "i915_drv.h"
>  #include "intel_display_types.h"
>  #include "intel_fb_bo.h"
> +#include "xe_bo.h"
>  
>  void intel_fb_bo_framebuffer_fini(struct xe_bo *bo)
>  {
> diff --git a/drivers/gpu/drm/xe/display/intel_fbdev_fb.c b/drivers/gpu/drm/xe/display/intel_fbdev_fb.c
> index f6bf5896ff1b..5ecc7d467934 100644
> --- a/drivers/gpu/drm/xe/display/intel_fbdev_fb.c
> +++ b/drivers/gpu/drm/xe/display/intel_fbdev_fb.c
> @@ -3,15 +3,14 @@
>   * Copyright © 2023 Intel Corporation
>   */
>  
> -#include "intel_fbdev_fb.h"
> -
>  #include <drm/drm_fb_helper.h>
>  
> -#include "xe_gt.h"
> -#include "xe_ttm_stolen_mgr.h"
> -
>  #include "i915_drv.h"
>  #include "intel_display_types.h"
> +#include "intel_fbdev_fb.h"
> +#include "xe_bo.h"
> +#include "xe_gt.h"
> +#include "xe_ttm_stolen_mgr.h"
>  
>  struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
>  					       struct drm_fb_helper_surface_size *sizes)
> diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> index 36e15c4961c1..0449cdb892f3 100644
> --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
> +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> @@ -3,17 +3,18 @@
>   * Copyright © 2021 Intel Corporation
>   */
>  
> +#include <drm/ttm/ttm_bo.h>
> +
>  #include "i915_drv.h"
>  #include "intel_display_types.h"
>  #include "intel_dpt.h"
>  #include "intel_fb.h"
>  #include "intel_fb_pin.h"
> +#include "xe_bo.h"
>  #include "xe_ggtt.h"
>  #include "xe_gt.h"
>  #include "xe_pm.h"
>  
> -#include <drm/ttm/ttm_bo.h>
> -
>  static void
>  write_dpt_rotated(struct xe_bo *bo, struct iosys_map *map, u32 *dpt_ofs, u32 bo_ofs,
>  		  u32 width, u32 height, u32 src_stride, u32 dst_stride)
> diff --git a/drivers/gpu/drm/xe/display/xe_plane_initial.c b/drivers/gpu/drm/xe/display/xe_plane_initial.c
> index 9eaa29e733e1..7672a0cffbd8 100644
> --- a/drivers/gpu/drm/xe/display/xe_plane_initial.c
> +++ b/drivers/gpu/drm/xe/display/xe_plane_initial.c
> @@ -18,6 +18,7 @@
>  #include "intel_fb_pin.h"
>  #include "intel_frontbuffer.h"
>  #include "intel_plane_initial.h"
> +#include "xe_bo.h"
>  
>  static bool
>  intel_reuse_initial_plane_obj(struct intel_crtc *this,
> -- 
> 2.39.2
> 

  reply	other threads:[~2024-05-31 12:07 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29 17:48 [PATCH 00/10] drm/i915 and drm/xe display and compat cleanups Jani Nikula
2024-05-29 17:48 ` [PATCH 01/10] drm/i915/display: include gem/i915_gem_stolen.h where needed Jani Nikula
2024-05-31 11:03   ` Rodrigo Vivi
2024-05-31 12:03     ` Jani Nikula
2024-06-04 11:41       ` Jani Nikula
2024-06-04 20:34         ` Rodrigo Vivi
2024-05-29 17:48 ` [PATCH 02/10] drm/i915/display: include gt/intel_gt_types.h " Jani Nikula
2024-05-31 11:05   ` Rodrigo Vivi
2024-05-29 17:48 ` [PATCH 03/10] drm/i915/display: include i915_gpu_error.h " Jani Nikula
2024-05-31 11:07   ` Rodrigo Vivi
2024-05-31 11:35   ` Ville Syrjälä
2024-05-31 12:07     ` Jani Nikula
2024-05-31 12:17       ` Jani Nikula
2024-05-29 17:48 ` [PATCH 04/10] drm/i915/display: include intel_uncore.h " Jani Nikula
2024-05-31 11:07   ` Rodrigo Vivi
2024-05-29 17:48 ` [PATCH 05/10] drm/i915/display: include intel_step.h " Jani Nikula
2024-05-31 12:03   ` Rodrigo Vivi
2024-05-31 12:08     ` Jani Nikula
2024-05-29 17:48 ` [PATCH 06/10] drm/i915/display: include xe_bo.h, gem_object_types etc. " Jani Nikula
2024-05-31 12:07   ` Rodrigo Vivi [this message]
2024-05-29 17:48 ` [PATCH 07/10] drm/xe/display: move compat uncore stubs to the correct file Jani Nikula
2024-05-31 12:08   ` Rodrigo Vivi
2024-05-29 17:48 ` [PATCH 08/10] drm/xe/display: move compat runtime pm " Jani Nikula
2024-05-31 12:09   ` Rodrigo Vivi
2024-05-29 17:48 ` [PATCH 09/10] drm/xe/display: reduce includes in compat i915_drv.h Jani Nikula
2024-05-31 12:09   ` Rodrigo Vivi
2024-05-29 17:48 ` [PATCH 10/10] drm/xe/display: drop i915_drv.h include from xe code Jani Nikula
2024-05-31 12:10   ` Rodrigo Vivi
2024-05-29 18:26 ` ✓ CI.Patch_applied: success for drm/i915 and drm/xe display and compat cleanups Patchwork
2024-05-29 18:26 ` ✗ CI.checkpatch: warning " Patchwork
2024-05-29 18:27 ` ✓ CI.KUnit: success " Patchwork
2024-05-29 18:39 ` ✓ CI.Build: " Patchwork
2024-05-29 18:39 ` ✗ CI.Hooks: failure " Patchwork
2024-05-29 18:41 ` ✗ CI.checksparse: warning " Patchwork
2024-05-29 18:48 ` ✗ Fi.CI.CHECKPATCH: " Patchwork
2024-05-29 18:48 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-05-29 18:56 ` ✓ Fi.CI.BAT: success " Patchwork
2024-05-29 19:20 ` ✓ CI.BAT: " Patchwork
2024-05-29 21:57 ` ✗ CI.FULL: failure " Patchwork
2024-05-30 19:38 ` ✗ Fi.CI.IGT: " 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=Zlm9huP2AvsNpCph@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=lucas.demarchi@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.