summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorVinod Govindapillai <vinod.govindapillai@intel.com>2025-11-27 14:53:47 +0300
committerVinod Govindapillai <vinod.govindapillai@intel.com>2025-12-04 13:06:23 +0300
commit6cc3776b1f41cfc10bbe3dc6c70d0bf036a868d8 (patch)
treeddea8aa57917e2be29bbad0bbb0795532c06289b /drivers/gpu
parent1552691f960a9ee182a80b754d076e055b7545c5 (diff)
downloadlinux-6cc3776b1f41cfc10bbe3dc6c70d0bf036a868d8.tar.xz
drm/i915/display: Use a sub-struct for fbc operations in intel_display
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> Link: https://patch.msgid.link/20251127115349.249120-2-vinod.govindapillai@intel.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/display/i9xx_plane.c2
-rw-r--r--drivers/gpu/drm/i915/display/intel_display_core.h5
-rw-r--r--drivers/gpu/drm/i915/display/intel_fbc.c6
-rw-r--r--drivers/gpu/drm/i915/display/skl_universal_plane.c2
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 60afd58a62d9..45730ae05591 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 5b2120afa806..3bc438094a6e 100644
--- a/drivers/gpu/drm/i915/display/intel_display_core.h
+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
@@ -399,6 +399,10 @@ struct intel_display {
} dram;
struct {
+ struct intel_fbc *instances[I915_MAX_FBCS];
+ } fbc;
+
+ struct {
/* list of fbdev register on this device */
struct intel_fbdev *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 dd306e30d620..80f386633838 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);
@@ -2255,7 +2255,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);
}
/**
@@ -2374,7 +2374,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 d38582af6b39..3c9d3a6220e1 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -2443,7 +2443,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;
}