]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix bw atomic check when switching between SAGV vs. no SAGV
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 18 Feb 2022 06:40:35 +0000 (08:40 +0200)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Mon, 21 Feb 2022 09:37:19 +0000 (09:37 +0000)
commit4b35ec1f0e1df812e91b55893abdff2e2b1b6e94
treee6b587788489a1662eae4e082ccbecb0804e79ae
parent93af2768eb8047225044447550caa3ff8c7ae14c
drm/i915: Fix bw atomic check when switching between SAGV vs. no SAGV

If the only thing that is changing is SAGV vs. no SAGV but
the number of active planes and the total data rates end up
unchanged we currently bail out of intel_bw_atomic_check()
early and forget to actually compute the new WGV point
mask and thus won't actually enable/disable SAGV as requested.
This ends up poorly if we end up running with SAGV enabled
when we shouldn't. Usually ends up in underruns.

To fix this let's go through the QGV point mask computation
if either the data rates/number of planes, or the state
of SAGV is changing.

v2: Check more carefully if things are changing to avoid
    the extra calculations/debugs from introducing unwanted
    overhead

Cc: stable@vger.kernel.org
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> #v1
Fixes: 143a7de9cddf ("drm/i915: Restrict qgv points which don't have enough bandwidth.")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220218064039.12834-3-ville.syrjala@linux.intel.com
(cherry picked from commit 6b728595ffa51c087343c716bccbfc260f120e72)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/display/intel_bw.c