drm/i915: Populate pipe dbuf slices more accurately during readout
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 4 Feb 2022 14:18:17 +0000 (16:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Feb 2022 11:56:20 +0000 (12:56 +0100)
commitac14a51c31693e11947f9b4e36c84558368fe089
treec9ce407f4f4aa7548aa97631af1be8d37cf4831a
parent8d6a31b83cddd5c3429def795ba7ec8fdaf4541d
drm/i915: Populate pipe dbuf slices more accurately during readout

commit 85bb289215cf37e05e9581b39b114db1293f9ecd upstream.

During readout we cannot assume the planes are actually using the
slices they are supposed to use. The BIOS may have misprogrammed
things and put the planes onto the wrong dbuf slices. So let's
do the readout more carefully to make sure we really know which
dbuf slices are actually in use by the pipe at the time.

Cc: <stable@vger.kernel.org> # v5.14+
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220204141818.1900-2-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
(cherry picked from commit b3dcc6dc0f32612d04839c2fb32e94d0ebf92c98)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/i915/intel_pm.c