From: Jani Nikula <jani.nikula@intel.com>
To: Vinod Govindapillai <vinod.govindapillai@intel.com>,
intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: vinod.govindapillai@intel.com, matthew.d.roper@intel.com,
gustavo.sousa@intel.com, ville.syrjala@intel.com
Subject: Re: [PATCH v3 1/2] drm/i915/display: Use a sub-struct for fbc operations in intel_display
Date: Mon, 24 Nov 2025 12:54:10 +0200 [thread overview]
Message-ID: <dce528054d11c5a96331b981ec9c2234b324b82f@intel.com> (raw)
In-Reply-To: <20251123160127.142599-2-vinod.govindapillai@intel.com>
On Sun, 23 Nov 2025, Vinod Govindapillai <vinod.govindapillai@intel.com> wrote:
> As FBC can utilze the system cache in xe3p_lpd onwards, we need
*utilize
> a way to track which fbc instance is utilizing this cache. So we
> would need to extend the intel_display with such a functionality.
> Introduce a new fbc substruct and move the current fbc instance
> array into that. Then the following patch can utilize this to
> introduce functionaity to configure and track the system cache
> usage by the fbc instance.
In general, please don't refer to "patches" in commit messages. Just
consider reading this commit message a year from now, wondering what
"the following patch" might refer to.
No need to resend for this.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> Suggested-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
> ---
> drivers/gpu/drm/i915/display/i9xx_plane.c | 2 +-
> drivers/gpu/drm/i915/display/intel_display_core.h | 5 ++++-
> drivers/gpu/drm/i915/display/intel_fbc.c | 6 +++---
> drivers/gpu/drm/i915/display/skl_universal_plane.c | 2 +-
> 4 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/i9xx_plane.c b/drivers/gpu/drm/i915/display/i9xx_plane.c
> index 51ccc6bd5f21..2c40bc632b3d 100644
> --- a/drivers/gpu/drm/i915/display/i9xx_plane.c
> +++ b/drivers/gpu/drm/i915/display/i9xx_plane.c
> @@ -134,7 +134,7 @@ static struct intel_fbc *i9xx_plane_fbc(struct intel_display *display,
> enum i9xx_plane_id i9xx_plane)
> {
> if (i9xx_plane_has_fbc(display, i9xx_plane))
> - return display->fbc[INTEL_FBC_A];
> + return display->fbc.instances[INTEL_FBC_A];
> else
> return NULL;
> }
> diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
> index 9b36654b593d..58325f530670 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_core.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_core.h
> @@ -398,6 +398,10 @@ struct intel_display {
> const struct dram_info *info;
> } dram;
>
> + struct {
> + struct intel_fbc *instances[I915_MAX_FBCS];
> + } fbc;
> +
> struct {
> /* list of fbdev register on this device */
> struct intel_fbdev *fbdev;
> @@ -615,7 +619,6 @@ struct intel_display {
> struct drm_dp_tunnel_mgr *dp_tunnel_mgr;
> struct intel_audio audio;
> struct intel_dpll_global dpll;
> - struct intel_fbc *fbc[I915_MAX_FBCS];
> struct intel_frontbuffer_tracking fb_tracking;
> struct intel_hotplug hotplug;
> struct intel_opregion *opregion;
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
> index d9cab25d414a..dcdfcff80de3 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -69,7 +69,7 @@
>
> #define for_each_intel_fbc(__display, __fbc, __fbc_id) \
> for_each_fbc_id((__display), (__fbc_id)) \
> - for_each_if((__fbc) = (__display)->fbc[(__fbc_id)])
> + for_each_if((__fbc) = (__display)->fbc.instances[(__fbc_id)])
>
> struct intel_fbc_funcs {
> void (*activate)(struct intel_fbc *fbc);
> @@ -2211,7 +2211,7 @@ void intel_fbc_init(struct intel_display *display)
> display->params.enable_fbc);
>
> for_each_fbc_id(display, fbc_id)
> - display->fbc[fbc_id] = intel_fbc_create(display, fbc_id);
> + display->fbc.instances[fbc_id] = intel_fbc_create(display, fbc_id);
> }
>
> /**
> @@ -2330,7 +2330,7 @@ void intel_fbc_debugfs_register(struct intel_display *display)
> {
> struct intel_fbc *fbc;
>
> - fbc = display->fbc[INTEL_FBC_A];
> + fbc = display->fbc.instances[INTEL_FBC_A];
> if (fbc)
> intel_fbc_debugfs_add(fbc, display->drm->debugfs_root);
> }
> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> index 89c8003ccfe7..48af74963e74 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> @@ -2444,7 +2444,7 @@ static struct intel_fbc *skl_plane_fbc(struct intel_display *display,
> enum intel_fbc_id fbc_id = skl_fbc_id_for_pipe(pipe);
>
> if (skl_plane_has_fbc(display, fbc_id, plane_id))
> - return display->fbc[fbc_id];
> + return display->fbc.instances[fbc_id];
> else
> return NULL;
> }
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-11-24 10:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-23 16:01 [PATCH v3 0/2] drm/i915/display: Enable system cache support for FBC Vinod Govindapillai
2025-11-23 16:01 ` [PATCH v3 1/2] drm/i915/display: Use a sub-struct for fbc operations in intel_display Vinod Govindapillai
2025-11-24 10:54 ` Jani Nikula [this message]
2025-11-23 16:01 ` [PATCH v3 2/2] drm/i915/xe3p_lpd: Enable display use of system cache for FBC Vinod Govindapillai
2025-11-24 11:27 ` Jani Nikula
2025-11-24 13:32 ` Govindapillai, Vinod
2025-11-24 16:23 ` Jani Nikula
2025-11-24 16:25 ` Jani Nikula
2025-11-25 8:56 ` Govindapillai, Vinod
2025-11-25 9:21 ` Jani Nikula
2025-11-24 22:55 ` ✓ i915.CI.BAT: success for drm/i915/display: Enable system cache support " Patchwork
2025-11-25 3:21 ` ✗ i915.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=dce528054d11c5a96331b981ec9c2234b324b82f@intel.com \
--to=jani.nikula@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=ville.syrjala@intel.com \
--cc=vinod.govindapillai@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).