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 04/10] drm/i915: add .vgpu_active to parent interface
Date: Fri, 14 Nov 2025 15:59:04 +0200 [thread overview]
Message-ID: <aRc1qMIMxCqJAN6y@intel.com> (raw)
In-Reply-To: <b89bdfeb42207d62f49af7ab633a761bb279565c.1763115899.git.jani.nikula@intel.com>
On Fri, Nov 14, 2025 at 12:26:43PM +0200, Jani Nikula wrote:
> Add .vgpu_active() to display parent interface, removing more
> dependencies on struct drm_i915_private, i915_drv.h, and i915_vgpu.h.
>
> This also allows us to remove the xe compat i915_vgpu.h.
>
> 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_crtc.c | 6 ++----
> drivers/gpu/drm/i915/display/intel_fbc.c | 5 ++---
> 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 ++++++
> .../gpu/drm/xe/compat-i915-headers/i915_vgpu.h | 18 ------------------
> include/drm/intel/display_parent_interface.h | 3 +++
> 7 files changed, 20 insertions(+), 25 deletions(-)
> delete mode 100644 drivers/gpu/drm/xe/compat-i915-headers/i915_vgpu.h
>
> diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c
> index 9d2a23c96c61..153ff4b4b52c 100644
> --- a/drivers/gpu/drm/i915/display/intel_crtc.c
> +++ b/drivers/gpu/drm/i915/display/intel_crtc.c
> @@ -13,8 +13,6 @@
> #include <drm/drm_vblank.h>
> #include <drm/drm_vblank_work.h>
>
> -#include "i915_drv.h"
> -#include "i915_vgpu.h"
> #include "i9xx_plane.h"
> #include "icl_dsi.h"
> #include "intel_atomic.h"
> @@ -28,6 +26,7 @@
> #include "intel_drrs.h"
> #include "intel_dsi.h"
> #include "intel_fifo_underrun.h"
> +#include "intel_parent.h"
> #include "intel_pipe_crc.h"
> #include "intel_plane.h"
> #include "intel_psr.h"
> @@ -671,7 +670,6 @@ void intel_pipe_update_end(struct intel_atomic_state *state,
> int scanline_end = intel_get_crtc_scanline(crtc);
> u32 end_vbl_count = intel_crtc_get_vblank_counter(crtc);
> ktime_t end_vbl_time = ktime_get();
> - struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
>
> drm_WARN_ON(display->drm, new_crtc_state->use_dsb);
>
> @@ -737,7 +735,7 @@ void intel_pipe_update_end(struct intel_atomic_state *state,
>
> local_irq_enable();
>
> - if (intel_vgpu_active(dev_priv))
> + if (intel_parent_vgpu_active(display))
> goto out;
>
> if (crtc->debug.start_vbl_count &&
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
> index 437d2fda20a7..ab0bcea5aa89 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -50,7 +50,6 @@
> #include "gt/intel_gt_types.h"
>
> #include "i915_drv.h"
> -#include "i915_vgpu.h"
> #include "i915_vma.h"
> #include "i9xx_plane_regs.h"
> #include "intel_de.h"
> @@ -64,6 +63,7 @@
> #include "intel_fbc.h"
> #include "intel_fbc_regs.h"
> #include "intel_frontbuffer.h"
> +#include "intel_parent.h"
>
> #define for_each_fbc_id(__display, __fbc_id) \
> for ((__fbc_id) = INTEL_FBC_A; (__fbc_id) < I915_MAX_FBCS; (__fbc_id)++) \
> @@ -1485,7 +1485,6 @@ static int intel_fbc_check_plane(struct intel_atomic_state *state,
> struct intel_plane *plane)
> {
> struct intel_display *display = to_intel_display(state->base.dev);
> - struct drm_i915_private *i915 = to_i915(display->drm);
> struct intel_plane_state *plane_state =
> intel_atomic_get_new_plane_state(state, plane);
> const struct drm_framebuffer *fb = plane_state->hw.fb;
> @@ -1501,7 +1500,7 @@ static int intel_fbc_check_plane(struct intel_atomic_state *state,
> return 0;
> }
>
> - if (intel_vgpu_active(i915)) {
> + if (intel_parent_vgpu_active(display)) {
> plane_state->no_fbc_reason = "VGPU active";
> return 0;
> }
> diff --git a/drivers/gpu/drm/i915/display/intel_parent.c b/drivers/gpu/drm/i915/display/intel_parent.c
> index 375713f6f411..3786fd42827d 100644
> --- a/drivers/gpu/drm/i915/display/intel_parent.c
> +++ b/drivers/gpu/drm/i915/display/intel_parent.c
> @@ -31,3 +31,8 @@ void intel_parent_irq_synchronize(struct intel_display *display)
> {
> display->parent->irq->synchronize(display->drm);
> }
> +
> +bool intel_parent_vgpu_active(struct intel_display *display)
> +{
> + return display->parent->vgpu_active && display->parent->vgpu_active(display->drm);
> +}
> diff --git a/drivers/gpu/drm/i915/display/intel_parent.h b/drivers/gpu/drm/i915/display/intel_parent.h
> index 3ade493f1008..222c95836d35 100644
> --- a/drivers/gpu/drm/i915/display/intel_parent.h
> +++ b/drivers/gpu/drm/i915/display/intel_parent.h
> @@ -11,4 +11,6 @@ struct intel_display;
> bool intel_parent_irq_enabled(struct intel_display *display);
> void intel_parent_irq_synchronize(struct intel_display *display);
>
> +bool intel_parent_vgpu_active(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 07715aef62d3..f21f1919a225 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -739,9 +739,15 @@ static void i915_welcome_messages(struct drm_i915_private *dev_priv)
> "DRM_I915_DEBUG_RUNTIME_PM enabled\n");
> }
>
> +static bool vgpu_active(struct drm_device *drm)
> +{
> + return intel_vgpu_active(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,
> };
>
> const struct intel_display_parent_interface *i915_driver_parent_interface(void)
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_vgpu.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_vgpu.h
> deleted file mode 100644
> index 4931c7198f13..000000000000
> --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_vgpu.h
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -/* SPDX-License-Identifier: MIT */
> -/*
> - * Copyright © 2023 Intel Corporation
> - */
> -
> -#ifndef _I915_VGPU_H_
> -#define _I915_VGPU_H_
> -
> -#include <linux/types.h>
> -
> -struct drm_i915_private;
> -
> -static inline bool intel_vgpu_active(struct drm_i915_private *i915)
> -{
> - return false;
> -}
> -
> -#endif /* _I915_VGPU_H_ */
> diff --git a/include/drm/intel/display_parent_interface.h b/include/drm/intel/display_parent_interface.h
> index 3a008a18eb65..f3834f36ce74 100644
> --- a/include/drm/intel/display_parent_interface.h
> +++ b/include/drm/intel/display_parent_interface.h
> @@ -48,6 +48,9 @@ struct intel_display_parent_interface {
>
> /** @irq: IRQ interface */
> const struct intel_display_irq_interface *irq;
> +
> + /** @vgpu_active: Is vGPU active? Optional. */
> + bool (*vgpu_active)(struct drm_device *drm);
> };
>
> #endif
> --
> 2.47.3
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2025-11-14 13:59 UTC|newest]
Thread overview: 31+ 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ä [this message]
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ä
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:33 ` ✓ Xe.CI.BAT: success " Patchwork
2025-11-14 19:45 ` ✗ 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=aRc1qMIMxCqJAN6y@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).