From: Vinod Govindapillai <vinod.govindapillai@intel.com>
To: 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,
jani.nikula@intel.com
Subject: [PATCH v4 1/3] drm/i915/display: Use a sub-struct for fbc operations in intel_display
Date: Thu, 27 Nov 2025 13:53:47 +0200 [thread overview]
Message-ID: <20251127115349.249120-2-vinod.govindapillai@intel.com> (raw)
In-Reply-To: <20251127115349.249120-1-vinod.govindapillai@intel.com>
As FBC can utilize the system cache in xe3p_lpd onwards, we need
a provision to track which fbc instance is utilizing this cache.
A sub-struct at intel_display level to group all the fbc ops will
make fbc handling much easier. Introduce a fbc sub-struct and move
the fbc instance array into that.
v2: changes in commit message
Suggested-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@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;
}
--
2.43.0
next prev parent reply other threads:[~2025-11-27 11:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 11:53 [PATCH v4 0/3] drm/i915/display: Enable system cache support for FBC Vinod Govindapillai
2025-11-27 11:53 ` Vinod Govindapillai [this message]
2025-11-27 11:53 ` [PATCH v4 2/3] drm/i915/xe3p_lpd: Enable display use of system cache " Vinod Govindapillai
2025-11-27 13:29 ` Govindapillai, Vinod
2025-11-27 13:49 ` Jani Nikula
2025-11-27 14:09 ` Govindapillai, Vinod
2025-11-28 11:35 ` [PATCH v5 " Vinod Govindapillai
2025-12-03 13:12 ` Hogander, Jouni
2025-12-03 13:43 ` Govindapillai, Vinod
2025-11-27 11:53 ` [PATCH v4 3/3] drm/i915/fbc: Apply Wa_14025769978 Vinod Govindapillai
2025-12-03 13:39 ` Hogander, Jouni
2025-11-27 14:05 ` ✗ CI.checkpatch: warning for drm/i915/display: Enable system cache support for FBC (rev2) Patchwork
2025-11-27 14:06 ` ✓ CI.KUnit: success " Patchwork
2025-11-27 14:21 ` ✗ CI.checksparse: warning " Patchwork
2025-11-27 15:27 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-11-27 16:15 ` ✗ Xe.CI.Full: " Patchwork
2025-11-28 11:42 ` ✗ CI.checkpatch: warning for drm/i915/display: Enable system cache support for FBC (rev4) Patchwork
2025-11-28 11:43 ` ✓ CI.KUnit: success " Patchwork
2025-11-28 11:58 ` ✗ CI.checksparse: warning " Patchwork
2025-11-28 12:52 ` ✓ Xe.CI.BAT: success " Patchwork
2025-11-28 14:08 ` ✗ 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=20251127115349.249120-2-vinod.govindapillai@intel.com \
--to=vinod.govindapillai@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=ville.syrjala@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