The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 698bef8ff5d2edea5d1c9d6e5adf1bfed1e8a106 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala(a)linux.intel.com>
Date: Mon, 7 Feb 2022 15:26:59 +0200
Subject: [PATCH] drm/i915: Fix dbuf slice config lookup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Apparently I totally fumbled the loop condition when I
removed the ARRAY_SIZE() stuff from the dbuf slice config
lookup. Comparing the loop index with the active_pipes bitmask
is utter nonsense, what we want to do is check to see if the
mask is zero or not.
Note that the code actually ended up working correctly despite
the fumble, up until commit eef173954432 ("drm/i915: Allow
!join_mbus cases for adlp+ dbuf configuration") when things
broke for real.
Cc: stable(a)vger.kernel.org
Fixes: 05e8155afe35 ("drm/i915: Use a sentinel to terminate the dbuf slice arrays")
Signed-off-by: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220207132700.481-1-ville.sy…
Reviewed-by: Jani Nikula <jani.nikula(a)intel.com>
(cherry picked from commit a28fde308c3c1c174249ff9559b57f24e6850086)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin(a)intel.com>
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 3edba7fd0c49..da6ce24a42b2 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4870,7 +4870,7 @@ static u8 compute_dbuf_slices(enum pipe pipe, u8 active_pipes, bool join_mbus,
{
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 &&
dbuf_slices[i].join_mbus == join_mbus)
return dbuf_slices[i].dbuf_mask[pipe];
I'm announcing the release of the 4.4.302 kernel.
This kernel branch is now END-OF-LIFE. It will not be getting any more
updates from the kernel stable team, and will most likely quickly become
insecure and out-of-date. Do not use it anymore unless you really know
what you are doing.
Note, the CIP project at https://www.cip-project.org/ is considering to
maintain the 4.4 branch in a limited capability going forward. If you
really need to use this kernel version, please contact them.
Some simple statistics for the 4.4.y kernel branch:
First release: January 10, 2016
Last release: Febuary 3, 2022
Days supported: 2216
Changes added: 18712
Changes added per day: 8.44
Unique developers: 3532
Unique companies: 503
It was a good kernel branch, helped out by many to work as well as it
has, thanks to all for your help with this. It has powered many
millions, maybe a few billion, devices out in the world, but now it's
time to say good-bye.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/s390/hypfs/hypfs_vm.c | 6 +-
arch/x86/kvm/x86.c | 14 ++--
drivers/gpu/drm/msm/msm_drv.c | 2
drivers/gpu/drm/radeon/ci_dpm.c | 6 --
drivers/hwmon/lm90.c | 2
drivers/input/serio/i8042-x86ia64io.h | 11 ++-
drivers/media/i2c/tc358743.c | 2
drivers/s390/scsi/zfcp_fc.c | 13 ++++
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 20 +-----
drivers/tty/n_gsm.c | 4 +
drivers/tty/serial/8250/8250_pci.c | 100 +++++++++++++++++++++++++++++++++-
drivers/tty/serial/stm32-usart.c | 2
drivers/usb/core/hcd.c | 14 ++++
drivers/usb/core/urb.c | 12 ++++
drivers/usb/storage/unusual_devs.h | 10 +++
fs/udf/inode.c | 9 +--
include/linux/netdevice.h | 1
include/net/ip.h | 21 +++----
kernel/power/wakelock.c | 12 +---
net/bluetooth/hci_event.c | 10 +--
net/bluetooth/mgmt.c | 8 +-
net/can/bcm.c | 20 +++---
net/core/net-procfs.c | 38 +++++++++++-
net/ipv4/ip_output.c | 11 +++
net/ipv4/raw.c | 5 +
net/ipv6/ip6_tunnel.c | 8 +-
net/packet/af_packet.c | 2
28 files changed, 267 insertions(+), 98 deletions(-)
Alan Stern (2):
usb-storage: Add unusual-devs entry for VL817 USB-SATA bridge
USB: core: Fix hang in usb_kill_urb by adding memory barriers
Brian Gix (1):
Bluetooth: refactor malicious adv data check
Cameron Williams (1):
tty: Add support for Brainboxes UC cards.
Congyu Liu (1):
net: fix information leakage in /proc/net/ptype
Eric Dumazet (3):
ipv4: avoid using shared IP generator for connected sockets
ipv4: raw: lock the socket in raw_bind()
ipv4: tcp: send zero IPID in SYNACK messages
Greg Kroah-Hartman (2):
PM: wakeup: simplify the output logic of pm_show_wakelocks()
Linux 4.4.302
Guenter Roeck (1):
hwmon: (lm90) Reduce maximum conversion rate for G781
Guillaume Bertholon (5):
Bluetooth: MGMT: Fix misplaced BT_HS check
Revert "drm/radeon/ci: disable mclk switching for high refresh rates (v2)"
Revert "tc358743: fix register i2c_rd/wr function fix"
KVM: x86: Fix misplaced backport of "work around leak of uninitialized stack contents"
Input: i8042 - Fix misplaced backport of "add ASUS Zenbook Flip to noselftest list"
Ido Schimmel (1):
ipv6_tunnel: Rate limit warning messages
Jan Kara (2):
udf: Restore i_lenAlloc when inode expansion fails
udf: Fix NULL ptr deref when converting from inline format
Jianguo Wu (1):
net-procfs: show net devices bound packet types
John Meneghini (1):
scsi: bnx2fc: Flush destroy_work queue before calling bnx2fc_interface_put()
Steffen Maier (1):
scsi: zfcp: Fix failed recovery on gone remote port with non-NPIV FCP devices
Valentin Caron (1):
serial: stm32: fix software flow control transfer
Vasily Gorbik (1):
s390/hypfs: include z/VM guests with access control group set
Xianting Tian (1):
drm/msm: Fix wrong size calculation
Ziyang Xuan (1):
can: bcm: fix UAF of bcm op
daniel.starke(a)siemens.com (1):
tty: n_gsm: fix SW flow control encoding/handling
From: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
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(a)vger.kernel.org
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy(a)intel.com> #v1
Fixes: 20f505f22531 ("drm/i915: Restrict qgv points which don't have enough bandwidth.")
Signed-off-by: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_bw.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c
index 7bbe0dc5926b..1fd1d2182d8f 100644
--- a/drivers/gpu/drm/i915/display/intel_bw.c
+++ b/drivers/gpu/drm/i915/display/intel_bw.c
@@ -830,6 +830,7 @@ int intel_bw_atomic_check(struct intel_atomic_state *state)
unsigned int max_bw_point = 0, max_bw = 0;
unsigned int num_qgv_points = dev_priv->max_bw[0].num_qgv_points;
unsigned int num_psf_gv_points = dev_priv->max_bw[0].num_psf_gv_points;
+ bool changed = false;
u32 mask = 0;
/* FIXME earlier gens need some checks too */
@@ -873,6 +874,8 @@ int intel_bw_atomic_check(struct intel_atomic_state *state)
new_bw_state->data_rate[crtc->pipe] = new_data_rate;
new_bw_state->num_active_planes[crtc->pipe] = new_active_planes;
+ changed = true;
+
drm_dbg_kms(&dev_priv->drm,
"pipe %c data rate %u num active planes %u\n",
pipe_name(crtc->pipe),
@@ -880,7 +883,19 @@ int intel_bw_atomic_check(struct intel_atomic_state *state)
new_bw_state->num_active_planes[crtc->pipe]);
}
- if (!new_bw_state)
+ old_bw_state = intel_atomic_get_old_bw_state(state);
+ new_bw_state = intel_atomic_get_new_bw_state(state);
+
+ if (new_bw_state &&
+ intel_can_enable_sagv(dev_priv, old_bw_state) !=
+ intel_can_enable_sagv(dev_priv, new_bw_state))
+ changed = true;
+
+ /*
+ * If none of our inputs (data rates, number of active
+ * planes, SAGV yes/no) changed then nothing to do here.
+ */
+ if (!changed)
return 0;
ret = intel_atomic_lock_global_state(&new_bw_state->base);
@@ -966,7 +981,6 @@ int intel_bw_atomic_check(struct intel_atomic_state *state)
*/
new_bw_state->qgv_points_mask = ~allowed_points & mask;
- old_bw_state = intel_atomic_get_old_bw_state(state);
/*
* If the actual mask had changed we need to make sure that
* the commits are serialized(in case this is a nomodeset, nonblocking)
--
2.34.1