drm/i915/fbc: Extract helpers to compute FBC control register values
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 4 Nov 2021 14:45:08 +0000 (16:45 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 11 Nov 2021 13:18:11 +0000 (15:18 +0200)
commit6874f95816da4af4eb6a395ae434b823c4d7d356
treeed3a03bb101566ee0e0258022c672dbf1d914d01
parent74e0457a62c697d388b832b0a52dd1e716204019
drm/i915/fbc: Extract helpers to compute FBC control register values

Declutter the *_fbc_activate() functions by pulling all the
control register value computations into helpers.

I left the enable bit in *_fbc_activate() in the hopes of maybe
using the helpers in the *_fbc_deactivate() paths as well instead
of the current rmw approach. That won't be possible at least
quite yet since we clobber the fbc->params before deactivating
FBC so we could end up changing some of the values live, which
given FBC's lack of/poor double buffering would likely not go
so well.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211104144520.22605-6-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
drivers/gpu/drm/i915/display/intel_fbc.c