From: Maarten Lankhorst <maarten.lankhorst@intel.com>
To: Jani Nikula <jani.nikula@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: ville.syrjala@linux.intel.com, maarten.lankhorst@linux.intel.com
Subject: Re: [PATCH 2/2] drm/i915: move fence timeout to display parent interface
Date: Wed, 8 Apr 2026 17:51:47 +0200 [thread overview]
Message-ID: <dc488456-5346-44f2-b504-63479c439285@intel.com> (raw)
In-Reply-To: <8cde57236982fc3ca1a5608332943d3b9274a45a.1775661609.git.jani.nikula@intel.com>
Hey,
Den 2026-04-08 kl. 17:21, skrev Jani Nikula:
> i915 has the Kconfig option DRM_I915_FENCE_TIMEOUT, defaulting to 10
> seconds. xe doesn't use it, instead defaulting to MAX_SCHEDULE_TIMEOUT.
>
> There was an attempt to unify the behaviour by switching to
> dma_fence_wait() which defaults to MAX_SCHEDULE_TIMEOUT, but that
> resulted in CI failures. See the link below.
>
> Move the fence timeout to the optional parent interface, retaining
> existing behaviour for each driver. With this, we can drop the xe compat
> i915_config.h header.
>
> While at it, order the declarations in intel_parent.h the same way as in
> the struct.
>
> Link: https://lore.kernel.org/r/20251113155332.789554-1-jani.nikula@intel.com
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 8 ++++++--
> drivers/gpu/drm/i915/display/intel_parent.c | 6 ++++++
> drivers/gpu/drm/i915/display/intel_parent.h | 3 ++-
> drivers/gpu/drm/i915/i915_driver.c | 2 ++
> .../gpu/drm/xe/compat-i915-headers/i915_config.h | 16 ----------------
> include/drm/intel/display_parent_interface.h | 3 +++
> 6 files changed, 19 insertions(+), 19 deletions(-)
> delete mode 100644 drivers/gpu/drm/xe/compat-i915-headers/i915_config.h
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 58a654ca0d20..765cc09b70da 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -49,7 +49,6 @@
> #include "g4x_dp.h"
> #include "g4x_hdmi.h"
> #include "hsw_ips.h"
> -#include "i915_config.h"
> #include "i9xx_plane.h"
> #include "i9xx_plane_regs.h"
> #include "i9xx_wm.h"
> @@ -105,6 +104,7 @@
> #include "intel_modeset_verify.h"
> #include "intel_overlay.h"
> #include "intel_panel.h"
> +#include "intel_parent.h"
> #include "intel_pch_display.h"
> #include "intel_pch_refclk.h"
> #include "intel_pfit.h"
> @@ -7149,15 +7149,19 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)
>
> static void intel_atomic_commit_fence_wait(struct intel_atomic_state *intel_state)
> {
> + struct intel_display *display = to_intel_display(intel_state);
> struct drm_plane *plane;
> struct drm_plane_state *new_plane_state;
> + unsigned long fence_timeout;
> long ret;
> int i;
>
> + fence_timeout = intel_parent_fence_timeout(display);
> +
> for_each_new_plane_in_state(&intel_state->base, plane, new_plane_state, i) {
> if (new_plane_state->fence) {
> ret = dma_fence_wait_timeout(new_plane_state->fence, false,
> - i915_fence_timeout());
> + fence_timeout);
> if (ret <= 0)
> break;
>
> diff --git a/drivers/gpu/drm/i915/display/intel_parent.c b/drivers/gpu/drm/i915/display/intel_parent.c
> index 47ce3b6fdd5b..f22dd16ddb40 100644
> --- a/drivers/gpu/drm/i915/display/intel_parent.c
> +++ b/drivers/gpu/drm/i915/display/intel_parent.c
> @@ -388,6 +388,12 @@ void intel_parent_fence_priority_display(struct intel_display *display, struct d
> display->parent->fence_priority_display(fence);
> }
>
> +unsigned long intel_parent_fence_timeout(struct intel_display *display)
> +{
> + return display->parent->fence_timeout ? display->parent->fence_timeout() :
> + MAX_SCHEDULE_TIMEOUT;
> +}
> +
> bool intel_parent_has_auxccs(struct intel_display *display)
> {
> return display->parent->has_auxccs && display->parent->has_auxccs(display->drm);
> diff --git a/drivers/gpu/drm/i915/display/intel_parent.h b/drivers/gpu/drm/i915/display/intel_parent.h
> index 1e89d24163cc..f06e0f9f2e41 100644
> --- a/drivers/gpu/drm/i915/display/intel_parent.h
> +++ b/drivers/gpu/drm/i915/display/intel_parent.h
> @@ -120,9 +120,10 @@ int intel_parent_vlv_iosf_write(struct intel_display *display, enum vlv_iosf_sb_
> int intel_parent_vma_fence_id(struct intel_display *display, const struct i915_vma *vma);
>
> /* generic */
> +void intel_parent_fence_priority_display(struct intel_display *display, struct dma_fence *fence);
> +unsigned long intel_parent_fence_timeout(struct intel_display *display);
> bool intel_parent_has_auxccs(struct intel_display *display);
> bool intel_parent_has_fenced_regions(struct intel_display *display);
> bool intel_parent_vgpu_active(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/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 129013c5fb42..b7098d80b92d 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -91,6 +91,7 @@
> #include "pxp/intel_pxp_pm.h"
>
> #include "i915_bo.h"
> +#include "i915_config.h"
> #include "i915_debugfs.h"
> #include "i915_display_pc8.h"
> #include "i915_dpt.h"
> @@ -783,6 +784,7 @@ static const struct intel_display_parent_interface parent = {
> .vma = &i915_display_vma_interface,
>
> .fence_priority_display = fence_priority_display,
> + .fence_timeout = i915_fence_timeout,
> .has_auxccs = has_auxccs,
> .has_fenced_regions = has_fenced_regions,
> .vgpu_active = vgpu_active,
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_config.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_config.h
> deleted file mode 100644
> index d4522203e2dd..000000000000
> --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_config.h
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -/* SPDX-License-Identifier: MIT */
> -/*
> - * Copyright © 2023 Intel Corporation
> - */
> -
> -#ifndef __I915_CONFIG_H__
> -#define __I915_CONFIG_H__
> -
> -#include <linux/sched.h>
> -
> -static inline unsigned long i915_fence_timeout(void)
> -{
> - return MAX_SCHEDULE_TIMEOUT;
> -}
> -
> -#endif /* __I915_CONFIG_H__ */
> diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h
> index 258e6388ef77..e0293e6cfdab 100644
> --- a/include/drm/intel/display_parent_interface.h
> +++ b/include/drm/intel/display_parent_interface.h
> @@ -261,6 +261,9 @@ struct intel_display_parent_interface {
> /** @fence_priority_display: Set display priority. Optional. */
> void (*fence_priority_display)(struct dma_fence *fence);
>
> + /** @fence_timeout: Fence timeout. Optional. */
> + unsigned long (*fence_timeout)(void);
> +
> /** @has_auxccs: Are AuxCCS formats supported by the parent. Optional. */
> bool (*has_auxccs)(struct drm_device *drm);
>
I just replied the same but more elaborate in the previous discussion from CI results,
would it be possible to remove waiting for old_obj on gen9+ instead?
Kind regards,
~Maarten Lankhorst
next prev parent reply other threads:[~2026-04-08 15:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 15:21 [PATCH 0/2] drm/i915: move fence timeout to parent interface Jani Nikula
2026-04-08 15:21 ` [PATCH 1/2] drm/i915: convert i915_fence_timeout() into a proper function Jani Nikula
2026-04-08 15:21 ` [PATCH 2/2] drm/i915: move fence timeout to display parent interface Jani Nikula
2026-04-08 15:51 ` Maarten Lankhorst [this message]
2026-04-08 15:28 ` ✗ CI.checkpatch: warning for drm/i915: move fence timeout to " Patchwork
2026-04-08 15:29 ` ✗ CI.KUnit: 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=dc488456-5346-44f2-b504-63479c439285@intel.com \
--to=maarten.lankhorst@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox