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 09/10] drm/i915: add .fence_priority_display to parent interface
Date: Fri, 14 Nov 2025 16:19:34 +0200	[thread overview]
Message-ID: <aRc6dsi1vJ0MzUsX@intel.com> (raw)
In-Reply-To: <5deb93a8677005ce868cf1185c2d253e1311a9af.1763115899.git.jani.nikula@intel.com>

On Fri, Nov 14, 2025 at 12:26:48PM +0200, Jani Nikula wrote:
> Add .fence_priority_display() to display parent interface, removing a
> display dependency on gem/i915_gem_object.h.
> 
> This allows us to remove the xe compat gem/i915_gem_object.h.
> 
> v2: Don't mix this with the rps interface (Ville)
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_parent.c         |  6 ++++++
>  drivers/gpu/drm/i915/display/intel_parent.h         |  2 ++
>  drivers/gpu/drm/i915/display/intel_plane.c          |  5 ++---
>  drivers/gpu/drm/i915/i915_driver.c                  |  7 +++++++
>  .../xe/compat-i915-headers/gem/i915_gem_object.h    | 13 -------------
>  include/drm/intel/display_parent_interface.h        |  3 +++
>  6 files changed, 20 insertions(+), 16 deletions(-)
>  delete mode 100644 drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_parent.c b/drivers/gpu/drm/i915/display/intel_parent.c
> index 9370da9d215c..789bc11a324c 100644
> --- a/drivers/gpu/drm/i915/display/intel_parent.c
> +++ b/drivers/gpu/drm/i915/display/intel_parent.c
> @@ -64,3 +64,9 @@ bool intel_parent_fence_support_legacy(struct intel_display *display)
>  {
>  	return display->parent->fence_support_legacy && display->parent->fence_support_legacy(display->drm);
>  }
> +
> +void intel_parent_fence_priority_display(struct intel_display *display, struct dma_fence *fence)
> +{
> +	if (display->parent->fence_priority_display)
> +		display->parent->fence_priority_display(fence);
> +}
> diff --git a/drivers/gpu/drm/i915/display/intel_parent.h b/drivers/gpu/drm/i915/display/intel_parent.h
> index 41d6943786fb..b3cce2c6b017 100644
> --- a/drivers/gpu/drm/i915/display/intel_parent.h
> +++ b/drivers/gpu/drm/i915/display/intel_parent.h
> @@ -21,4 +21,6 @@ bool intel_parent_vgpu_active(struct intel_display *display);
>  
>  bool intel_parent_fence_support_legacy(struct intel_display *display);
>  
> +void intel_parent_fence_priority_display(struct intel_display *display, struct dma_fence *fence);
> +
>  #endif /* __INTEL_PARENT_H__ */
> diff --git a/drivers/gpu/drm/i915/display/intel_plane.c b/drivers/gpu/drm/i915/display/intel_plane.c
> index 5105e3278bc4..a7fec5ba6ac0 100644
> --- a/drivers/gpu/drm/i915/display/intel_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_plane.c
> @@ -45,7 +45,6 @@
>  #include <drm/drm_panic.h>
>  #include <drm/drm_print.h>
>  
> -#include "gem/i915_gem_object.h"
>  #include "i9xx_plane_regs.h"
>  #include "intel_cdclk.h"
>  #include "intel_cursor.h"
> @@ -56,6 +55,7 @@
>  #include "intel_fb_pin.h"
>  #include "intel_fbdev.h"
>  #include "intel_panic.h"
> +#include "intel_parent.h"
>  #include "intel_plane.h"
>  #include "intel_psr.h"
>  #include "skl_scaler.h"
> @@ -1180,8 +1180,7 @@ intel_prepare_plane_fb(struct drm_plane *_plane,
>  		goto unpin_fb;
>  
>  	if (new_plane_state->uapi.fence) {
> -		i915_gem_fence_wait_priority_display(new_plane_state->uapi.fence);
> -
> +		intel_parent_fence_priority_display(display, new_plane_state->uapi.fence);
>  		intel_display_rps_boost_after_vblank(new_plane_state->hw.crtc,
>  						     new_plane_state->uapi.fence);
>  	}
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index ac189b90f985..7cc74b76774a 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -750,12 +750,19 @@ static bool fence_support_legacy(struct drm_device *drm)
>  	return intel_gt_support_legacy_fencing(to_gt(to_i915(drm)));
>  }
>  
> +static void fence_priority_display(struct dma_fence *fence)
> +{
> +	if (dma_fence_is_i915(fence))
> +		i915_gem_fence_wait_priority_display(fence);
> +}
> +
>  static const struct intel_display_parent_interface parent = {
>  	.rpm = &i915_display_rpm_interface,
>  	.irq = &i915_display_irq_interface,
>  	.rps = &i915_display_rps_interface,
>  	.vgpu_active = vgpu_active,
>  	.fence_support_legacy = fence_support_legacy,
> +	.fence_priority_display = fence_priority_display,
>  };
>  
>  const struct intel_display_parent_interface *i915_driver_parent_interface(void)
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h b/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h
> deleted file mode 100644
> index 0548b2e0316f..000000000000
> --- a/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -/* SPDX-License-Identifier: MIT */
> -/* Copyright © 2025 Intel Corporation */
> -
> -#ifndef __I915_GEM_OBJECT_H__
> -#define __I915_GEM_OBJECT_H__
> -
> -struct dma_fence;
> -
> -static inline void i915_gem_fence_wait_priority_display(struct dma_fence *fence)
> -{
> -}
> -
> -#endif
> diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h
> index 2ea68a31224d..fd066309184d 100644
> --- a/include/drm/intel/display_parent_interface.h
> +++ b/include/drm/intel/display_parent_interface.h
> @@ -64,6 +64,9 @@ struct intel_display_parent_interface {
>  
>  	/** @fence_support_legacy: Support legacy fencing? Optional. */
>  	bool (*fence_support_legacy)(struct drm_device *drm);
> +
> +	/** @fence_priority_display: Set display priority. Optional. */
> +	void (*fence_priority_display)(struct dma_fence *fence);
>  };
>  
>  #endif
> -- 
> 2.47.3

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2025-11-14 14:19 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ä
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ä [this message]
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=aRc6dsi1vJ0MzUsX@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.