| From 8d9d2a723d64b650f2e6423024ccb4a33f0cdc40 Mon Sep 17 00:00:00 2001 |
| From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com> |
| Date: Mon, 7 Feb 2022 15:27:00 +0200 |
| Subject: drm/i915: Fix mbus join config lookup |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| From: Ville Syrjälä <ville.syrjala@linux.intel.com> |
| |
| commit 8d9d2a723d64b650f2e6423024ccb4a33f0cdc40 upstream. |
| |
| 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ä <ville.syrjala@linux.intel.com> |
| Link: https://patchwork.freedesktop.org/patch/msgid/20220207132700.481-2-ville.syrjala@linux.intel.com |
| Reviewed-by: Jani Nikula <jani.nikula@intel.com> |
| (cherry picked from commit 053f2b85631316a9226f6340c1c0fd95634f7a5b) |
| 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 | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/drivers/gpu/drm/i915/intel_pm.c |
| +++ b/drivers/gpu/drm/i915/intel_pm.c |
| @@ -4843,7 +4843,7 @@ static bool check_mbus_joined(u8 active_ |
| { |
| 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; |
| } |