drm/i915: Fix mbus join config lookup
authorjsg <jsg@openbsd.org>
Thu, 24 Feb 2022 13:04:07 +0000 (13:04 +0000)
committerjsg <jsg@openbsd.org>
Thu, 24 Feb 2022 13:04:07 +0000 (13:04 +0000)
From Ville Syrjala
fe802b3fe7631c35abbf280702c5d29b867a1150 in linux 5.15.y/5.15.25
8d9d2a723d64b650f2e6423024ccb4a33f0cdc40 in mainline linux

sys/dev/pci/drm/i915/intel_pm.c

index ac09538..d367dde 100644 (file)
@@ -4846,7 +4846,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;
        }