drm/i915/intel_fb: Factor out calc_plane_remap_info()
authorImre Deak <imre.deak@intel.com>
Thu, 25 Mar 2021 21:48:02 +0000 (23:48 +0200)
committerImre Deak <imre.deak@intel.com>
Mon, 29 Mar 2021 19:58:12 +0000 (22:58 +0300)
commit23c87dc6777c25fb91aaf5fff265afa594d268ec
tree1445b6e912ef0d7cba05a4fb6fb50c32c559b988
parentee456a4ca5adef31ffd86c0386d7ac7b367d6533
drm/i915/intel_fb: Factor out calc_plane_remap_info()

Factor out to a new function the logic to calculate the FB remapping
parameters both during creating the FB and when flipping to it.

v2:
- Keep stride next to offset calculation. (Ville)
- Enclose check_array_bounds macro arguments in parentheses.
v3:
- Rebase on top of the struct intel_fb_view refactoring.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-20-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_fb.c