drm/i915/adlp/fb: Fix remapping of linear CCS AUX surfaces
authorImre Deak <imre.deak@intel.com>
Tue, 26 Oct 2021 22:51:02 +0000 (01:51 +0300)
committerImre Deak <imre.deak@intel.com>
Tue, 2 Nov 2021 16:07:46 +0000 (18:07 +0200)
commit96837e8beeefe5181adabab2da6e08c51dc0cf5d
tree79be21cbaea44818d900abb11ec134842b7ed834
parentdd5ba4ff4e924b14cb3c91335636baa6bacaf817
drm/i915/adlp/fb: Fix remapping of linear CCS AUX surfaces

During remapping CCS FBs the CCS AUX surface mapped size and offset->x,y
coordinate calculations assumed a tiled layout. This works as long as
the CCS surface height is aligned to 64 lines (ensuring a 4k bytes CCS
surface tile layout).  However this alignment is not required by the HW
(and the driver doesn't enforces it either).

Add the remapping logic required to remap the pages of CCS surfaces
without the above alignment, assuming the natural linear layout of the
CCS surface (vs. tiled main surface layout).

Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Fixes: 3d1adc3d64cf ("drm/i915/adlp: Add support for remapping CCS FBs")
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211026225105.2783797-5-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_fb.c
drivers/gpu/drm/i915/gt/intel_ggtt.c
drivers/gpu/drm/i915/i915_vma_types.h