All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 05/10] drm/i915: add .fence_support_legacy to parent interface
Date: Fri, 14 Nov 2025 16:03:11 +0200	[thread overview]
Message-ID: <aRc2n_WANoCWi19c@intel.com> (raw)
In-Reply-To: <ee77882f46d6f68893337801439609bec2f08e9f.1763115899.git.jani.nikula@intel.com>

On Fri, Nov 14, 2025 at 12:26:44PM +0200, Jani Nikula wrote:
> Add .fence_support_legacy() to display parent interface, removing more
> dependencies on struct drm_i915_private, i915_drv.h, and
> gt/intel_gt_types.h.
> 
> This allows us to remove the xe compat gt/intel_gt_types.h.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_fbc.c              |  8 ++------
>  drivers/gpu/drm/i915/display/intel_parent.c           |  5 +++++
>  drivers/gpu/drm/i915/display/intel_parent.h           |  2 ++
>  drivers/gpu/drm/i915/i915_driver.c                    |  6 ++++++
>  .../drm/xe/compat-i915-headers/gt/intel_gt_types.h    | 11 -----------
>  include/drm/intel/display_parent_interface.h          |  3 +++
>  6 files changed, 18 insertions(+), 17 deletions(-)
>  delete mode 100644 drivers/gpu/drm/xe/compat-i915-headers/gt/intel_gt_types.h
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
> index ab0bcea5aa89..8c56c87d00a9 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -47,9 +47,6 @@
>  
>  #include "gem/i915_gem_stolen.h"
>  
> -#include "gt/intel_gt_types.h"
> -
> -#include "i915_drv.h"
>  #include "i915_vma.h"
>  #include "i9xx_plane_regs.h"
>  #include "intel_de.h"
> @@ -64,6 +61,7 @@
>  #include "intel_fbc_regs.h"
>  #include "intel_frontbuffer.h"
>  #include "intel_parent.h"
> +#include "intel_step.h"
>  
>  #define for_each_fbc_id(__display, __fbc_id) \
>  	for ((__fbc_id) = INTEL_FBC_A; (__fbc_id) < I915_MAX_FBCS; (__fbc_id)++) \
> @@ -267,9 +265,7 @@ static u16 intel_fbc_override_cfb_stride(const struct intel_plane_state *plane_s
>  
>  static bool intel_fbc_has_fences(struct intel_display *display)
>  {
> -	struct drm_i915_private __maybe_unused *i915 = to_i915(display->drm);
> -
> -	return intel_gt_support_legacy_fencing(to_gt(i915));
> +	return intel_parent_fence_support_legacy(display);

The naming is getting confusing. I'm thinking we should change
all of it to something like *_has_fenced_regions().

>  }
>  
>  static u32 i8xx_fbc_ctl(struct intel_fbc *fbc)
> diff --git a/drivers/gpu/drm/i915/display/intel_parent.c b/drivers/gpu/drm/i915/display/intel_parent.c
> index 3786fd42827d..3dd31852e2e1 100644
> --- a/drivers/gpu/drm/i915/display/intel_parent.c
> +++ b/drivers/gpu/drm/i915/display/intel_parent.c
> @@ -36,3 +36,8 @@ bool intel_parent_vgpu_active(struct intel_display *display)
>  {
>  	return display->parent->vgpu_active && display->parent->vgpu_active(display->drm);
>  }
> +
> +bool intel_parent_fence_support_legacy(struct intel_display *display)
> +{
> +	return display->parent->fence_support_legacy && display->parent->fence_support_legacy(display->drm);
> +}
> diff --git a/drivers/gpu/drm/i915/display/intel_parent.h b/drivers/gpu/drm/i915/display/intel_parent.h
> index 222c95836d35..fc6799db0361 100644
> --- a/drivers/gpu/drm/i915/display/intel_parent.h
> +++ b/drivers/gpu/drm/i915/display/intel_parent.h
> @@ -13,4 +13,6 @@ void intel_parent_irq_synchronize(struct intel_display *display);
>  
>  bool intel_parent_vgpu_active(struct intel_display *display);
>  
> +bool intel_parent_fence_support_legacy(struct intel_display *display);
> +
>  #endif /* __INTEL_PARENT_H__ */
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index f21f1919a225..814b430de960 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -744,10 +744,16 @@ static bool vgpu_active(struct drm_device *drm)
>  	return intel_vgpu_active(to_i915(drm));
>  }
>  
> +static bool fence_support_legacy(struct drm_device *drm)
> +{
> +	return intel_gt_support_legacy_fencing(to_gt(to_i915(drm)));
> +}
> +
>  static const struct intel_display_parent_interface parent = {
>  	.rpm = &i915_display_rpm_interface,
>  	.irq = &i915_display_irq_interface,
>  	.vgpu_active = vgpu_active,
> +	.fence_support_legacy = fence_support_legacy,
>  };
>  
>  const struct intel_display_parent_interface *i915_driver_parent_interface(void)
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/gt/intel_gt_types.h b/drivers/gpu/drm/xe/compat-i915-headers/gt/intel_gt_types.h
> deleted file mode 100644
> index c15806d6c4f7..000000000000
> --- a/drivers/gpu/drm/xe/compat-i915-headers/gt/intel_gt_types.h
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -/* SPDX-License-Identifier: MIT */
> -/*
> - * Copyright © 2023 Intel Corporation
> - */
> -
> -#ifndef __INTEL_GT_TYPES__
> -#define __INTEL_GT_TYPES__
> -
> -#define intel_gt_support_legacy_fencing(gt) 0
> -
> -#endif
> diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h
> index f3834f36ce74..11767adb0083 100644
> --- a/include/drm/intel/display_parent_interface.h
> +++ b/include/drm/intel/display_parent_interface.h
> @@ -51,6 +51,9 @@ struct intel_display_parent_interface {
>  
>  	/** @vgpu_active: Is vGPU active? Optional. */
>  	bool (*vgpu_active)(struct drm_device *drm);
> +
> +	/** @fence_support_legacy: Support legacy fencing? Optional. */
> +	bool (*fence_support_legacy)(struct drm_device *drm);
>  };
>  
>  #endif
> -- 
> 2.47.3

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2025-11-14 14:03 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14 10:26 [PATCH 00/10] drm/i915: call irq and rps through the parent interface Jani Nikula
2025-11-14 10:26 ` [PATCH 01/10] drm/{i915, xe}/display: duplicate gen2 irq/error init/reset in display irq Jani Nikula
2025-11-14 10:26 ` [PATCH 02/10] drm/i915/display: convert the display irq interfaces to struct intel_display Jani Nikula
2025-11-14 10:26 ` [PATCH 03/10] drm/{i915, xe}/display: move irq calls to parent interface Jani Nikula
2025-11-14 13:57   ` [PATCH 03/10] drm/{i915,xe}/display: " Ville Syrjälä
2025-11-14 10:26 ` [PATCH 04/10] drm/i915: add .vgpu_active " Jani Nikula
2025-11-14 13:59   ` Ville Syrjälä
2025-11-14 10:26 ` [PATCH 05/10] drm/i915: add .fence_support_legacy " Jani Nikula
2025-11-14 14:03   ` Ville Syrjälä [this message]
2025-11-14 15:16   ` [PATCH v2] FIXME drm/i915: add .has_fenced_regions " Jani Nikula
2025-11-14 15:18     ` Jani Nikula
2025-11-14 16:18     ` Ville Syrjälä
2025-11-14 10:26 ` [PATCH 06/10] drm/i915/rps: store struct dma_fence in struct wait_rps_boost Jani Nikula
2025-11-14 14:03   ` Ville Syrjälä
2025-11-14 10:26 ` [PATCH 07/10] drm/i915/rps: call RPS functions via the parent interface Jani Nikula
2025-11-14 14:13   ` Ville Syrjälä
2025-11-14 15:31   ` [PATCH v2] " Jani Nikula
2025-11-14 16:22     ` Ville Syrjälä
2025-11-14 10:26 ` [PATCH 08/10] drm/i915/rps: postpone i915 fence check to boost Jani Nikula
2025-11-14 14:15   ` Ville Syrjälä
2025-11-14 14:21     ` Ville Syrjälä
2025-11-14 10:26 ` [PATCH 09/10] drm/i915: add .fence_priority_display to parent interface Jani Nikula
2025-11-14 14:19   ` Ville Syrjälä
2025-11-14 15:32   ` [PATCH v3] " Jani Nikula
2025-11-14 10:26 ` [PATCH 10/10] drm/xe/rps: build RPS as part of xe Jani Nikula
2025-11-14 14:20   ` Ville Syrjälä
2025-11-14 11:22 ` ✗ CI.checkpatch: warning for drm/i915: call irq and rps through the parent interface Patchwork
2025-11-14 11:24 ` ✓ CI.KUnit: success " Patchwork
2025-11-14 11:39 ` ✗ CI.checksparse: warning " Patchwork
2025-11-14 12:03 ` ✓ i915.CI.BAT: success " Patchwork
2025-11-14 12:33 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-14 19:45 ` ✗ Xe.CI.Full: failure " Patchwork
2025-11-15  5:22 ` ✗ i915.CI.Full: failure for drm/i915: call irq and rps through the parent interface (rev4) 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=aRc2n_WANoCWi19c@intel.com \
    --to=ville.syrjala@linux.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.