From: Ville Syrjälä Date: Mon, 7 Feb 2022 13:27:00 +0000 (+0200) Subject: drm/i915: Fix mbus join config lookup X-Git-Tag: v5.18-rc1~109^2~19^2~121 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=053f2b85631316a9226f6340c1c0fd95634f7a5b;p=linux-block.git drm/i915: Fix mbus join config lookup The bogus loop from compute_dbuf_slices() was copied into check_mbus_joined() as well. So this lookup is wrong as well. Fix it. Cc: stable@vger.kernel.org Fixes: f4dc00863226 ("drm/i915/adl_p: MBUS programming") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20220207132700.481-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula --- diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index da721aea70ff..23d4bb011fc8 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -4831,7 +4831,7 @@ static bool check_mbus_joined(u8 active_pipes, { int i; - for (i = 0; i < dbuf_slices[i].active_pipes; i++) { + for (i = 0; dbuf_slices[i].active_pipes != 0; i++) { if (dbuf_slices[i].active_pipes == active_pipes) return dbuf_slices[i].join_mbus; }