From: Sasha Levin Date: Wed, 21 Jun 2023 16:39:44 +0000 (-0400) Subject: Fixes for 5.10 X-Git-Tag: v4.14.320~81 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=251a6cf7ec317d72b484d393139e9bc38a245305;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.10 Signed-off-by: Sasha Levin --- diff --git a/queue-5.10/drm-amd-display-fix-the-system-hang-while-disable-ps.patch b/queue-5.10/drm-amd-display-fix-the-system-hang-while-disable-ps.patch new file mode 100644 index 00000000000..97c63b5578d --- /dev/null +++ b/queue-5.10/drm-amd-display-fix-the-system-hang-while-disable-ps.patch @@ -0,0 +1,60 @@ +From 4976fd98740c2cd01d7e99a3050b7f3df91ba76f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 29 May 2023 18:00:09 +0800 +Subject: drm/amd/display: fix the system hang while disable PSR + +From: Tom Chung + +[ Upstream commit ea2062dd1f0384ae1b136d333ee4ced15bedae38 ] + +[Why] +When the PSR enabled. If you try to adjust the timing parameters, +it may cause system hang. Because the timing mismatch with the +DMCUB settings. + +[How] +Disable the PSR before adjusting timing parameters. + +Cc: Mario Limonciello +Cc: Alex Deucher +Cc: stable@vger.kernel.org +Acked-by: Stylon Wang +Signed-off-by: Tom Chung +Reviewed-by: Wayne Lin +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +index 3ca1ee396e4c6..0bdc83d899463 100644 +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -7430,6 +7430,12 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, + if (acrtc_state->abm_level != dm_old_crtc_state->abm_level) + bundle->stream_update.abm_level = &acrtc_state->abm_level; + ++ mutex_lock(&dm->dc_lock); ++ if ((acrtc_state->update_type > UPDATE_TYPE_FAST) && ++ acrtc_state->stream->link->psr_settings.psr_allow_active) ++ amdgpu_dm_psr_disable(acrtc_state->stream); ++ mutex_unlock(&dm->dc_lock); ++ + /* + * If FreeSync state on the stream has changed then we need to + * re-adjust the min/max bounds now that DC doesn't handle this +@@ -7444,9 +7450,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, + spin_unlock_irqrestore(&pcrtc->dev->event_lock, flags); + } + mutex_lock(&dm->dc_lock); +- if ((acrtc_state->update_type > UPDATE_TYPE_FAST) && +- acrtc_state->stream->link->psr_settings.psr_allow_active) +- amdgpu_dm_psr_disable(acrtc_state->stream); + + dc_commit_updates_for_stream(dm->dc, + bundle->surface_updates, +-- +2.39.2 + diff --git a/queue-5.10/net-sched-refactor-qdisc_graft-for-ingress-and-clsac.patch b/queue-5.10/net-sched-refactor-qdisc_graft-for-ingress-and-clsac.patch new file mode 100644 index 00000000000..b5de954ede4 --- /dev/null +++ b/queue-5.10/net-sched-refactor-qdisc_graft-for-ingress-and-clsac.patch @@ -0,0 +1,73 @@ +From ca89af1e4cbab748f9fc49fe564cd9caf5919b21 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 10 Jun 2023 20:30:15 -0700 +Subject: net/sched: Refactor qdisc_graft() for ingress and clsact Qdiscs + +From: Peilin Ye + +[ Upstream commit 2d5f6a8d7aef7852a9ecc555f88c673a1c91754f ] + +Grafting ingress and clsact Qdiscs does not need a for-loop in +qdisc_graft(). Refactor it. No functional changes intended. + +Tested-by: Pedro Tammela +Acked-by: Jamal Hadi Salim +Reviewed-by: Jamal Hadi Salim +Reviewed-by: Vlad Buslov +Signed-off-by: Peilin Ye +Signed-off-by: Paolo Abeni +Stable-dep-of: 84ad0af0bccd ("net/sched: qdisc_destroy() old ingress and clsact Qdiscs before grafting") +Signed-off-by: Sasha Levin +--- + net/sched/sch_api.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c +index 2084724c36ad3..fb50e3f3283f9 100644 +--- a/net/sched/sch_api.c ++++ b/net/sched/sch_api.c +@@ -1044,12 +1044,12 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, + + if (parent == NULL) { + unsigned int i, num_q, ingress; ++ struct netdev_queue *dev_queue; + + ingress = 0; + num_q = dev->num_tx_queues; + if ((q && q->flags & TCQ_F_INGRESS) || + (new && new->flags & TCQ_F_INGRESS)) { +- num_q = 1; + ingress = 1; + if (!dev_ingress_queue(dev)) { + NL_SET_ERR_MSG(extack, "Device does not have an ingress queue"); +@@ -1065,18 +1065,18 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, + if (new && new->ops->attach) + goto skip; + +- for (i = 0; i < num_q; i++) { +- struct netdev_queue *dev_queue = dev_ingress_queue(dev); +- +- if (!ingress) ++ if (!ingress) { ++ for (i = 0; i < num_q; i++) { + dev_queue = netdev_get_tx_queue(dev, i); ++ old = dev_graft_qdisc(dev_queue, new); + +- old = dev_graft_qdisc(dev_queue, new); +- if (new && i > 0) +- qdisc_refcount_inc(new); +- +- if (!ingress) ++ if (new && i > 0) ++ qdisc_refcount_inc(new); + qdisc_put(old); ++ } ++ } else { ++ dev_queue = dev_ingress_queue(dev); ++ old = dev_graft_qdisc(dev_queue, new); + } + + skip: +-- +2.39.2 + diff --git a/queue-5.10/series b/queue-5.10/series new file mode 100644 index 00000000000..ab490a5a0c8 --- /dev/null +++ b/queue-5.10/series @@ -0,0 +1,2 @@ +drm-amd-display-fix-the-system-hang-while-disable-ps.patch +net-sched-refactor-qdisc_graft-for-ingress-and-clsac.patch