drm/i915: Remove total[] and uv_total[] from ddb allocation
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 3 Mar 2022 19:12:02 +0000 (21:12 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 21 Mar 2022 15:51:27 +0000 (17:51 +0200)
commit0d21fd10fb3c7485e4701d9f89bf463965e28339
tree2adfeb50601f4463325e43906d07f5350d44600d
parentc034363ca898ea0f809efb113e232dfd0b3e59f2
drm/i915: Remove total[] and uv_total[] from ddb allocation

There's really no need to maintain these total[] arrays to
track the size of each plane's ddb allocation. We just stick
the results straight into the crtc_state ddb tracking structures.

The main annoyance with all this is the mismatch between
wm_uv vs. ddb_y on pre-icl. If only the hw was consistent in
what it considers the primary source of information we could
avoid some of the uglyness. But since that is not the case
we need a bit of special casing for planar formats.

v2: Keep the ddb entry zeroed when the plane is disabled

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220303191207.27931-5-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/intel_pm.c