]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/fbc: Fix fence_y_offset handling
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 29 Apr 2020 10:10:25 +0000 (13:10 +0300)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 7 Jul 2020 00:15:57 +0000 (17:15 -0700)
commit0df3ffc1bf05e326e2997f23739503068f5c6e0f
treeeea5455477be67c703bce7c85aa33ecc05d04993
parent2053b924385b7a04be678551aea738e34594e83f
drm/i915/fbc: Fix fence_y_offset handling

The current fence_y_offset calculation is broken. I think it more or
less used to do the right thing, but then I changed the plane code
to put the final x/y source offsets back into the src rectangle so
now it's just subtraacting the same value from itself. The code would
never have worked if we allowed the framebuffer to have a non-zero
offset.

Let's do this in a better way by just calculating the fence_y_offset
from the final plane surface offset. Note that we don't align the
plane surface address to fence rows so with horizontal panning there's
often a horizontal offset from the fence start to the surface address
as well. We have no way to tell the hardware about that so we just
ignore it. Based on some quick tests the invlidation still happens
correctly. I presume due to the invalidation nuking at least the full
line (or a segment of multiple lines).

Fixes: bb8e76e179c3 ("drm/i915: Overcome display engine stride limits via GTT remapping")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200429101034.8208-4-ville.syrjala@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
(cherry picked from commit 5331889b5ffb11d6257953e418291a9f04c02bed)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display.h
drivers/gpu/drm/i915/display/intel_fbc.c
drivers/gpu/drm/i915/i915_drv.h