diff options
author | Imre Deak <imre.deak@intel.com> | 2021-03-25 23:47:58 +0200 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2021-03-29 22:58:03 +0300 |
commit | 5d32bcd0a74c791c7049817d42dd3645d6c63faf (patch) | |
tree | 22101bc6dd9bd536d4abdd03989c255069437905 /drivers/gpu/drm/i915/display/intel_sprite.c | |
parent | 435b3e7ed708715b048ec5d08edcec4876e3eb57 (diff) |
drm/i915/intel_fb: Factor out calc_plane_normal_size()
Factor out to a new function the logic to calculate an FB plane's
normal-view size.
Instead of using intel_remapped_plane_info, which is related only to
remapping, add a helper to get the tile pitch and rows for an FB plane,
so these helpers can be used both by the normal size calculation and the
remapping code.
Also add a new fb_plane_view_dims struct in which we can pass around the
view (either FB plane or plane source) and tile dimensions conveniently
to functions calculating further view parameters.
v2:
- Add back the +1 tile adjustment for x!=0 in calc_plane_normal_size(). (Ville)
- s/pages/tiles/ in calc_plane_normal_size(). (Ville)
- Add a helper for the plane view width calculation. (Ville)
- Return tiles as unsigned int from calc_plane_normal_size().
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
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-16-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_sprite.c')
0 files changed, 0 insertions, 0 deletions