drm/i915/fbc: Loop through FBC instances in various places

Convert i915->fbc into an array in preparation for
multiple FBC instances, and loop through all instances
in all places where the caller does not know which
instance(s) (if any) are relevant. This is the case
for eg. frontbuffer tracking and FIFO underrun hadling.

v2: More intel_ namespace (Jani)
    Leave out debugfs for later

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211213134450.3082-3-ville.syrjala@linux.intel.com
This commit is contained in:
Ville Syrjälä
2021-12-13 15:44:48 +02:00
parent ae361eb07e
commit c2a9682d22
4 changed files with 94 additions and 60 deletions

View File

@@ -1829,7 +1829,7 @@ static struct intel_fbc *skl_plane_fbc(struct drm_i915_private *dev_priv,
enum pipe pipe, enum plane_id plane_id)
{
if (skl_plane_has_fbc(dev_priv, pipe, plane_id))
return dev_priv->fbc;
return dev_priv->fbc[INTEL_FBC_A];
else
return NULL;
}