mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
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
This commit is contained in:
parent
1552691f96
commit
6cc3776b1f
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user