drm/i915: Shrink the size of intel_remapped_plane_info struct
authorImre Deak <imre.deak@intel.com>
Thu, 25 Mar 2021 21:48:03 +0000 (23:48 +0200)
committerImre Deak <imre.deak@intel.com>
Mon, 29 Mar 2021 19:58:12 +0000 (22:58 +0300)
commit1b6b032aa46f6c0749555dd67f6e576504018252
treeea94640c192f1d1db4f7ca411aeedbbdfbfb6910
parent23c87dc6777c25fb91aaf5fff265afa594d268ec
drm/i915: Shrink the size of intel_remapped_plane_info struct

Save some place in the GTT VMAs by using a u16 instead of unsigned int
to store the view dimensions. The maximum FB stride is 256kB which is
4096 tiles in the worst case (yf-tiles), the maximum FB height is 16k
pixels, which is 16384 tiles in the worst case (linear 4x1 tiled FB).

v2:
- Fix worst case tile height formula in commit log. (Ville)
- Add an assign_chk_ovf helper to simplify the related assignments.
v3:
- Enclose params of the assign_chk_ovf macro in parentheses.

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-21-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_fb.c
drivers/gpu/drm/i915/i915_vma_types.h