]> 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)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 18 Feb 2022 19:36:03 +0000 (21:36 +0200)
commitf8dfc7a033bbccc8c4d1edcc6a9c42076c366b44
treea26a6f49155492dbea33fa8a8778d96e298606e2
parent88dc37d56d3434a272ae0c72ebd440b37e21321a
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
drivers/gpu/drm/i915/display/intel_bw.c